comparison gen_x86.c @ 1465:5d41d0574863

Preserve original address when retranslating instructions instead of switching to the lowest alias
author Michael Pavone <pavone@retrodev.com>
date Wed, 13 Sep 2017 21:06:25 -0700
parents 101b5ce682fe
children 723f6381cffa
comparison
equal deleted inserted replaced
1464:ffe45c5b8390 1465:5d41d0574863
1305 } 1305 }
1306 } 1306 }
1307 code->cur = out; 1307 code->cur = out;
1308 } 1308 }
1309 1309
1310 uint8_t is_mov_ir(code_ptr inst)
1311 {
1312 while (*inst == PRE_SIZE || *inst == PRE_REX)
1313 {
1314 inst++;
1315 }
1316 return (*inst & 0xF8) == OP_MOV_I8R || (*inst & 0xF8) == OP_MOV_IR || (*inst & 0xFE) == OP_MOV_IEA;
1317 }
1318
1310 void mov_irdisp(code_info *code, int32_t val, uint8_t dst, int32_t disp, uint8_t size) 1319 void mov_irdisp(code_info *code, int32_t val, uint8_t dst, int32_t disp, uint8_t size)
1311 { 1320 {
1312 check_alloc_code(code, 12); 1321 check_alloc_code(code, 12);
1313 code_ptr out = code->cur; 1322 code_ptr out = code->cur;
1314 if (size == SZ_W) { 1323 if (size == SZ_W) {