imul flags on particular case of 2 x maxint
Opened this issue · 0 comments
erikeidt commented
Looks to me like imul is not setting flags properly on this particular case! Thanks, Erik
mov eax, 0x2
mov ebx, 0x7FFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; <----- after this CF & OF should be set/true/1 but they are cleared
mov eax, 0x4
mov ebx, 0x7FFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; CF & OF properly set to true/1
mov eax, 0xFFFFFFFF
mov ebx, 0xFFFFFFFF
mov edx, 0xDEADBEAF
imul ebx ; CF & OF properly set to false/0
mov ebx, 0xDEADBEAF
ret