diff --git a/windows/native_exec/simple_x64.py b/windows/native_exec/simple_x64.py index 8063a34..14a0bc5 100644 --- a/windows/native_exec/simple_x64.py +++ b/windows/native_exec/simple_x64.py @@ -908,7 +908,7 @@ class Lea(Instruction): class Mov(Instruction): default_32_bits = True encoding = [(Mov_RAX_OFF64(),), (Mov_OFF64_RAX(),), - (RawBits.from_int(8, 0xc7), Slash(0), AnyImm32()), + (RawBits.from_int(8, 0xc7), Slash(0), Imm32()), (RawBits.from_int(8, 0x89), ModRM([ModRM_REG__REG, ModRM_REG64__MEM])), (RawBits.from_int(5, 0xb8 >> 3), X64RegisterSelector(), Imm64())] diff --git a/windows/native_exec/test_simple_x64.py b/windows/native_exec/test_simple_x64.py index 953c772..128b5e1 100644 --- a/windows/native_exec/test_simple_x64.py +++ b/windows/native_exec/test_simple_x64.py @@ -133,6 +133,10 @@ TestInstr(Mov)('RAX', mem('[0x1122334455667788]')) TestInstr(Mov)('RAX', mem('gs:[0x1122334455667788]')) TestInstr(Mov)('RAX', mem('gs:[0x60]')) TestInstr(Mov)('RCX', 0x1122334455667788) +TestInstr(Mov)('RCX', -1) +TestInstr(Mov)('RCX', -0x1000) +TestInstr(Mov)('RCX', 0xffffffff) +TestInstr(Mov)('RAX', 0xffffffff) TestInstr(Mov)('R8', 0x1122334455667788) TestInstr(Mov)('RCX', -1) TestInstr(Mov, immediat_accepted=-1)('RCX', 0xffffffffffffffff)