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

ARM instruction decoder: umulls is decoded as umull #1778

Closed
jeffayle opened this issue Jun 9, 2020 · 2 comments
Closed

ARM instruction decoder: umulls is decoded as umull #1778

jeffayle opened this issue Jun 9, 2020 · 2 comments

Comments

@jeffayle
Copy link

@jeffayle jeffayle commented Jun 9, 2020

version: mgba-qt 0.9-11-8187174 on Linux x86-64

The ARM decoder incorrectly decodes umulls instructions as umull. This output is from the debugger:

08000304:  E0976994	umull r6, r7, r4, r9
08000308:  E0B76994	umlal r6, r7, r4, r9
0800030C:  E0D76994	smull r6, r7, r4, r9
08000310:  E0F76994	smlal r6, r7, r4, r9
08000314:  E0910392	umull r0, r1, r2, r3
08000318:  E0B10392	umlal r0, r1, r2, r3
0800031C:  E0D10392	smull r0, r1, r2, r3
08000320:  E0F10392	smlal r0, r1, r2, r3

These instructions were all assembled (using gnu toolchain) from the variants with s. This can be verified by plugging those opcodes into another disassembler. I also checked this arm7tdmi reference (page 37) to make sure that these instructions exist on this processor. I've come across no documentation that these instructions might be broken on some processors, but I'm not setup to test this on real hardware.

@endrift
Copy link
Member

@endrift endrift commented Jun 9, 2020

This ended up being a disassembler bug, not a decoder bug, so it was only the textual output that was wrong. Fixed in d61d9ef.

@endrift endrift closed this Jun 9, 2020
@jeffayle
Copy link
Author

@jeffayle jeffayle commented Jun 9, 2020

fantastic, thank you for fixing that so fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.