coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
decode.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FETCH_DECODE_MODRM(mod, rh, rl)   fetch_decode_modrm(&mod,&rh,&rl)
 
#define DECODE_RM_BYTE_REGISTER(r)   decode_rm_byte_register(r)
 
#define DECODE_RM_WORD_REGISTER(r)   decode_rm_word_register(r)
 
#define DECODE_RM_LONG_REGISTER(r)   decode_rm_long_register(r)
 
#define DECODE_CLEAR_SEGOVR()   M.x86.mode &= ~SYSMODE_CLRMASK
 

Functions

void x86emu_intr_raise (u8 type)
 
void fetch_decode_modrm (int *mod, int *regh, int *regl)
 
u8 fetch_byte_imm (void)
 
u16 fetch_word_imm (void)
 
u32 fetch_long_imm (void)
 
u8 fetch_data_byte (uint offset)
 
u8 fetch_data_byte_abs (uint segment, uint offset)
 
u16 fetch_data_word (uint offset)
 
u16 fetch_data_word_abs (uint segment, uint offset)
 
u32 fetch_data_long (uint offset)
 
u32 fetch_data_long_abs (uint segment, uint offset)
 
void store_data_byte (uint offset, u8 val)
 
void store_data_byte_abs (uint segment, uint offset, u8 val)
 
void store_data_word (uint offset, u16 val)
 
void store_data_word_abs (uint segment, uint offset, u16 val)
 
void store_data_long (uint offset, u32 val)
 
void store_data_long_abs (uint segment, uint offset, u32 val)
 
u8decode_rm_byte_register (int reg)
 
u16decode_rm_word_register (int reg)
 
u32decode_rm_long_register (int reg)
 
u16decode_rm_seg_register (int reg)
 
unsigned int decode_rm00_address (int rm)
 
unsigned int decode_rm01_address (int rm)
 
unsigned int decode_rm10_address (int rm)
 
unsigned int decode_rmXX_address (int mod, int rm)
 

Macro Definition Documentation

◆ DECODE_CLEAR_SEGOVR

#define DECODE_CLEAR_SEGOVR ( )    M.x86.mode &= ~SYSMODE_CLRMASK

Definition at line 50 of file decode.h.

◆ DECODE_RM_BYTE_REGISTER

#define DECODE_RM_BYTE_REGISTER (   r)    decode_rm_byte_register(r)

Definition at line 47 of file decode.h.

◆ DECODE_RM_LONG_REGISTER

#define DECODE_RM_LONG_REGISTER (   r)    decode_rm_long_register(r)

Definition at line 49 of file decode.h.

◆ DECODE_RM_WORD_REGISTER

#define DECODE_RM_WORD_REGISTER (   r)    decode_rm_word_register(r)

Definition at line 48 of file decode.h.

◆ FETCH_DECODE_MODRM

#define FETCH_DECODE_MODRM (   mod,
  rh,
  rl 
)    fetch_decode_modrm(&mod,&rh,&rl)

Definition at line 46 of file decode.h.

Function Documentation

◆ decode_rm00_address()

◆ decode_rm01_address()

◆ decode_rm10_address()

◆ decode_rm_byte_register()

u8* decode_rm_byte_register ( int  reg)

Definition at line 562 of file decode.c.

References DECODE_PRINTF, HALT_SYS, M, and NULL.

◆ decode_rm_long_register()

u32* decode_rm_long_register ( int  reg)

Definition at line 650 of file decode.c.

References DECODE_PRINTF, HALT_SYS, M, and NULL.

◆ decode_rm_seg_register()

u16* decode_rm_seg_register ( int  reg)

Definition at line 695 of file decode.c.

References DECODE_PRINTF, HALT_SYS, M, and NULL.

Referenced by x86emuOp_mov_word_RM_SR(), and x86emuOp_mov_word_SR_RM().

Here is the caller graph for this function:

◆ decode_rm_word_register()

u16* decode_rm_word_register ( int  reg)

Definition at line 606 of file decode.c.

References DECODE_PRINTF, HALT_SYS, M, and NULL.

◆ decode_rmXX_address()

unsigned int decode_rmXX_address ( int  mod,
int  rm 
)

Definition at line 1138 of file decode.c.

References decode_rm00_address(), decode_rm01_address(), and decode_rm10_address().

Referenced by x86emuOp2_bsf(), x86emuOp2_bsr(), x86emuOp2_bt_R(), x86emuOp2_btc_R(), x86emuOp2_btr_R(), x86emuOp2_bts_R(), x86emuOp2_btX_I(), x86emuOp2_imul_R_RM(), x86emuOp2_lfs_R_IMM(), x86emuOp2_lgs_R_IMM(), x86emuOp2_lss_R_IMM(), x86emuOp2_movsx_byte_R_RM(), x86emuOp2_movsx_word_R_RM(), x86emuOp2_movzx_byte_R_RM(), x86emuOp2_movzx_word_R_RM(), x86emuOp2_set_byte(), x86emuOp2_shld_CL(), x86emuOp2_shld_IMM(), x86emuOp2_shrd_CL(), x86emuOp2_shrd_IMM(), x86emuOp_genop_byte_R_RM(), x86emuOp_genop_byte_RM_R(), x86emuOp_genop_word_R_RM(), x86emuOp_genop_word_RM_R(), x86emuOp_imul_byte_IMM(), x86emuOp_imul_word_IMM(), x86emuOp_lds_R_IMM(), x86emuOp_lea_word_R_M(), x86emuOp_les_R_IMM(), x86emuOp_mov_byte_R_RM(), x86emuOp_mov_byte_RM_IMM(), x86emuOp_mov_byte_RM_R(), x86emuOp_mov_word_R_RM(), x86emuOp_mov_word_RM_IMM(), x86emuOp_mov_word_RM_R(), x86emuOp_mov_word_RM_SR(), x86emuOp_mov_word_SR_RM(), x86emuOp_opc80_byte_RM_IMM(), x86emuOp_opc81_word_RM_IMM(), x86emuOp_opc82_byte_RM_IMM(), x86emuOp_opc83_word_RM_IMM(), x86emuOp_opcC0_byte_RM_MEM(), x86emuOp_opcC1_word_RM_MEM(), x86emuOp_opcD0_byte_RM_1(), x86emuOp_opcD1_word_RM_1(), x86emuOp_opcD2_byte_RM_CL(), x86emuOp_opcD3_word_RM_CL(), x86emuOp_opcF6_byte_RM(), x86emuOp_opcF7_word_RM(), x86emuOp_opcFE_byte_RM(), x86emuOp_opcFF_word_RM(), x86emuOp_pop_RM(), x86emuOp_test_byte_RM_R(), x86emuOp_test_word_RM_R(), x86emuOp_xchg_byte_RM_R(), and x86emuOp_xchg_word_RM_R().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch_byte_imm()

◆ fetch_data_byte()

◆ fetch_data_byte_abs()

u8 fetch_data_byte_abs ( uint  segment,
uint  offset 
)

Definition at line 363 of file decode.c.

References CHECK_DATA_ACCESS, offset, and x86emu_check_data_access().

Referenced by single_out(), x86emuOp_cmps_byte(), and x86emuOp_scas_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch_data_long()

◆ fetch_data_long_abs()

u32 fetch_data_long_abs ( uint  segment,
uint  offset 
)

Definition at line 405 of file decode.c.

References CHECK_DATA_ACCESS, offset, and x86emu_check_data_access().

Referenced by single_out(), x86emuOp_cmps_word(), and x86emuOp_scas_word().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch_data_word()

◆ fetch_data_word_abs()

u16 fetch_data_word_abs ( uint  segment,
uint  offset 
)

Definition at line 384 of file decode.c.

References CHECK_DATA_ACCESS, offset, and x86emu_check_data_access().

Referenced by single_out(), x86emuOp_cmps_word(), x86emuOp_enter(), and x86emuOp_scas_word().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fetch_decode_modrm()

void fetch_decode_modrm ( int *  mod,
int *  regh,
int *  regl 
)

Definition at line 152 of file decode.c.

References CHECK_IP_FETCH, DB, INC_DECODED_INST_LEN, M, and x86emu_check_ip_access().

Here is the call graph for this function:

◆ fetch_long_imm()

◆ fetch_word_imm()

◆ store_data_byte()

◆ store_data_byte_abs()

void store_data_byte_abs ( uint  segment,
uint  offset,
u8  val 
)

Definition at line 493 of file decode.c.

References CHECK_DATA_ACCESS, offset, val, and x86emu_check_data_access().

Referenced by single_in(), x86emuOp_movs_byte(), and x86emuOp_stos_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ store_data_long()

◆ store_data_long_abs()

void store_data_long_abs ( uint  segment,
uint  offset,
u32  val 
)

Definition at line 539 of file decode.c.

References CHECK_DATA_ACCESS, offset, val, and x86emu_check_data_access().

Referenced by single_in(), x86emuOp_movs_word(), and x86emuOp_stos_word().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ store_data_word()

◆ store_data_word_abs()

void store_data_word_abs ( uint  segment,
uint  offset,
u16  val 
)

Definition at line 516 of file decode.c.

References CHECK_DATA_ACCESS, offset, val, and x86emu_check_data_access().

Referenced by single_in(), x86emuOp_movs_word(), and x86emuOp_stos_word().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ x86emu_intr_raise()

void x86emu_intr_raise ( u8  type)

Definition at line 77 of file decode.c.

References INTR_SYNCH, M, printf, and x86emu_dump_regs().

Referenced by div_byte(), div_long(), div_word(), idiv_byte(), idiv_long(), and idiv_word().

Here is the call graph for this function:
Here is the caller graph for this function: