coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ops2.c File Reference
#include "x86emui.h"
Include dependency graph for ops2.c:

Go to the source code of this file.

Macros

#define SMSW_INITIAL_VALUE   0x10
 
#define xorl(a, b)   (((a) && !(b)) || (!(a) && (b)))
 

Functions

static void x86emuOp2_illegal_op (u8 op2)
 
static void x86emuOp2_opc_01 (u8 op2)
 
static void x86emuOp2_invd (u8 op2)
 
static void x86emuOp2_wbinvd (u8 op2)
 
static void x86emuOp2_wrmsr (u8 op2)
 
static void x86emuOp2_rdtsc (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_rdmsr (u8 op2)
 
int x86emu_check_jump_condition (u8 op)
 
static void x86emuOp2_long_jump (u8 op2)
 
static s32 x86emu_bswap (s32 reg)
 
static void x86emuOp2_bswap (u8 op2)
 
static void x86emuOp2_set_byte (u8 op2)
 
static void x86emuOp2_push_FS (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_pop_FS (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_cpuid (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_bt_R (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_shld_IMM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_shld_CL (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_push_GS (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_pop_GS (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_bts_R (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_shrd_IMM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_shrd_CL (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_imul_R_RM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_lss_R_IMM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_btr_R (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_lfs_R_IMM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_lgs_R_IMM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_movzx_byte_R_RM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_movzx_word_R_RM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_btX_I (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_btc_R (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_bsf (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_bsr (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_movsx_byte_R_RM (u8 X86EMU_UNUSED(op2))
 
static void x86emuOp2_movsx_word_R_RM (u8 X86EMU_UNUSED(op2))
 

Variables

void(* x86emu_optab2 [256])(u8)
 

Macro Definition Documentation

◆ SMSW_INITIAL_VALUE

#define SMSW_INITIAL_VALUE   0x10

◆ xorl

#define xorl (   a,
 
)    (((a) && !(b)) || (!(a) && (b)))

Definition at line 209 of file ops2.c.

Function Documentation

◆ x86emu_bswap()

static s32 x86emu_bswap ( s32  reg)
static

Definition at line 309 of file ops2.c.

Referenced by x86emuOp2_bswap().

Here is the caller graph for this function:

◆ x86emu_check_jump_condition()

int x86emu_check_jump_condition ( u8  op)

Definition at line 215 of file ops2.c.

References ACCESS_FLAG, DECODE_PRINTF, F_CF, F_OF, F_PF, F_SF, F_ZF, and xorl.

Referenced by x86emuOp2_long_jump(), and x86emuOp_jump_near_cond().

Here is the caller graph for this function:

◆ x86emuOp2_bsf()

static void x86emuOp2_bsf ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_bsr()

static void x86emuOp2_bsr ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_bswap()

static void x86emuOp2_bswap ( u8  op2)
static

Definition at line 320 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, START_OF_INSTR, TRACE_AND_STEP, and x86emu_bswap().

Here is the call graph for this function:

◆ x86emuOp2_bt_R()

static void x86emuOp2_bt_R ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_btc_R()

◆ x86emuOp2_btr_R()

◆ x86emuOp2_bts_R()

◆ x86emuOp2_btX_I()

◆ x86emuOp2_cpuid()

static void x86emuOp2_cpuid ( u8   X86EMU_UNUSEDop2)
static

Definition at line 492 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, START_OF_INSTR, TRACE_AND_STEP, and x86emu_cpuid().

Here is the call graph for this function:

◆ x86emuOp2_illegal_op()

static void x86emuOp2_illegal_op ( u8  op2)
static

Definition at line 52 of file ops2.c.

References DECODE_PRINTF, END_OF_INSTR, HALT_SYS, M, printf, START_OF_INSTR, and TRACE_REGS.

◆ x86emuOp2_imul_R_RM()

static void x86emuOp2_imul_R_RM ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_invd()

static void x86emuOp2_invd ( u8  op2)
static

Definition at line 121 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, START_OF_INSTR, and TRACE_AND_STEP.

◆ x86emuOp2_lfs_R_IMM()

static void x86emuOp2_lfs_R_IMM ( u8   X86EMU_UNUSEDop2)
static

Definition at line 1128 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, DECODE_RM_WORD_REGISTER, decode_rmXX_address(), END_OF_INSTR, fetch_data_word(), FETCH_DECODE_MODRM, M, START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_lgs_R_IMM()

static void x86emuOp2_lgs_R_IMM ( u8   X86EMU_UNUSEDop2)
static

Definition at line 1157 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, DECODE_RM_WORD_REGISTER, decode_rmXX_address(), END_OF_INSTR, fetch_data_word(), FETCH_DECODE_MODRM, M, START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_long_jump()

static void x86emuOp2_long_jump ( u8  op2)
static

Definition at line 285 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF2, END_OF_INSTR, fetch_word_imm(), JMP_TRACE, M, START_OF_INSTR, TRACE_AND_STEP, and x86emu_check_jump_condition().

Here is the call graph for this function:

◆ x86emuOp2_lss_R_IMM()

static void x86emuOp2_lss_R_IMM ( u8   X86EMU_UNUSEDop2)
static

Definition at line 1027 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, DECODE_RM_WORD_REGISTER, decode_rmXX_address(), END_OF_INSTR, fetch_data_word(), FETCH_DECODE_MODRM, M, START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_movsx_byte_R_RM()

static void x86emuOp2_movsx_byte_R_RM ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_movsx_word_R_RM()

static void x86emuOp2_movsx_word_R_RM ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_movzx_byte_R_RM()

static void x86emuOp2_movzx_byte_R_RM ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_movzx_word_R_RM()

static void x86emuOp2_movzx_word_R_RM ( u8   X86EMU_UNUSEDop2)
static

◆ x86emuOp2_opc_01()

◆ x86emuOp2_pop_FS()

static void x86emuOp2_pop_FS ( u8   X86EMU_UNUSEDop2)
static

Definition at line 478 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, pop_word(), START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_pop_GS()

static void x86emuOp2_pop_GS ( u8   X86EMU_UNUSEDop2)
static

Definition at line 716 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, pop_word(), START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_push_FS()

static void x86emuOp2_push_FS ( u8   X86EMU_UNUSEDop2)
static

Definition at line 464 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, push_word(), START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_push_GS()

static void x86emuOp2_push_GS ( u8   X86EMU_UNUSEDop2)
static

Definition at line 702 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, push_word(), START_OF_INSTR, and TRACE_AND_STEP.

Here is the call graph for this function:

◆ x86emuOp2_rdmsr()

static void x86emuOp2_rdmsr ( u8  op2)
static

Definition at line 196 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, START_OF_INSTR, and TRACE_AND_STEP.

◆ x86emuOp2_rdtsc()

static void x86emuOp2_rdtsc ( u8   X86EMU_UNUSEDop2)
static

Definition at line 162 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, M, START_OF_INSTR, and TRACE_AND_STEP.

◆ x86emuOp2_set_byte()

static void x86emuOp2_set_byte ( u8  op2)
static

◆ x86emuOp2_shld_CL()

◆ x86emuOp2_shld_IMM()

◆ x86emuOp2_shrd_CL()

◆ x86emuOp2_shrd_IMM()

◆ x86emuOp2_wbinvd()

static void x86emuOp2_wbinvd ( u8  op2)
static

Definition at line 134 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, START_OF_INSTR, and TRACE_AND_STEP.

◆ x86emuOp2_wrmsr()

static void x86emuOp2_wrmsr ( u8  op2)
static

Definition at line 147 of file ops2.c.

References DECODE_CLEAR_SEGOVR, DECODE_PRINTF, END_OF_INSTR, START_OF_INSTR, and TRACE_AND_STEP.

Variable Documentation

◆ x86emu_optab2

void(* x86emu_optab2[256])(u8) ( u8  op2)

Definition at line 1711 of file ops2.c.

Referenced by x86emuOp_two_byte().