diff options
author | Mike Pavone <pavone@retrodev.com> | 2012-12-28 17:57:43 -0800 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2012-12-28 17:57:43 -0800 |
commit | c7827141fecf66bc83c5cbb1cd0a38fd925e2689 (patch) | |
tree | 6e75a422071112c0350c13f9304857fe47435ac2 /gen_x86.c | |
parent | bd5260222653289a71a49fa5093e33204112b3e0 (diff) |
Implement scc (untested)
Diffstat (limited to 'gen_x86.c')
-rw-r--r-- | gen_x86.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1069,6 +1069,19 @@ uint8_t * setcc_rind(uint8_t * out, uint8_t cc, uint8_t dst) return out; } +uint8_t * setcc_rdisp8(uint8_t * out, uint8_t cc, uint8_t dst, int8_t disp) +{ + if (dst >= R8) { + *(out++) = PRE_REX | REX_RM_FIELD; + dst -= R8 - X86_R8; + } + *(out++) = PRE_2BYTE; + *(out++) = OP2_SETCC | cc; + *(out++) = MODE_REG_DISPLACE8 | dst; + *(out++) = disp; + return out; +} + uint8_t * bt_rr(uint8_t * out, uint8_t src, uint8_t dst, uint8_t size) { if (size == SZ_W) { |