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 does not sign extend correctly #22

Open
YJDoc2 opened this issue Oct 4, 2023 · 0 comments · May be fixed by #24
Open

IMUL does not sign extend correctly #22

YJDoc2 opened this issue Oct 4, 2023 · 0 comments · May be fixed by #24
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@YJDoc2
Copy link
Owner

YJDoc2 commented Oct 4, 2023

As from a mail received :

start:
MOV AL, 0xF9 (-7)
MOV BL, 0x02 (2)
IMUL BL

It gives the result of 01F2. This answer is the result of unsigned number multiplication (MUL).
It is expected to give the answer of FFF2 (-14).

This is because of a bug in imul implementation which does the sign extension + expansion incorrectly.

@YJDoc2 YJDoc2 added bug Something isn't working good first issue Good for newcomers labels Oct 4, 2023
@KiN4Tec KiN4Tec linked a pull request Dec 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant