Files
86Box/src/cpu/fetchdat.fnd

2061 lines
113 KiB
Plaintext
Raw Normal View History

---------- 386.H
---------- 386_COMMON.H
#define getbytef() ((uint8_t)(fetchdat)); cpu_state.pc++
#define getwordf() ((uint16_t)(fetchdat)); cpu_state.pc+=2
#define getbyte2f() ((uint8_t)(fetchdat>>8)); cpu_state.pc++
#define getword2f() ((uint16_t)(fetchdat>>8)); cpu_state.pc+=2
#define fetchdat rmdat32
---------- 386_OPS.H
static int ILLEGAL(uint32_t fetchdat)
pclog("Illegal instruction %08X (%02X)\n", fetchdat, fopcode);
static int op0F_w_a16(uint32_t fetchdat)
int opcode = fetchdat & 0xff;
return x86_opcodes_0f[opcode](fetchdat >> 8);
static int op0F_l_a16(uint32_t fetchdat)
int opcode = fetchdat & 0xff;
return x86_opcodes_0f[opcode | 0x100](fetchdat >> 8);
static int op0F_w_a32(uint32_t fetchdat)
int opcode = fetchdat & 0xff;
return x86_opcodes_0f[opcode | 0x200](fetchdat >> 8);
static int op0F_l_a32(uint32_t fetchdat)
int opcode = fetchdat & 0xff;
return x86_opcodes_0f[opcode | 0x300](fetchdat >> 8);
---------- CODEGEN.H
void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
extern void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
extern void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32);
void (*prefix)(uint8_t prefix, uint32_t fetchdat);
void (*opcode)(uint8_t opcode, uint32_t fetchdat, int op_32);
---------- CODEGEN_OPS.H
typedef uint32_t (*RecompOpFn)(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block);
---------- CODEGEN_OPS_ARITH.H
static uint32_t ropINC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropINC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropDEC_rw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropDEC_rl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t rop ## name ## _b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_B(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_B((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_W(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_W((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_L(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_L((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_B(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_B((fetchdat >> 3) & 7); \
static uint32_t rop ## name ## _w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_W(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_W((fetchdat >> 3) & 7); \
static uint32_t rop ## name ## _l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_L(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_L((fetchdat >> 3) & 7); \
static uint32_t ropCMP_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_B(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_B((fetchdat >> 3) & 7);
static uint32_t ropCMP_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_W(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_W((fetchdat >> 3) & 7);
static uint32_t ropCMP_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_L(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_L((fetchdat >> 3) & 7);
static uint32_t ropCMP_b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
dst_reg = LOAD_REG_B(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
src_reg = LOAD_REG_B((fetchdat >> 3) & 7);
static uint32_t ropCMP_w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
dst_reg = LOAD_REG_W(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
src_reg = LOAD_REG_W((fetchdat >> 3) & 7);
static uint32_t ropCMP_l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
dst_reg = LOAD_REG_L(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
src_reg = LOAD_REG_L((fetchdat >> 3) & 7);
static uint32_t ropADD_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ADD_HOST_REG_IMM_B(host_reg, fetchdat & 0xff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xff);
static uint32_t ropADD_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
ADD_HOST_REG_IMM_W(host_reg, fetchdat & 0xffff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xffff);
static uint32_t ropADD_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
ADD_HOST_REG_IMM(host_reg, fetchdat);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat);
static uint32_t ropCMP_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = CMP_HOST_REG_IMM_B(host_reg, fetchdat & 0xff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xff);
static uint32_t ropCMP_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = CMP_HOST_REG_IMM_W(host_reg, fetchdat & 0xffff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xffff);
static uint32_t ropCMP_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
host_reg = CMP_HOST_REG_IMM_L(host_reg, fetchdat);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat);
static uint32_t ropSUB_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
SUB_HOST_REG_IMM_B(host_reg, fetchdat & 0xff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xff);
static uint32_t ropSUB_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
SUB_HOST_REG_IMM_W(host_reg, fetchdat & 0xffff);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat & 0xffff);
static uint32_t ropSUB_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
SUB_HOST_REG_IMM(host_reg, fetchdat);
STORE_IMM_ADDR_L((uintptr_t)&cpu_state.flags_op2, fetchdat);
static uint32_t rop80(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) == 0x10)
if ((fetchdat & 0xc0) != 0xc0)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x38) == 0x38)
host_reg = LOAD_REG_B(fetchdat & 7);
imm = (fetchdat >> 8) & 0xff;
switch (fetchdat & 0x38)
if ((fetchdat & 0x38) != 0x38)
if ((fetchdat & 0xc0) != 0xc0)
static uint32_t rop81_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) == 0x10)
if ((fetchdat & 0xc0) != 0xc0)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x38) == 0x38)
host_reg = LOAD_REG_W(fetchdat & 7);
imm = (fetchdat >> 8) & 0xffff;
switch (fetchdat & 0x38)
if ((fetchdat & 0x38) != 0x38)
if ((fetchdat & 0xc0) != 0xc0)
static uint32_t rop81_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) == 0x10)
if ((fetchdat & 0xc0) != 0xc0)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x38) == 0x38)
host_reg = LOAD_REG_L(fetchdat & 7);
switch (fetchdat & 0x38)
if ((fetchdat & 0x38) != 0x38)
if ((fetchdat & 0xc0) != 0xc0)
static uint32_t rop83_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) == 0x10)
if ((fetchdat & 0xc0) != 0xc0)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x38) == 0x38)
host_reg = LOAD_REG_W(fetchdat & 7);
imm = (fetchdat >> 8) & 0xff;
switch (fetchdat & 0x38)
if ((fetchdat & 0x38) != 0x38)
if ((fetchdat & 0xc0) != 0xc0)
static uint32_t rop83_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) == 0x10)
if ((fetchdat & 0xc0) != 0xc0)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x38) == 0x38)
host_reg = LOAD_REG_L(fetchdat & 7);
imm = (fetchdat >> 8) & 0xff;
switch (fetchdat & 0x38)
if ((fetchdat & 0x38) != 0x38)
if ((fetchdat & 0xc0) != 0xc0)
---------- CODEGEN_OPS_FPU.H
static uint32_t ropFXCH(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFLD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFST(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSTP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFLDs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFLDd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFILDw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFILDl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFILDq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFSTs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFSTd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFSTPs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t new_pc = ropFSTs(opcode, fetchdat, op_32, op_pc, block);
static uint32_t ropFSTPd(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t new_pc = ropFSTd(opcode, fetchdat, op_32, op_pc, block);
static uint32_t ropF ## name ## size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
static uint32_t ropF ## name ## size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
static uint32_t ropF ## name ## P ## size(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
uint32_t new_pc = ropF ## name ## size(opcode, fetchdat, op_32, op_pc, block); \
/*static uint32_t ropFADDs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFDIVs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFMULs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFSUBs(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFADD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFCOM(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIV(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIVR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFMUL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUB(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUBR(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFADDr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIVr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIVRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFMULr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUBr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUBRr(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFADDP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFCOMP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIVP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFDIVRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFMULP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUBP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSUBRP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFCOMPP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFSTSW_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFISTw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFISTl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFISTPw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t new_pc = ropFISTw(opcode, fetchdat, op_32, op_pc, block);
static uint32_t ropFISTPl(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t new_pc = ropFISTl(opcode, fetchdat, op_32, op_pc, block);
static uint32_t ropFISTPq(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFLDCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFSTCW(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFLD ## name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropFLDLN2(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
---------- CODEGEN_OPS_JUMP.H
static uint32_t ropJMP_r8(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t offset = fetchdat & 0xff;
static uint32_t ropJMP_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t offset = fetchdat & 0xffff;
static uint32_t ropJMP_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropJCXZ(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t offset = fetchdat & 0xff;
static uint32_t ropLOOP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t offset = fetchdat & 0xff;
static uint32_t rop ## name(uint8_t opcode, uint32_t fetchdat, \
uint32_t offset = fetchdat & 0xff; \
uint32_t fetchdat, uint32_t op_32, \
uint32_t offset = fetchdat & 0xffff; \
uint32_t fetchdat, uint32_t op_32, \
---------- CODEGEN_OPS_LOGIC.H
static uint32_t rop ## name ## _b_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_B(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_B((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _w_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_W(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_W((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _l_rmw(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
dst_reg = LOAD_REG_L(fetchdat & 7); \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
src_reg = LOAD_REG_L((fetchdat >> 3) & 7); \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t rop ## name ## _b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_B(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_B((fetchdat >> 3) & 7); \
static uint32_t rop ## name ## _w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_W(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_W((fetchdat >> 3) & 7); \
static uint32_t rop ## name ## _l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
src_reg = LOAD_REG_L(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
dst_reg = LOAD_REG_L((fetchdat >> 3) & 7); \
static uint32_t ropTEST_b_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_B(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_B((fetchdat >> 3) & 7);
static uint32_t ropTEST_w_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_W(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_W((fetchdat >> 3) & 7);
static uint32_t ropTEST_l_rm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
src_reg = LOAD_REG_L(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
dst_reg = LOAD_REG_L((fetchdat >> 3) & 7);
static uint32_t ropAND_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
AND_HOST_REG_IMM(host_reg, (fetchdat & 0xff) | 0xffffff00);
static uint32_t ropAND_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
AND_HOST_REG_IMM(host_reg, (fetchdat & 0xffff) | 0xffff0000);
static uint32_t ropAND_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
AND_HOST_REG_IMM(host_reg, fetchdat);
static uint32_t ropOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
OR_HOST_REG_IMM(host_reg, fetchdat & 0xff);
static uint32_t ropOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
OR_HOST_REG_IMM(host_reg, fetchdat & 0xffff);
static uint32_t ropOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
OR_HOST_REG_IMM(host_reg, fetchdat);
static uint32_t ropTEST_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = TEST_HOST_REG_IMM(host_reg, fetchdat & 0xff);
static uint32_t ropTEST_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = TEST_HOST_REG_IMM(host_reg, fetchdat & 0xffff);
static uint32_t ropTEST_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
host_reg = TEST_HOST_REG_IMM(host_reg, fetchdat);
static uint32_t ropXOR_AL_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
XOR_HOST_REG_IMM(host_reg, fetchdat & 0xff);
static uint32_t ropXOR_AX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
XOR_HOST_REG_IMM(host_reg, fetchdat & 0xffff);
static uint32_t ropXOR_EAX_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
XOR_HOST_REG_IMM(host_reg, fetchdat);
static uint32_t ropF6(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_B(fetchdat & 7);
imm = (fetchdat >> 8) & 0xff;
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_B(fetchdat & 7);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_B(fetchdat & 7);
static uint32_t ropF7_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_W(fetchdat & 7);
imm = (fetchdat >> 8) & 0xffff;
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_W(fetchdat & 7);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_W(fetchdat & 7);
static uint32_t ropF7_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_L(fetchdat & 7);
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_L(fetchdat & 7);
if ((fetchdat & 0xc0) != 0xc0)
host_reg = LOAD_REG_L(fetchdat & 7);
---------- CODEGEN_OPS_MISC.H
static uint32_t ropNOP(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropCLD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropSTD(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropCLI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropSTI(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropFE(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) != 0x00)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_B(fetchdat & 7);
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
static uint32_t ropFF_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) != 0x00 && (fetchdat & 0x08))
if ((fetchdat & 0x30) == 0x00)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_W(fetchdat & 7);
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x30) != 0x00)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
if ((fetchdat & 0xc0) == 0xc0)
static uint32_t ropFF_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x30) != 0x00 && (fetchdat & 0x08))
if ((fetchdat & 0x30) == 0x00)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_L(fetchdat & 7);
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
if ((fetchdat & 0x30) != 0x00)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
if ((fetchdat & 0xc0) == 0xc0)
---------- CODEGEN_OPS_MMX.H
static uint32_t ropMOVQ_q_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
LOAD_MMX_Q((fetchdat >> 3) & 7, &host_reg1, &host_reg2);
if ((fetchdat & 0xc0) == 0xc0)
STORE_MMX_Q(fetchdat & 7, host_reg1, host_reg2);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOVQ_mm_q(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
LOAD_MMX_Q(fetchdat & 7, &host_reg1, &host_reg2);
STORE_MMX_Q((fetchdat >> 3) & 7, host_reg1, host_reg2);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_MMX_Q((fetchdat >> 3) & 7, LOAD_Q_REG_1, LOAD_Q_REG_2);
static uint32_t ropMOVD_l_mm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = LOAD_MMX_D((fetchdat >> 3) & 7);
if ((fetchdat & 0xc0) == 0xc0)
STORE_REG_TARGET_L_RELEASE(host_reg, fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOVD_mm_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_L(fetchdat & 7);
STORE_MMX_LQ((fetchdat >> 3) & 7, host_reg);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_MMX_LQ((fetchdat >> 3) & 7, 0);
static uint32_t name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
if ((fetchdat & 0xc0) == 0xc0) \
xmm_src = LOAD_MMX_Q_MMX(fetchdat & 7); \
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
xmm_dst = LOAD_MMX_Q_MMX((fetchdat >> 3) & 7); \
STORE_MMX_Q_MMX((fetchdat >> 3) & 7, xmm_dst); \
static uint32_t ropPSxxW_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
if ((fetchdat & 0x08) || !(fetchdat & 0x30))
xmm_dst = LOAD_MMX_Q_MMX(fetchdat & 7);
switch (fetchdat & 0x38)
MMX_PSRLW_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSRAW_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSLLW_imm(xmm_dst, (fetchdat >> 8) & 0xff);
STORE_MMX_Q_MMX(fetchdat & 7, xmm_dst);
static uint32_t ropPSxxD_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
if ((fetchdat & 0x08) || !(fetchdat & 0x30))
xmm_dst = LOAD_MMX_Q_MMX(fetchdat & 7);
switch (fetchdat & 0x38)
MMX_PSRLD_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSRAD_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSLLD_imm(xmm_dst, (fetchdat >> 8) & 0xff);
STORE_MMX_Q_MMX(fetchdat & 7, xmm_dst);
static uint32_t ropPSxxQ_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
if ((fetchdat & 0x08) || !(fetchdat & 0x30))
xmm_dst = LOAD_MMX_Q_MMX(fetchdat & 7);
switch (fetchdat & 0x38)
MMX_PSRLQ_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSRAQ_imm(xmm_dst, (fetchdat >> 8) & 0xff);
MMX_PSLLQ_imm(xmm_dst, (fetchdat >> 8) & 0xff);
STORE_MMX_Q_MMX(fetchdat & 7, xmm_dst);
static uint32_t ropEMMS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
---------- CODEGEN_OPS_MOV.H
static uint32_t ropMOV_rb_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
STORE_IMM_REG_B(opcode & 7, fetchdat & 0xff);
static uint32_t ropMOV_rw_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
STORE_IMM_REG_W(opcode & 7, fetchdat & 0xffff);
static uint32_t ropMOV_rl_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
fetchdat = fastreadl(cs + op_pc);
STORE_IMM_REG_L(opcode & 7, fetchdat);
static uint32_t ropMOV_b_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
int host_reg = LOAD_REG_B((fetchdat >> 3) & 7);
if ((fetchdat & 0xc0) == 0xc0)
STORE_REG_TARGET_B_RELEASE(host_reg, fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_w_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
int host_reg = LOAD_REG_W((fetchdat >> 3) & 7);
if ((fetchdat & 0xc0) == 0xc0)
STORE_REG_TARGET_W_RELEASE(host_reg, fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_l_r(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
host_reg = LOAD_REG_L((fetchdat >> 3) & 7);
if ((fetchdat & 0xc0) == 0xc0)
STORE_REG_TARGET_L_RELEASE(host_reg, fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_r_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_B(fetchdat & 7);
STORE_REG_TARGET_B_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_B_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOV_r_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_W(fetchdat & 7);
STORE_REG_TARGET_W_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_W_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOV_r_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_L(fetchdat & 7);
STORE_REG_TARGET_L_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_L_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOV_b_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
STORE_IMM_REG_B(fetchdat & 7, (fetchdat >> 8) & 0xff);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_w_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
STORE_IMM_REG_W(fetchdat & 7, (fetchdat >> 8) & 0xffff);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_l_imm(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
STORE_IMM_REG_L(fetchdat & 7, imm);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_AL_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropMOV_AX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropMOV_EAX_a(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropMOV_a_AL(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropMOV_a_AX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropMOV_a_EAX(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropLEA_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
int dest_reg = (fetchdat >> 3) & 7;
if ((fetchdat & 0xc0) == 0xc0)
FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropLEA_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
int dest_reg = (fetchdat >> 3) & 7;
if ((fetchdat & 0xc0) == 0xc0)
FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOVZX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_B(fetchdat & 7);
STORE_REG_TARGET_W_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_W_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOVZX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_B(fetchdat & 7);
STORE_REG_TARGET_L_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_L_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOVZX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_W(fetchdat & 7);
STORE_REG_TARGET_L_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_L_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOVSX_w_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_B(fetchdat & 7);
STORE_REG_TARGET_W_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_W_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOVSX_l_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_B(fetchdat & 7);
STORE_REG_TARGET_L_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_L_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOVSX_l_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) == 0xc0)
int host_reg = LOAD_REG_W(fetchdat & 7);
STORE_REG_TARGET_L_RELEASE(host_reg, (fetchdat >> 3) & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
STORE_REG_TARGET_L_RELEASE(0, (fetchdat >> 3) & 7);
static uint32_t ropMOV_w_seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
STORE_REG_TARGET_L_RELEASE(host_reg, fetchdat & 7);
STORE_REG_TARGET_W_RELEASE(host_reg, fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
static uint32_t ropMOV_seg_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
switch (fetchdat & 0x38)
if ((fetchdat & 0xc0) == 0xc0)
host_reg = LOAD_REG_W(fetchdat & 7);
x86seg *target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32);
switch (fetchdat & 0x38)
static uint32_t ropL ## seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
int dest_reg = (fetchdat >> 3) & 7; \
if ((fetchdat & 0xc0) == 0xc0) \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
---------- CODEGEN_OPS_SHIFT.H
if ((fetchdat & 0xc0) == 0xc0) \
reg = LOAD_REG_ ## size(fetchdat & 7); \
if (immediate) count = (fetchdat >> 8) & 0x1f; \
target_seg = FETCH_EA(op_ea_seg, fetchdat, op_ssegs, &op_pc, op_32); \
switch (fetchdat & 0x38) \
if ((fetchdat & 0xc0) == 0xc0) \
static uint32_t ropC0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
static uint32_t ropC1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
static uint32_t ropC1_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
static uint32_t ropD0(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
static uint32_t ropD1_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
static uint32_t ropD1_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0x38) < 0x20)
---------- CODEGEN_OPS_STACK.H
static uint32_t ropPUSH_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropPUSH_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropPUSH_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t imm = fetchdat & 0xffff;
static uint32_t ropPUSH_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropPUSH_imm_b16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t imm = fetchdat & 0xff;
static uint32_t ropPUSH_imm_b32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint32_t imm = fetchdat & 0xff;
static uint32_t ropPOP_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropPOP_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropRET_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropRET_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropRET_imm_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t offset = fetchdat & 0xffff;
static uint32_t ropRET_imm_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t offset = fetchdat & 0xffff;
static uint32_t ropCALL_r16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
uint16_t offset = fetchdat & 0xffff;
static uint32_t ropCALL_r32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropLEAVE_16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropLEAVE_32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
static uint32_t ropPUSH_ ## seg ## _16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropPUSH_ ## seg ## _32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropPOP_ ## seg ## _16(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropPOP_ ## seg ## _32(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
---------- CODEGEN_OPS_X86-64.H
addbyte(0xb9); /*MOVL $fetchdat,%ecx*/
addbyte(0xbf); /*MOVL $fetchdat,%edi*/
addbyte(0xb9); /*MOVL $fetchdat,%ecx*/
addbyte(0xbf); /*MOVL $fetchdat,%edi*/
addbyte(0xba); /*MOVL $fetchdat,%edx*/
addbyte(0xbe); /*MOVL $fetchdat,%esi*/
addbyte(0xba); /*MOVL $fetchdat,%edx*/
addbyte(0xbe); /*MOVL $fetchdat,%esi*/
static x86seg *FETCH_EA_16(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc)
int mod = (fetchdat >> 6) & 3;
int rm = fetchdat & 7;
addlong((fetchdat >> 8) & 0xffff);
addbyte((fetchdat >> 8) & 0xff);
addbyte((fetchdat >> 8) & 0xff);
addlong((fetchdat >> 8) & 0xffff);
addlong((fetchdat >> 8) & 0xffff);
static x86seg *FETCH_EA_32(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, int stack_offset)
int mod = (fetchdat >> 6) & 3;
int rm = fetchdat & 7;
uint8_t sib = fetchdat >> 8;
addbyte((fetchdat >> 16) & 0xff);
addbyte((fetchdat >> 16) & 0xff);
addbyte((fetchdat >> 8) & 0xff);
static inline x86seg *FETCH_EA(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, uint32_t op_32)
return FETCH_EA_32(op_ea_seg, fetchdat, op_ssegs, op_pc, 0);
return FETCH_EA_16(op_ea_seg, fetchdat, op_ssegs, op_pc);
---------- CODEGEN_OPS_X86.H
static inline x86seg *FETCH_EA_16(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc)
int mod = (fetchdat >> 6) & 3;
int rm = fetchdat & 7;
addlong((fetchdat >> 8) & 0xffff);
addlong((fetchdat >> 8) & 0xffff);
static inline x86seg *FETCH_EA_32(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, int stack_offset)
int mod = (fetchdat >> 6) & 3;
int rm = fetchdat & 7;
uint8_t sib = fetchdat >> 8;
addbyte((int8_t)(fetchdat >> 8));
static inline x86seg *FETCH_EA(x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, uint32_t op_32)
return FETCH_EA_32(op_ea_seg, fetchdat, op_ssegs, op_pc, 0);
return FETCH_EA_16(op_ea_seg, fetchdat, op_ssegs, op_pc);
---------- CODEGEN_OPS_XCHG.H
static uint32_t ropXCHG_AX_ ## reg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropXCHG_EAX_ ## reg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \
static uint32_t ropXCHG_b(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
dst_reg = LOAD_REG_B(fetchdat & 7);
src_reg = LOAD_REG_B((fetchdat >> 3) & 7);
STORE_REG_TARGET_B_RELEASE(dst_reg, (fetchdat >> 3) & 7);
STORE_REG_TARGET_B_RELEASE(temp_reg, fetchdat & 7);
static uint32_t ropXCHG_w(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
dst_reg = LOAD_REG_W(fetchdat & 7);
src_reg = LOAD_REG_W((fetchdat >> 3) & 7);
STORE_REG_TARGET_W_RELEASE(dst_reg, (fetchdat >> 3) & 7);
STORE_REG_TARGET_W_RELEASE(temp_reg, fetchdat & 7);
static uint32_t ropXCHG_l(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
if ((fetchdat & 0xc0) != 0xc0)
dst_reg = LOAD_REG_L(fetchdat & 7);
src_reg = LOAD_REG_L((fetchdat >> 3) & 7);
STORE_REG_TARGET_L_RELEASE(dst_reg, (fetchdat >> 3) & 7);
STORE_REG_TARGET_L_RELEASE(temp_reg, fetchdat & 7);
---------- CODEGEN_TIMING_COMMON.H
static inline uint32_t get_addr_regmask(uint64_t data, uint32_t fetchdat, int op_32)
uint8_t modrm = fetchdat & 0xff;
uint8_t sib = (fetchdat >> 8) & 0xff;
static inline uint32_t get_srcdep_mask(uint64_t data, uint32_t fetchdat, int bit8, int op_32)
int reg = (fetchdat >> 3) & 7;
int reg = fetchdat & 7;
mask |= get_addr_regmask(data, fetchdat, op_32);
static inline uint32_t get_dstdep_mask(uint64_t data, uint32_t fetchdat, int bit8)
int reg = (fetchdat >> 3) & 7;
int reg = fetchdat & 7;
---------- CODEGEN_X86-64.H
---------- CODEGEN_X86.H
---------- CPU.H
---------- X86.H
---------- X86SEG.H
---------- X86_FLAGS.H
---------- X86_OPS.H
typedef int (*OpFn)(uint32_t fetchdat);
---------- X86_OPS_AMD.H
static int opSYSCALL(uint32_t fetchdat)
static int opSYSRET(uint32_t fetchdat)
---------- X86_OPS_ARITH.H
static int op ## name ## _b_rmw_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _b_rmw_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _w_rmw_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _w_rmw_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _l_rmw_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _l_rmw_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _b_rm_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _b_rm_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _w_rm_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _w_rm_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _l_rm_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## name ## _l_rm_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## name ## _AL_imm(uint32_t fetchdat) \
static int op ## name ## _AX_imm(uint32_t fetchdat) \
static int op ## name ## _EAX_imm(uint32_t fetchdat) \
static int opCMP_b_rmw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_b_rmw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_w_rmw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_w_rmw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_l_rmw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_l_rmw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_b_rm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_b_rm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_w_rm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_w_rm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_l_rm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMP_l_rm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMP_AL_imm(uint32_t fetchdat)
static int opCMP_AX_imm(uint32_t fetchdat)
static int opCMP_EAX_imm(uint32_t fetchdat)
static int opTEST_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opTEST_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opTEST_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opTEST_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opTEST_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opTEST_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opTEST_AL(uint32_t fetchdat)
static int opTEST_AX(uint32_t fetchdat)
static int opTEST_EAX(uint32_t fetchdat)
static int op80_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op80_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int op81_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op81_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int op81_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op81_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int op83_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op83_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int op83_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op83_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_ATOMIC.H
static int opCMPXCHG_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMPXCHG_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMPXCHG_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMPXCHG_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMPXCHG_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMPXCHG_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMPXCHG8B_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opCMPXCHG8B_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXADD_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXADD_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXADD_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXADD_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXADD_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXADD_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_BCD.H
static int opAAA(uint32_t fetchdat)
static int opAAD(uint32_t fetchdat)
static int opAAM(uint32_t fetchdat)
static int opAAS(uint32_t fetchdat)
static int opDAA(uint32_t fetchdat)
static int opDAS(uint32_t fetchdat)
---------- X86_OPS_BIT.H
static int opBT_w_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBT_w_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBT_l_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBT_l_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBT ## name ## _w_r_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opBT ## name ## _w_r_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int opBT ## name ## _l_r_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opBT ## name ## _l_r_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int opBA_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBA_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBA_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBA_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_BITSCAN.H
static int opBSF_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBSF_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBSF_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBSF_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBSR_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBSR_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBSR_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBSR_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_CALL.H
static int opCALL_far_w(uint32_t fetchdat)
static int opCALL_far_l(uint32_t fetchdat)
static int opFF_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFF_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFF_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFF_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_FLAG.H
static int opCMC(uint32_t fetchdat)
static int opCLC(uint32_t fetchdat)
static int opCLD(uint32_t fetchdat)
static int opCLI(uint32_t fetchdat)
static int opSTC(uint32_t fetchdat)
static int opSTD(uint32_t fetchdat)
static int opSTI(uint32_t fetchdat)
static int opSAHF(uint32_t fetchdat)
static int opLAHF(uint32_t fetchdat)
static int opPUSHF(uint32_t fetchdat)
static int opPUSHFD(uint32_t fetchdat)
static int opPOPF_286(uint32_t fetchdat)
static int opPOPF(uint32_t fetchdat)
static int opPOPFD(uint32_t fetchdat)
---------- X86_OPS_FPU.H
static int opESCAPE_d8_a16(uint32_t fetchdat)
return x86_opcodes_d8_a16[(fetchdat >> 3) & 0x1f](fetchdat);
static int opESCAPE_d8_a32(uint32_t fetchdat)
return x86_opcodes_d8_a32[(fetchdat >> 3) & 0x1f](fetchdat);
static int opESCAPE_d9_a16(uint32_t fetchdat)
return x86_opcodes_d9_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_d9_a32(uint32_t fetchdat)
return x86_opcodes_d9_a32[fetchdat & 0xff](fetchdat);
static int opESCAPE_da_a16(uint32_t fetchdat)
return x86_opcodes_da_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_da_a32(uint32_t fetchdat)
return x86_opcodes_da_a32[fetchdat & 0xff](fetchdat);
static int opESCAPE_db_a16(uint32_t fetchdat)
return x86_opcodes_db_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_db_a32(uint32_t fetchdat)
return x86_opcodes_db_a32[fetchdat & 0xff](fetchdat);
static int opESCAPE_dc_a16(uint32_t fetchdat)
return x86_opcodes_dc_a16[(fetchdat >> 3) & 0x1f](fetchdat);
static int opESCAPE_dc_a32(uint32_t fetchdat)
return x86_opcodes_dc_a32[(fetchdat >> 3) & 0x1f](fetchdat);
static int opESCAPE_dd_a16(uint32_t fetchdat)
return x86_opcodes_dd_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_dd_a32(uint32_t fetchdat)
return x86_opcodes_dd_a32[fetchdat & 0xff](fetchdat);
static int opESCAPE_de_a16(uint32_t fetchdat)
return x86_opcodes_de_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_de_a32(uint32_t fetchdat)
return x86_opcodes_de_a32[fetchdat & 0xff](fetchdat);
static int opESCAPE_df_a16(uint32_t fetchdat)
return x86_opcodes_df_a16[fetchdat & 0xff](fetchdat);
static int opESCAPE_df_a32(uint32_t fetchdat)
return x86_opcodes_df_a32[fetchdat & 0xff](fetchdat);
static int opWAIT(uint32_t fetchdat)
---------- X86_OPS_I686.H
static int opSYSENTER(uint32_t fetchdat)
static int opSYSEXIT(uint32_t fetchdat)
static int opFXSAVESTOR_a16(uint32_t fetchdat)
if (CPUID < 0x650) return ILLEGAL(fetchdat);
fetch_ea_16(fetchdat);
static int opFXSAVESTOR_a32(uint32_t fetchdat)
if (CPUID < 0x650) return ILLEGAL(fetchdat);
fetch_ea_32(fetchdat);
---------- X86_OPS_INC_DEC.H
static int op ## name (uint32_t fetchdat) \
static int opINCDEC_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opINCDEC_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_INT.H
static int opINT3(uint32_t fetchdat)
static int opINT1(uint32_t fetchdat)
static int opINT(uint32_t fetchdat)
static int opINTO(uint32_t fetchdat)
---------- X86_OPS_IO.H
static int opIN_AL_imm(uint32_t fetchdat)
static int opIN_AX_imm(uint32_t fetchdat)
static int opIN_EAX_imm(uint32_t fetchdat)
static int opOUT_AL_imm(uint32_t fetchdat)
static int opOUT_AX_imm(uint32_t fetchdat)
static int opOUT_EAX_imm(uint32_t fetchdat)
static int opIN_AL_DX(uint32_t fetchdat)
static int opIN_AX_DX(uint32_t fetchdat)
static int opIN_EAX_DX(uint32_t fetchdat)
static int opOUT_AL_DX(uint32_t fetchdat)
static int opOUT_AX_DX(uint32_t fetchdat)
static int opOUT_EAX_DX(uint32_t fetchdat)
---------- X86_OPS_JUMP.H
static int opJ ## condition(uint32_t fetchdat) \
static int opJ ## condition ## _w(uint32_t fetchdat) \
static int opJ ## condition ## _l(uint32_t fetchdat) \
static int opLOOPNE_w(uint32_t fetchdat)
static int opLOOPNE_l(uint32_t fetchdat)
static int opLOOPE_w(uint32_t fetchdat)
static int opLOOPE_l(uint32_t fetchdat)
static int opLOOP_w(uint32_t fetchdat)
static int opLOOP_l(uint32_t fetchdat)
static int opJCXZ(uint32_t fetchdat)
static int opJECXZ(uint32_t fetchdat)
static int opJMP_r8(uint32_t fetchdat)
static int opJMP_r16(uint32_t fetchdat)
static int opJMP_r32(uint32_t fetchdat)
static int opJMP_far_a16(uint32_t fetchdat)
static int opJMP_far_a32(uint32_t fetchdat)
static int opCALL_r16(uint32_t fetchdat)
static int opCALL_r32(uint32_t fetchdat)
static int opRET_w(uint32_t fetchdat)
static int opRET_l(uint32_t fetchdat)
static int opRET_w_imm(uint32_t fetchdat)
static int opRET_l_imm(uint32_t fetchdat)
---------- X86_OPS_MISC.H
static int opCBW(uint32_t fetchdat)
static int opCWDE(uint32_t fetchdat)
static int opCWD(uint32_t fetchdat)
static int opCDQ(uint32_t fetchdat)
static int opNOP(uint32_t fetchdat)
static int opSETALC(uint32_t fetchdat)
static int opF6_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opF6_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opF7_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opF7_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opF7_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opF7_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opHLT(uint32_t fetchdat)
static int opLOCK(uint32_t fetchdat)
fetchdat = fastreadl(cs + cpu_state.pc);
ILLEGAL_ON((fetchdat & 0xff) == 0x90);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int opBOUND_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBOUND_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opBOUND_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opBOUND_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCLTS(uint32_t fetchdat)
static int opINVD(uint32_t fetchdat)
static int opWBINVD(uint32_t fetchdat)
static int opLOADALL(uint32_t fetchdat)
static int opLOADALL386(uint32_t fetchdat)
static int opCPUID(uint32_t fetchdat)
static int opRDMSR(uint32_t fetchdat)
static int opWRMSR(uint32_t fetchdat)
---------- X86_OPS_MMX.H
static int opEMMS(uint32_t fetchdat)
---------- X86_OPS_MMX_ARITH.H
static int opPADDB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDSB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDSB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDUSB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDUSB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDSW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDSW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPADDUSW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPADDUSW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPMADDWD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPMADDWD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPMULLW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPMULLW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPMULHW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPMULHW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBSB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBSB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBUSB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBUSB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBSW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBSW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSUBUSW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSUBUSW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MMX_CMP.H
static int opPCMPEQB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPEQB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPCMPGTB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPGTB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPCMPEQW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPEQW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPCMPGTW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPGTW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPCMPEQD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPEQD_a32(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPGTD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPCMPGTD_a32(uint32_t fetchdat)
fetch_ea_16(fetchdat);
---------- X86_OPS_MMX_LOGIC.H
static int opPAND_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPAND_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPANDN_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPANDN_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPOR_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPOR_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPXOR_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPXOR_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MMX_MOV.H
static int opMOVD_l_mm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVD_l_mm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVD_mm_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVD_mm_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVQ_q_mm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVQ_q_mm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVQ_mm_q_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVQ_mm_q_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MMX_PACK.H
static int opPUNPCKLDQ_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKLDQ_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPUNPCKHDQ_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKHDQ_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPUNPCKLBW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKLBW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPUNPCKHBW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKHBW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPUNPCKLWD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKLWD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPUNPCKHWD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPUNPCKHWD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPACKSSWB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPACKSSWB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPACKUSWB_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPACKUSWB_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPACKSSDW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPACKSSDW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MMX_SHIFT.H
static int opPSxxW_imm(uint32_t fetchdat)
int reg = fetchdat & 7;
int op = fetchdat & 0x38;
int shift = (fetchdat >> 8) & 0xff;
static int opPSLLW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSLLW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSRLW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSRLW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSRAW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSRAW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSxxD_imm(uint32_t fetchdat)
int reg = fetchdat & 7;
int op = fetchdat & 0x38;
int shift = (fetchdat >> 8) & 0xff;
static int opPSLLD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSLLD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSRLD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSRLD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSRAD_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSRAD_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSxxQ_imm(uint32_t fetchdat)
int reg = fetchdat & 7;
int op = fetchdat & 0x38;
int shift = (fetchdat >> 8) & 0xff;
static int opPSLLQ_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSLLQ_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPSRLQ_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPSRLQ_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MOV.H
static int opMOV_AL_imm(uint32_t fetchdat)
static int opMOV_AH_imm(uint32_t fetchdat)
static int opMOV_BL_imm(uint32_t fetchdat)
static int opMOV_BH_imm(uint32_t fetchdat)
static int opMOV_CL_imm(uint32_t fetchdat)
static int opMOV_CH_imm(uint32_t fetchdat)
static int opMOV_DL_imm(uint32_t fetchdat)
static int opMOV_DH_imm(uint32_t fetchdat)
static int opMOV_AX_imm(uint32_t fetchdat)
static int opMOV_BX_imm(uint32_t fetchdat)
static int opMOV_CX_imm(uint32_t fetchdat)
static int opMOV_DX_imm(uint32_t fetchdat)
static int opMOV_SI_imm(uint32_t fetchdat)
static int opMOV_DI_imm(uint32_t fetchdat)
static int opMOV_BP_imm(uint32_t fetchdat)
static int opMOV_SP_imm(uint32_t fetchdat)
static int opMOV_EAX_imm(uint32_t fetchdat)
static int opMOV_EBX_imm(uint32_t fetchdat)
static int opMOV_ECX_imm(uint32_t fetchdat)
static int opMOV_EDX_imm(uint32_t fetchdat)
static int opMOV_ESI_imm(uint32_t fetchdat)
static int opMOV_EDI_imm(uint32_t fetchdat)
static int opMOV_EBP_imm(uint32_t fetchdat)
static int opMOV_ESP_imm(uint32_t fetchdat)
static int opMOV_b_imm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_b_imm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_w_imm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_w_imm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_l_imm_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_l_imm_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_AL_a16(uint32_t fetchdat)
static int opMOV_AL_a32(uint32_t fetchdat)
static int opMOV_AX_a16(uint32_t fetchdat)
static int opMOV_AX_a32(uint32_t fetchdat)
static int opMOV_EAX_a16(uint32_t fetchdat)
static int opMOV_EAX_a32(uint32_t fetchdat)
static int opMOV_a16_AL(uint32_t fetchdat)
static int opMOV_a32_AL(uint32_t fetchdat)
static int opMOV_a16_AX(uint32_t fetchdat)
static int opMOV_a32_AX(uint32_t fetchdat)
static int opMOV_a16_EAX(uint32_t fetchdat)
static int opMOV_a32_EAX(uint32_t fetchdat)
static int opLEA_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLEA_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opLEA_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLEA_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXLAT_a16(uint32_t fetchdat)
static int opXLAT_a32(uint32_t fetchdat)
static int opMOV_b_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_b_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_w_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_w_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_l_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_l_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_r_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_r_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_r_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opCMOV ## condition ## _w_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opCMOV ## condition ## _w_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int opCMOV ## condition ## _l_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opCMOV ## condition ## _l_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
---------- X86_OPS_MOVX.H
static int opMOVZX_w_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVZX_w_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVZX_l_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVZX_l_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVZX_w_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVZX_w_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVZX_l_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVZX_l_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVSX_w_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVSX_w_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVSX_l_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVSX_l_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOVSX_l_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOVSX_l_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_MOV_CTRL.H
static int opMOV_r_CRx_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_CRx_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_r_DRx_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_DRx_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_CRx_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_CRx_r_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_DRx_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_DRx_r_a32(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_TRx_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_r_TRx_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_TRx_r_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_TRx_r_a32(uint32_t fetchdat)
fetch_ea_16(fetchdat);
---------- X86_OPS_MOV_SEG.H
static int opMOV_w_seg_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_w_seg_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_l_seg_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opMOV_l_seg_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opMOV_seg_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
fetchdat = fastreadl(cs + cpu_state.pc);
x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int opMOV_seg_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
fetchdat = fastreadl(cs + cpu_state.pc);
x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int opLDS_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLDS_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opLDS_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLDS_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opLSS_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLSS_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opLSS_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opLSS_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opL ## name ## _w_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opL ## name ## _w_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int opL ## name ## _l_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opL ## name ## _l_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
---------- X86_OPS_MSR.H
static int opRDTSC(uint32_t fetchdat)
static int opRDPMC(uint32_t fetchdat)
---------- X86_OPS_MUL.H
static int opIMUL_w_iw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_w_iw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opIMUL_l_il_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_l_il_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opIMUL_w_ib_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_w_ib_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opIMUL_l_ib_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_l_ib_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opIMUL_w_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_w_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opIMUL_l_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opIMUL_l_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X86_OPS_PMODE.H
static int opARPL_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opARPL_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opLAR_ ## name(uint32_t fetchdat) \
fetch_ea(fetchdat); \
static int opLSL_ ## name(uint32_t fetchdat) \
fetch_ea(fetchdat); \
static int op0F00_common(uint32_t fetchdat, int ea32)
static int op0F00_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
return op0F00_common(fetchdat, 0);
static int op0F00_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
return op0F00_common(fetchdat, 1);
static int op0F01_common(uint32_t fetchdat, int is32, int is286, int ea32)
static int op0F01_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
return op0F01_common(fetchdat, 0, 0, 0);
static int op0F01_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
return op0F01_common(fetchdat, 0, 0, 1);
static int op0F01_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
return op0F01_common(fetchdat, 1, 0, 0);
static int op0F01_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
return op0F01_common(fetchdat, 1, 0, 1);
static int op0F01_286(uint32_t fetchdat)
fetch_ea_16(fetchdat);
return op0F01_common(fetchdat, 0, 1, 0);
---------- X86_OPS_PREFIX.H
static int op ## name ## _w_a16(uint32_t fetchdat) \
fetchdat = fastreadl(cs + cpu_state.pc); \
if (opcode_table[fetchdat & 0xff]) \
return opcode_table[fetchdat & 0xff](fetchdat >> 8); \
return normal_opcode_table[fetchdat & 0xff](fetchdat >> 8); \
static int op ## name ## _l_a16(uint32_t fetchdat) \
fetchdat = fastreadl(cs + cpu_state.pc); \
if (opcode_table[(fetchdat & 0xff) | 0x100]) \
return opcode_table[(fetchdat & 0xff) | 0x100](fetchdat >> 8); \
return normal_opcode_table[(fetchdat & 0xff) | 0x100](fetchdat >> 8); \
static int op ## name ## _w_a32(uint32_t fetchdat) \
fetchdat = fastreadl(cs + cpu_state.pc); \
if (opcode_table[(fetchdat & 0xff) | 0x200]) \
return opcode_table[(fetchdat & 0xff) | 0x200](fetchdat >> 8); \
return normal_opcode_table[(fetchdat & 0xff) | 0x200](fetchdat >> 8); \
static int op ## name ## _l_a32(uint32_t fetchdat) \
fetchdat = fastreadl(cs + cpu_state.pc); \
if (opcode_table[(fetchdat & 0xff) | 0x300]) \
return opcode_table[(fetchdat & 0xff) | 0x300](fetchdat >> 8); \
return normal_opcode_table[(fetchdat & 0xff) | 0x300](fetchdat >> 8); \
static int op_66(uint32_t fetchdat) /*Data size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int op_67(uint32_t fetchdat) /*Address size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int op_66_REPE(uint32_t fetchdat) /*Data size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int op_67_REPE(uint32_t fetchdat) /*Address size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int op_66_REPNE(uint32_t fetchdat) /*Data size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int op_67_REPNE(uint32_t fetchdat) /*Address size select*/
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
---------- X86_OPS_REP.H
static int opREP_INSB_ ## size(uint32_t fetchdat) \
static int opREP_INSW_ ## size(uint32_t fetchdat) \
static int opREP_INSL_ ## size(uint32_t fetchdat) \
static int opREP_OUTSB_ ## size(uint32_t fetchdat) \
static int opREP_OUTSW_ ## size(uint32_t fetchdat) \
static int opREP_OUTSL_ ## size(uint32_t fetchdat) \
static int opREP_MOVSB_ ## size(uint32_t fetchdat) \
static int opREP_MOVSW_ ## size(uint32_t fetchdat) \
static int opREP_MOVSL_ ## size(uint32_t fetchdat) \
static int opREP_STOSB_ ## size(uint32_t fetchdat) \
static int opREP_STOSW_ ## size(uint32_t fetchdat) \
static int opREP_STOSL_ ## size(uint32_t fetchdat) \
static int opREP_LODSB_ ## size(uint32_t fetchdat) \
static int opREP_LODSW_ ## size(uint32_t fetchdat) \
static int opREP_LODSL_ ## size(uint32_t fetchdat) \
static int opREP_CMPSB_ ## size(uint32_t fetchdat) \
static int opREP_CMPSW_ ## size(uint32_t fetchdat) \
static int opREP_CMPSL_ ## size(uint32_t fetchdat) \
static int opREP_SCASB_ ## size(uint32_t fetchdat) \
static int opREP_SCASW_ ## size(uint32_t fetchdat) \
static int opREP_SCASL_ ## size(uint32_t fetchdat) \
static int opREPNE(uint32_t fetchdat)
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPNE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int opREPE(uint32_t fetchdat)
fetchdat = fastreadl(cs + cpu_state.pc);
if (x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32])
return x86_opcodes_REPE[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
---------- X86_OPS_RET.H
static int opRETF_a16(uint32_t fetchdat)
static int opRETF_a32(uint32_t fetchdat)
static int opRETF_a16_imm(uint32_t fetchdat)
static int opRETF_a32_imm(uint32_t fetchdat)
static int opIRET_286(uint32_t fetchdat)
static int opIRET(uint32_t fetchdat)
static int opIRETD(uint32_t fetchdat)
---------- X86_OPS_SET.H
static int opSET ## condition ## _a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int opSET ## condition ## _a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
---------- X86_OPS_SHIFT.H
static int opC0_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opC0_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opC1_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opC1_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opC1_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opC1_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD0_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD0_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD1_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD1_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD1_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD1_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD2_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD2_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD3_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD3_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opD3_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opD3_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int op ## operation ## _i_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## operation ## _CL_a16(uint32_t fetchdat) \
fetch_ea_16(fetchdat); \
static int op ## operation ## _i_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
static int op ## operation ## _CL_a32(uint32_t fetchdat) \
fetch_ea_32(fetchdat); \
---------- X86_OPS_STACK.H
static int opPUSH_ ## reg (uint32_t fetchdat) \
static int opPUSH_ ## reg (uint32_t fetchdat) \
static int opPOP_ ## reg (uint32_t fetchdat) \
static int opPOP_ ## reg (uint32_t fetchdat) \
static int opPUSHA_w(uint32_t fetchdat)
static int opPUSHA_l(uint32_t fetchdat)
static int opPOPA_w(uint32_t fetchdat)
static int opPOPA_l(uint32_t fetchdat)
static int opPUSH_imm_w(uint32_t fetchdat)
static int opPUSH_imm_l(uint32_t fetchdat)
static int opPUSH_imm_bw(uint32_t fetchdat)
static int opPUSH_imm_bl(uint32_t fetchdat)
static int opPOPW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPOPW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opPOPL_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opPOPL_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opENTER_w(uint32_t fetchdat)
count = (fetchdat >> 16) & 0xff; cpu_state.pc++;
static int opENTER_l(uint32_t fetchdat)
count = (fetchdat >> 16) & 0xff; cpu_state.pc++;
static int opLEAVE_w(uint32_t fetchdat)
static int opLEAVE_l(uint32_t fetchdat)
static int opPUSH_ ## seg ## _w(uint32_t fetchdat) \
static int opPUSH_ ## seg ## _l(uint32_t fetchdat) \
static int opPOP_ ## seg ## _w(uint32_t fetchdat) \
static int opPOP_ ## seg ## _l(uint32_t fetchdat) \
static int opPOP_SS_w(uint32_t fetchdat)
fetchdat = fastreadl(cs + cpu_state.pc);
x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
static int opPOP_SS_l(uint32_t fetchdat)
fetchdat = fastreadl(cs + cpu_state.pc);
x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
---------- X86_OPS_STRING.H
static int opMOVSB_a16(uint32_t fetchdat)
static int opMOVSB_a32(uint32_t fetchdat)
static int opMOVSW_a16(uint32_t fetchdat)
static int opMOVSW_a32(uint32_t fetchdat)
static int opMOVSL_a16(uint32_t fetchdat)
static int opMOVSL_a32(uint32_t fetchdat)
static int opCMPSB_a16(uint32_t fetchdat)
static int opCMPSB_a32(uint32_t fetchdat)
static int opCMPSW_a16(uint32_t fetchdat)
static int opCMPSW_a32(uint32_t fetchdat)
static int opCMPSL_a16(uint32_t fetchdat)
static int opCMPSL_a32(uint32_t fetchdat)
static int opSTOSB_a16(uint32_t fetchdat)
static int opSTOSB_a32(uint32_t fetchdat)
static int opSTOSW_a16(uint32_t fetchdat)
static int opSTOSW_a32(uint32_t fetchdat)
static int opSTOSL_a16(uint32_t fetchdat)
static int opSTOSL_a32(uint32_t fetchdat)
static int opLODSB_a16(uint32_t fetchdat)
static int opLODSB_a32(uint32_t fetchdat)
static int opLODSW_a16(uint32_t fetchdat)
static int opLODSW_a32(uint32_t fetchdat)
static int opLODSL_a16(uint32_t fetchdat)
static int opLODSL_a32(uint32_t fetchdat)
static int opSCASB_a16(uint32_t fetchdat)
static int opSCASB_a32(uint32_t fetchdat)
static int opSCASW_a16(uint32_t fetchdat)
static int opSCASW_a32(uint32_t fetchdat)
static int opSCASL_a16(uint32_t fetchdat)
static int opSCASL_a32(uint32_t fetchdat)
static int opINSB_a16(uint32_t fetchdat)
static int opINSB_a32(uint32_t fetchdat)
static int opINSW_a16(uint32_t fetchdat)
static int opINSW_a32(uint32_t fetchdat)
static int opINSL_a16(uint32_t fetchdat)
static int opINSL_a32(uint32_t fetchdat)
static int opOUTSB_a16(uint32_t fetchdat)
static int opOUTSB_a32(uint32_t fetchdat)
static int opOUTSW_a16(uint32_t fetchdat)
static int opOUTSW_a32(uint32_t fetchdat)
static int opOUTSL_a16(uint32_t fetchdat)
static int opOUTSL_a32(uint32_t fetchdat)
---------- X86_OPS_XCHG.H
static int opXCHG_b_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXCHG_b_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXCHG_w_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXCHG_w_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXCHG_l_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opXCHG_l_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opXCHG_AX_BX(uint32_t fetchdat)
static int opXCHG_AX_CX(uint32_t fetchdat)
static int opXCHG_AX_DX(uint32_t fetchdat)
static int opXCHG_AX_SI(uint32_t fetchdat)
static int opXCHG_AX_DI(uint32_t fetchdat)
static int opXCHG_AX_BP(uint32_t fetchdat)
static int opXCHG_AX_SP(uint32_t fetchdat)
static int opXCHG_EAX_EBX(uint32_t fetchdat)
static int opXCHG_EAX_ECX(uint32_t fetchdat)
static int opXCHG_EAX_EDX(uint32_t fetchdat)
static int opXCHG_EAX_ESI(uint32_t fetchdat)
static int opXCHG_EAX_EDI(uint32_t fetchdat)
static int opXCHG_EAX_EBP(uint32_t fetchdat)
static int opXCHG_EAX_ESP(uint32_t fetchdat)
static int opBSWAP_ ## reg(uint32_t fetchdat) \
---------- X87.H
---------- X87_OPS.H
static int op_nofpu_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int op_nofpu_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int FPU_ILLEGAL_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int FPU_ILLEGAL_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X87_OPS_ARITH.H
static int opFADD ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFCOM ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFCOMP ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFDIV ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFDIVR ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFMUL ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFSUB ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFSUBR ## name ## _a ## a_size(uint32_t fetchdat) \
fetch_ea_ ## a_size(fetchdat); \
static int opFADD(uint32_t fetchdat)
ST(0) = ST(0) + ST(fetchdat & 7);
static int opFADDr(uint32_t fetchdat)
ST(fetchdat & 7) = ST(fetchdat & 7) + ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFADDP(uint32_t fetchdat)
ST(fetchdat & 7) = ST(fetchdat & 7) + ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFCOM(uint32_t fetchdat)
if (ST(0) == ST(fetchdat & 7)) cpu_state.npxs |= C3;
else if (ST(0) < ST(fetchdat & 7)) cpu_state.npxs |= C0;
static int opFCOMP(uint32_t fetchdat)
cpu_state.npxs |= x87_compare(ST(0), ST(fetchdat & 7));
static int opFCOMPP(uint32_t fetchdat)
static int opFUCOMPP(uint32_t fetchdat)
static int opFCOMI(uint32_t fetchdat)
if (ST(0) == ST(fetchdat & 7)) flags |= Z_FLAG;
else if (ST(0) < ST(fetchdat & 7)) flags |= C_FLAG;
static int opFCOMIP(uint32_t fetchdat)
if (ST(0) == ST(fetchdat & 7)) flags |= Z_FLAG;
else if (ST(0) < ST(fetchdat & 7)) flags |= C_FLAG;
static int opFDIV(uint32_t fetchdat)
x87_div(ST(0), ST(0), ST(fetchdat & 7));
static int opFDIVr(uint32_t fetchdat)
x87_div(ST(fetchdat & 7), ST(fetchdat & 7), ST(0));
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFDIVP(uint32_t fetchdat)
x87_div(ST(fetchdat & 7), ST(fetchdat & 7), ST(0));
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFDIVR(uint32_t fetchdat)
x87_div(ST(0), ST(fetchdat&7), ST(0));
static int opFDIVRr(uint32_t fetchdat)
x87_div(ST(fetchdat & 7), ST(0), ST(fetchdat & 7));
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFDIVRP(uint32_t fetchdat)
x87_div(ST(fetchdat & 7), ST(0), ST(fetchdat & 7));
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFMUL(uint32_t fetchdat)
ST(0) = ST(0) * ST(fetchdat & 7);
static int opFMULr(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0) * ST(fetchdat & 7);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFMULP(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0) * ST(fetchdat & 7);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFSUB(uint32_t fetchdat)
ST(0) = ST(0) - ST(fetchdat & 7);
static int opFSUBr(uint32_t fetchdat)
ST(fetchdat & 7) = ST(fetchdat & 7) - ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFSUBP(uint32_t fetchdat)
ST(fetchdat & 7) = ST(fetchdat & 7) - ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFSUBR(uint32_t fetchdat)
ST(0) = ST(fetchdat & 7) - ST(0);
static int opFSUBRr(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0) - ST(fetchdat & 7);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFSUBRP(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0) - ST(fetchdat & 7);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] &= ~TAG_UINT64;
static int opFUCOM(uint32_t fetchdat)
cpu_state.npxs |= x87_ucompare(ST(0), ST(fetchdat & 7));
static int opFUCOMP(uint32_t fetchdat)
cpu_state.npxs |= x87_ucompare(ST(0), ST(fetchdat & 7));
static int opFUCOMI(uint32_t fetchdat)
if (ST(0) == ST(fetchdat & 7)) flags |= Z_FLAG;
else if (ST(0) < ST(fetchdat & 7)) flags |= C_FLAG;
static int opFUCOMIP(uint32_t fetchdat)
if (ST(0) == ST(fetchdat & 7)) flags |= Z_FLAG;
else if (ST(0) < ST(fetchdat & 7)) flags |= C_FLAG;
---------- X87_OPS_LOADSTORE.H
static int opFILDiw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFILDiw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFISTiw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFISTiw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFISTPiw_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFISTPiw_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFILDiq_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFILDiq_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int FBSTP_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int FBSTP_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int FISTPiq_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int FISTPiq_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFILDil_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFILDil_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFISTil_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFISTil_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFISTPil_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFISTPil_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFLDe_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFLDe_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTPe_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTPe_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFLDd_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFLDd_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTd_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTd_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTPd_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTPd_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFLDs_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFLDs_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTs_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTs_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTPs_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTPs_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
---------- X87_OPS_MISC.H
static int opFSTSW_AX(uint32_t fetchdat)
static int opFNOP(uint32_t fetchdat)
static int opFCLEX(uint32_t fetchdat)
static int opFINIT(uint32_t fetchdat)
static int opFFREE(uint32_t fetchdat)
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] = 3;
static int opFFREEP(uint32_t fetchdat)
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] = 3; if (cpu_state.abrt) return 1;
static int opFST(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] = cpu_state.tag[cpu_state.TOP & 7];
static int opFSTP(uint32_t fetchdat)
ST(fetchdat & 7) = ST(0);
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] = cpu_state.tag[cpu_state.TOP & 7];
static int opFSTOR_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTOR_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSAVE_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSAVE_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTSW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTSW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFLD(uint32_t fetchdat)
if (fplog) pclog("FLD %f\n", ST(fetchdat & 7));
old_tag = cpu_state.tag[(cpu_state.TOP + fetchdat) & 7];
old_i64 = cpu_state.MM[(cpu_state.TOP + fetchdat) & 7].q;
x87_push(ST(fetchdat&7));
static int opFXCH(uint32_t fetchdat)
ST(0) = ST(fetchdat&7);
ST(fetchdat&7) = td;
cpu_state.tag[cpu_state.TOP] = cpu_state.tag[(cpu_state.TOP + fetchdat) & 7];
cpu_state.tag[(cpu_state.TOP + fetchdat) & 7] = old_tag;
cpu_state.MM[cpu_state.TOP].q = cpu_state.MM[(cpu_state.TOP + fetchdat) & 7].q;
cpu_state.MM[(cpu_state.TOP + fetchdat) & 7].q = old_i64;
static int opFCHS(uint32_t fetchdat)
static int opFABS(uint32_t fetchdat)
static int opFTST(uint32_t fetchdat)
static int opFXAM(uint32_t fetchdat)
static int opFLD1(uint32_t fetchdat)
static int opFLDL2T(uint32_t fetchdat)
static int opFLDL2E(uint32_t fetchdat)
static int opFLDPI(uint32_t fetchdat)
static int opFLDEG2(uint32_t fetchdat)
static int opFLDLN2(uint32_t fetchdat)
static int opFLDZ(uint32_t fetchdat)
static int opF2XM1(uint32_t fetchdat)
static int opFYL2X(uint32_t fetchdat)
static int opFYL2XP1(uint32_t fetchdat)
static int opFPTAN(uint32_t fetchdat)
static int opFPATAN(uint32_t fetchdat)
static int opFDECSTP(uint32_t fetchdat)
static int opFINCSTP(uint32_t fetchdat)
static int opFPREM(uint32_t fetchdat)
static int opFPREM1(uint32_t fetchdat)
static int opFSQRT(uint32_t fetchdat)
static int opFSINCOS(uint32_t fetchdat)
static int opFRNDINT(uint32_t fetchdat)
static int opFSCALE(uint32_t fetchdat)
static int opFSIN(uint32_t fetchdat)
static int opFCOS(uint32_t fetchdat)
static int opFLDENV_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFLDENV_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFLDCW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFLDCW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTENV_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTENV_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFSTCW_a16(uint32_t fetchdat)
fetch_ea_16(fetchdat);
static int opFSTCW_a32(uint32_t fetchdat)
fetch_ea_32(fetchdat);
static int opFCMOV ## condition(uint32_t fetchdat) \
if (fplog) pclog("FCMOV %f\n", ST(fetchdat & 7)); \
cpu_state.tag[cpu_state.TOP] = cpu_state.tag[(cpu_state.TOP + fetchdat) & 7]; \
cpu_state.MM[cpu_state.TOP].q = cpu_state.MM[(cpu_state.TOP + fetchdat) & 7].q; \
ST(0) = ST(fetchdat & 7); \