comparison gen_x86.c @ 117:fb7944d3ed5c

Fix call_r in gen_x86 so that it properly returns a pointer to the location after the generated instruction
author Mike Pavone <pavone@retrodev.com>
date Fri, 28 Dec 2012 21:25:00 -0800
parents e3594572fb98
children bd3858121ab0
comparison
equal deleted inserted replaced
116:9eaba47c429d 117:fb7944d3ed5c
1262 1262
1263 uint8_t * call_r(uint8_t * out, uint8_t dst) 1263 uint8_t * call_r(uint8_t * out, uint8_t dst)
1264 { 1264 {
1265 *(out++) = OP_SINGLE_EA; 1265 *(out++) = OP_SINGLE_EA;
1266 *(out++) = MODE_REG_DIRECT | dst | (OP_EX_CALL_EA << 3); 1266 *(out++) = MODE_REG_DIRECT | dst | (OP_EX_CALL_EA << 3);
1267 return out;
1267 } 1268 }
1268 1269
1269 uint8_t * retn(uint8_t * out) 1270 uint8_t * retn(uint8_t * out)
1270 { 1271 {
1271 *(out++) = OP_RETN; 1272 *(out++) = OP_RETN;