radareorg / radare2

UNIX-like reverse engineering framework and command-line toolset
https://www.radare.org/
GNU Lesser General Public License v3.0
20.7k stars 3.01k forks source link

`movdqa xmm12, oword [inputA]` unexpectedly assembled as `movdqa xmm12, xmmword [obj.inputA]` in x86_64 #21492

Open gogo2464 opened 1 year ago

gogo2464 commented 1 year ago

Environment

$ radare2 -v
radare2 5.8.3 30097 @ linux-x86-64 git.5.8.2-259-g4e43e320cd
commit: 4e43e320cd4d19b8848ce117db41d8c10dbe4c5c build: 2023-03-12__21:36:21

$ uname -ms
Linux x86_64

Description

I was reverse engineering an hash algorithm. Then I decided to copy and past code in order to recompile and document this part of code.

I decided to use nasm with:

nasm -f elf64 decomp.asm -g -O0
ld -o out -dynamic-linker /lib64/ld-linux-x86-64.so.2 -lc decomp.o -O0

sadly nasm has rised some errors. Including the xmmword unrecognized.

So I want to do 3 stuff:

1-replace xmmword with oword. 2-make radare2 more nasm compliant to ensure there is no bug. 3-use nasm to compare with r2 output for testing as I did with 8051.

DO you agree with the first point?

trufae commented 1 year ago

so you want to add/have xmm instructions supported in the x86.nz assembler? yeah that sounds good to me