diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-09-13 21:06:25 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-09-13 21:06:25 -0700 |
commit | 44ccdde6fced7672b184be82b4eaf994c1c705c5 (patch) | |
tree | 7ee628871001a1704a9174ab600803d699dd0058 /gen_x86.c | |
parent | 5ce0a0e79020bd6e9e42bc32f706b208066d7ec0 (diff) |
Preserve original address when retranslating instructions instead of switching to the lowest alias
Diffstat (limited to 'gen_x86.c')
-rw-r--r-- | gen_x86.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1307,6 +1307,15 @@ void mov_ir(code_info *code, int64_t val, uint8_t dst, uint8_t size) code->cur = out; } +uint8_t is_mov_ir(code_ptr inst) +{ + while (*inst == PRE_SIZE || *inst == PRE_REX) + { + inst++; + } + return (*inst & 0xF8) == OP_MOV_I8R || (*inst & 0xF8) == OP_MOV_IR || (*inst & 0xFE) == OP_MOV_IEA; +} + void mov_irdisp(code_info *code, int32_t val, uint8_t dst, int32_t disp, uint8_t size) { check_alloc_code(code, 12); |