diff options
| author | Konstantin Komarov <gerayee@gmail.com> | 2021-07-03 12:04:25 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-03 11:04:25 +0200 |
| commit | fcb324e04e11feb7f6f5aa51ec60f67f24b040e3 (patch) | |
| tree | a5144ec3c21ecc5906618ecd529f9d13b9f37e9d /test/arch/x86/arch.py | |
| parent | 069440e8b4517a0ff93b94b4f89598e1695a429a (diff) | |
| download | miasm-fcb324e04e11feb7f6f5aa51ec60f67f24b040e3.tar.gz miasm-fcb324e04e11feb7f6f5aa51ec60f67f24b040e3.zip | |
x86_64 Fix multiple REX prefix instruction disasm (#1376)
Fix multiple rex prefixes
Diffstat (limited to 'test/arch/x86/arch.py')
| -rw-r--r-- | test/arch/x86/arch.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/arch/x86/arch.py b/test/arch/x86/arch.py index bedbc503..55694dfe 100644 --- a/test/arch/x86/arch.py +++ b/test/arch/x86/arch.py @@ -3125,6 +3125,8 @@ reg_tests = [ "f30f1efa"), (m32, "00000000 ENDBR32", "f30f1efb"), + (m64, "00000000 MOV QWORD PTR ES:[RAX], RDX", + "26488910"), ] @@ -3201,3 +3203,8 @@ cProfile.run('profile_dis(o)') instr_bytes = b'\x65\xc7\x00\x09\x00\x00\x00' inst = mn_x86.dis(instr_bytes, 32, 0) assert(inst.b == instr_bytes) + +# Test multiple REX prefixes +for i in range(1, 4): + mn = mn_x86.dis(b'\x26' + b'\x48' * i + b'\x89\x10', 64) + assert (str(mn).strip() == 'MOV QWORD PTR ES:[RAX], RDX') |