-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/objdump: can not disassemble ARM DIVUHW / DIVHW #20096
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
Comments
The disassembler comes from @benshi001 would you like to update the table with a newer version of the manual that includes these instructions? (I don't have one.) |
OK. I will do it later. Thank you. |
Questions,
|
// DIVHW R0, R1, R2: R1 / R0 -> R2 arm.s:8 0x8f e712f011 SDIV R0, R1, R2 |
The UDF is not supported by the assembler, so it is not tested. |
A bug is found, "MULS R1, R2, R3, R4" is dissambled to "MLS R3, R1, R2, R4", which should be "MLS R1, R2, R3, R4" Patch set 3 of CL https://go-review.googlesource.com/#/c/41891/ fixes it. |
CL https://golang.org/cl/42171 mentions this issue. |
https://go-review.googlesource.com/#/c/41891/ fixes the DIV/DIVU issue. |
QADD is also not decoded correctly. 0xe1086055 should be decoded to "QADD R6, R8, R5" in GNU syntax, but actually "QADD R6, R5, R8". |
There same error of wrong register list also exists in QDADD/QSUB |
Change https://golang.org/cl/49530 mentions this issue: |
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 <[email protected]>
Wtih a simple test file arm.s
TEXT foo(SB), 4, $0
DIVHW R0, R1, R2
DIVUHW R0, R1, R2
DIVHW R0, R1
DIVUHW R0, R1
ADD $ 0xfff9, R0
END
Here are what I do and the results,
pi@raspberrypi:~ $ cat arm.s
TEXT foo(SB), 4, $0
DIVHW R0, R1, R2
DIVUHW R0, R1, R2
DIVHW R0, R1
DIVUHW R0, R1
ADD $ 0xfff9, R0
END
pi@raspberrypi:~ $ GOROOT= ~ /go PATH=$GOROOT/bin:$PATH go tool asm arm.s
pi@raspberrypi:~ $ GOROOT= ~ /go PATH=$GOROOT/bin:$PATH go tool objdump arm.o
TEXT foo(SB) gofile../home/pi/arm.s
arm.s:4 0x85 e712f011 ?
arm.s:5 0x89 e732f011 ?
arm.s:7 0x8d e711f011 ?
arm.s:8 0x91 e731f011 ?
arm.s:10 0x95 e30fbff9 MOVW $65529, R11
arm.s:10 0x99 e080000b ADD R11, R0, R0
The DIVHW/DIVUHW are not disassembled .
The text was updated successfully, but these errors were encountered: