Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imul flags on particular case of 2 x maxint #14

Open
erikeidt opened this issue May 21, 2022 · 0 comments
Open

imul flags on particular case of 2 x maxint #14

erikeidt opened this issue May 21, 2022 · 0 comments

Comments

@erikeidt
Copy link

erikeidt commented May 21, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant