mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fix x64 Mov Reg, Imm32 (sign extended)
This commit is contained in:
@@ -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())]
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user