20 #ifndef __X86EMU_DECODE_H 21 #define __X86EMU_DECODE_H 27 #define FETCH_DECODE_MODRM(mod, rh, rl) fetch_decode_modrm(&mod, &rh, &rl) 28 #define DECODE_RM_BYTE_REGISTER(r) decode_rm_byte_register(r) 29 #define DECODE_RM_WORD_REGISTER(r) decode_rm_word_register(r) 30 #define DECODE_RM_LONG_REGISTER(r) decode_rm_long_register(r) 31 #define DECODE_CLEAR_SEGOVR() M.x86.mode &= ~SYSMODE_CLRMASK 39 void x86emu_intr_raise(u8 type);
40 void fetch_decode_modrm(
int *mod,
int *regh,
int *regl);
41 u8 fetch_byte_imm(
void);
42 u16 fetch_word_imm(
void);
43 u32 fetch_long_imm(
void);
44 u8 fetch_data_byte(uint offset);
45 u8 fetch_data_byte_abs(uint segment, uint offset);
46 u16 fetch_data_word(uint offset);
47 u16 fetch_data_word_abs(uint segment, uint offset);
48 u32 fetch_data_long(uint offset);
49 u32 fetch_data_long_abs(uint segment, uint offset);
50 void store_data_byte(uint offset, u8 val);
51 void store_data_byte_abs(uint segment, uint offset, u8 val);
52 void store_data_word(uint offset, u16 val);
53 void store_data_word_abs(uint segment, uint offset, u16 val);
54 void store_data_long(uint offset, u32 val);
55 void store_data_long_abs(uint segment, uint offset, u32 val);
56 u8 *decode_rm_byte_register(
int reg);
57 u16 *decode_rm_word_register(
int reg);
58 u32 *decode_rm_long_register(
int reg);
59 u16 *decode_rm_seg_register(
int reg);
60 u32 decode_rm00_address(
int rm);
61 u32 decode_rm01_address(
int rm);
62 u32 decode_rm10_address(
int rm);
63 u32 decode_sib_address(
int sib,
int mod);