When running gtirb pprinter on an arm64 ls binary (Attached: ls_arm64.zip) using the following command:
$ docker run --platform linux/amd64 --rm -v "$(pwd)":/workspace grammatech/ddisasm ddisasm /workspace/ls_arm64 --asm /workspace/out_ls_identity/ls_arm64.S
The generated assembly contains fmov v0,x3 instructions:
$ cat ./out_ls_identity/ls_arm64.S | grep "fmov v0"
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
fmov v0,x3
Trying to assemble this code results in this assembler error:
$ gcc -c -o ./ls_arm64.o ./ls_arm64.S -nodefaultlibs -nostartfiles
./ls_arm64.S: Assembler messages:
./ls_arm64.S:29839: Error: the top half of a 128-bit FP/SIMD register is expected at operand 1 -- `fmov v0,x3'
...
I believe the instruction it should emit is: fmov v0.d[1], x3 (this appears to be the corresponding instruction in the binary to the fmov v0,x3 instruction gtirb-pprinter emits).
When running gtirb pprinter on an arm64
lsbinary (Attached: ls_arm64.zip) using the following command:$ docker run --platform linux/amd64 --rm -v "$(pwd)":/workspace grammatech/ddisasm ddisasm /workspace/ls_arm64 --asm /workspace/out_ls_identity/ls_arm64.SThe generated assembly contains
fmov v0,x3instructions:Trying to assemble this code results in this assembler error:
I believe the instruction it should emit is:
fmov v0.d[1], x3(this appears to be the corresponding instruction in the binary to thefmov v0,x3instruction gtirb-pprinter emits).