diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-01-25 18:39:22 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-01-25 18:39:22 -0800 |
commit | 85164f4483132a3db4890defa59f6851a0f765fe (patch) | |
tree | 6e3b24f811d9096ccc0f9f7348ffca9a373dec62 /gen_x86.c | |
parent | 2f0568e574b82160e0112d0b2f726df1a18176ab (diff) |
Fix overflow flag on ASL
Diffstat (limited to 'gen_x86.c')
-rw-r--r-- | gen_x86.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -35,6 +35,7 @@ #define OP_MOV_IEA 0xC6 #define OP_SHIFTROT_1 0xD0 #define OP_SHIFTROT_CL 0xD2 +#define OP_LOOP 0xE2 #define OP_CALL 0xE8 #define OP_JMP 0xE9 #define OP_JMP_BYTE 0xEB @@ -1533,4 +1534,10 @@ uint8_t * cdq(uint8_t * out) return out; } - +uint8_t * loop(uint8_t * out, uint8_t * dst) +{ + ptrdiff_t disp = dst-(out+2); + *(out++) = OP_LOOP; + *(out++) = disp; + return out; +} |