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

x/arch/arm/armasm: incorrect disassembly of MOVW/MOVH/MOVB #20766

Closed
benshi001 opened this issue Jun 23, 2017 · 4 comments
Closed

x/arch/arm/armasm: incorrect disassembly of MOVW/MOVH/MOVB #20766

benshi001 opened this issue Jun 23, 2017 · 4 comments

Comments

@benshi001
Copy link
Member

Though "0xe7912e29" is correctly decoded to "MOVW (R1)(R0>>28), R2", "0xe7112e20" is also decoded to "MOVW (R1)(R0>>28), R2", which is expected to be "MOVW.U (R1)(R0>>28), R2" or "MOVW (R1)(-R0>>28), R2" or "MOVW (R1)-(R0>>28), R2".

@benshi001
Copy link
Member Author

The sign bit is missing in decoded string.

@gopherbot
Copy link

CL https://golang.org/cl/46493 mentions this issue.

@cherrymui cherrymui added this to the Unreleased milestone Jun 23, 2017
@benshi001 benshi001 changed the title x/arch/arm/armasm: incorrect disassembly of MOVW.U on plan9 x/arch/arm/armasm: incorrect disassembly of MOVW/MOVH/MOVB Jun 26, 2017
@benshi001
Copy link
Member Author

benshi001 commented Jun 26, 2017

One more case that two different binaries are disassembled to the same text.

0010d2e5| 1 plan9 MOVB (R2), R1
d010d2e1| 1 plan9 MOVB (R2), R1

They should be

0010d2e5| 1 plan9 MOVBU (R2), R1
d010d2e1| 1 plan9 MOVBS (R2), R1

@gopherbot
Copy link

Change https://golang.org/cl/49530 mentions this issue: cmd/vendor/golang.org/x/arch: pull updates from x repo

gopherbot pushed a commit that referenced this issue Aug 16, 2017
Vendor from golang.org/x/arch (commit f185940).

Implements #19157

Updates #12840
Updates #20762
Updates #20897
Updates #20096
Updates #20766
Updates #20752
Updates #20096
Updates #19142

Change-Id: Idefb8ba2c355dc07f3b9e8dcf5f00173256a0f0f
Reviewed-on: https://go-review.googlesource.com/49530
Reviewed-by: Cherry Zhang <cherryyz@google.com>
@golang golang locked and limited conversation to collaborators Jul 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants