![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include "x86emui.h"
Go to the source code of this file.
Macros | |
#define | PRIM_OPS_NO_REDEFINE_ASM |
#define | abs(x) |
#define | labs(x) |
#define | PARITY(x) (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0) |
#define | XOR2(x) (((x) ^ ((x)>>1)) & 0x1) |
Variables | |
static u32 | x86emu_parity_tab [8] |
#define abs | ( | x | ) |
Definition at line 103 of file prim_ops.c.
#define labs | ( | x | ) |
Definition at line 108 of file prim_ops.c.
#define PARITY | ( | x | ) | (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0) |
Definition at line 127 of file prim_ops.c.
#define PRIM_OPS_NO_REDEFINE_ASM |
Definition at line 100 of file prim_ops.c.
Definition at line 128 of file prim_ops.c.
Definition at line 217 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, F_AF, F_CF, SET_FLAG, and set_szp_flags_16().
Referenced by x86emuOp_aaa().
Definition at line 259 of file prim_ops.c.
References no_carry_byte_side_eff().
Referenced by x86emuOp_aad().
Definition at line 276 of file prim_ops.c.
References no_carry_byte_side_eff().
Referenced by x86emuOp_aam().
Definition at line 238 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, F_AF, F_CF, SET_FLAG, and set_szp_flags_16().
Referenced by x86emuOp_aas().
Definition at line 292 of file prim_ops.c.
References ACCESS_FLAG, calc_carry_chain(), F_CF, s, and set_szp_flags_8().
Definition at line 327 of file prim_ops.c.
References ACCESS_FLAG, calc_carry_chain(), CONDITIONAL_SET_FLAG, F_CF, s, and set_szp_flags_32().
Definition at line 309 of file prim_ops.c.
References ACCESS_FLAG, calc_carry_chain(), F_CF, s, and set_szp_flags_16().
Definition at line 355 of file prim_ops.c.
References calc_carry_chain(), s, and set_szp_flags_8().
Definition at line 385 of file prim_ops.c.
References calc_carry_chain(), CONDITIONAL_SET_FLAG, F_CF, s, and set_szp_flags_32().
Definition at line 370 of file prim_ops.c.
References calc_carry_chain(), s, and set_szp_flags_16().
Definition at line 402 of file prim_ops.c.
References no_carry_byte_side_eff(), and s.
Definition at line 430 of file prim_ops.c.
References no_carry_long_side_eff(), and s.
Definition at line 416 of file prim_ops.c.
References no_carry_word_side_eff(), and s.
Definition at line 201 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, and XOR2.
Referenced by cmp_byte(), cmp_long(), cmp_word(), dec_byte(), dec_long(), dec_word(), neg_byte(), neg_long(), and neg_word().
Definition at line 189 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, and XOR2.
Referenced by adc_byte(), adc_long(), adc_word(), add_byte(), add_long(), add_word(), inc_byte(), inc_long(), and inc_word().
Definition at line 443 of file prim_ops.c.
References calc_borrow_chain(), s, and set_szp_flags_8().
Referenced by x86emuOp_cmps_byte(), and x86emuOp_scas_byte().
Definition at line 473 of file prim_ops.c.
References calc_borrow_chain(), s, and set_szp_flags_32().
Referenced by x86emuOp_cmps_word(), and x86emuOp_scas_word().
Definition at line 458 of file prim_ops.c.
References calc_borrow_chain(), s, and set_szp_flags_16().
Referenced by x86emuOp_cmps_word(), and x86emuOp_scas_word().
Definition at line 488 of file prim_ops.c.
References ACCESS_FLAG, F_AF, F_CF, SET_FLAG, and set_szp_flags_8().
Referenced by x86emuOp_daa().
Definition at line 507 of file prim_ops.c.
References ACCESS_FLAG, F_AF, F_CF, SET_FLAG, and set_szp_flags_8().
Referenced by x86emuOp_das().
Definition at line 525 of file prim_ops.c.
References calc_borrow_chain(), and set_szp_flags_8().
Referenced by x86emuOp_opcFE_byte_RM().
Definition at line 555 of file prim_ops.c.
References calc_borrow_chain(), and set_szp_flags_32().
Referenced by x86emuOp_dec_register(), and x86emuOp_opcFF_word_RM().
Definition at line 540 of file prim_ops.c.
References calc_borrow_chain(), and set_szp_flags_16().
Referenced by x86emuOp_dec_register(), and x86emuOp_opcFF_word_RM().
Definition at line 2173 of file prim_ops.c.
References abs, M, s, and x86emu_intr_raise().
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 2224 of file prim_ops.c.
References abs, CLEAR_FLAG, F_AF, F_CF, F_SF, F_ZF, M, s, SET_FLAG, set_parity_flag(), and x86emu_intr_raise().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 2196 of file prim_ops.c.
References abs, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_SF, F_ZF, M, s, set_parity_flag(), and x86emu_intr_raise().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 2048 of file prim_ops.c.
References abs, M, s, and x86emu_intr_raise().
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 2099 of file prim_ops.c.
References abs, CLEAR_FLAG, F_AF, F_CF, F_SF, F_ZF, M, s, SET_FLAG, set_parity_flag(), and x86emu_intr_raise().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 2071 of file prim_ops.c.
References abs, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_SF, F_ZF, M, s, set_parity_flag(), and x86emu_intr_raise().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 1881 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, M, s, and SET_FLAG.
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 1958 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, imul_long_direct(), M, s, and SET_FLAG.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 1920 of file prim_ops.c.
References s.
Referenced by imul_long(), x86emuOp2_imul_R_RM(), x86emuOp_imul_byte_IMM(), and x86emuOp_imul_word_IMM().
Definition at line 1900 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, M, s, and SET_FLAG.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 571 of file prim_ops.c.
References calc_carry_chain(), and set_szp_flags_8().
Referenced by x86emuOp_opcFE_byte_RM().
Definition at line 601 of file prim_ops.c.
References calc_carry_chain(), and set_szp_flags_32().
Referenced by x86emuOp_inc_register(), and x86emuOp_opcFF_word_RM().
Definition at line 586 of file prim_ops.c.
References calc_carry_chain(), and set_szp_flags_16().
Referenced by x86emuOp_inc_register(), and x86emuOp_opcFF_word_RM().
void ins | ( | int | size | ) |
Definition at line 2305 of file prim_ops.c.
References ACCESS_FLAG, count, F_DF, M, single_in(), SYSMODE_32BIT_REP, SYSMODE_PREFIX_REPE, and SYSMODE_PREFIX_REPNE.
Referenced by fetch_16bit_instruction(), fetch_32bit_instruction(), x86emuOp_ins_byte(), and x86emuOp_ins_word().
u16 mem_access_word | ( | int | addr | ) |
Definition at line 2381 of file prim_ops.c.
References addr, CHECK_MEM_ACCESS, DB, and x86emu_check_mem_access().
Referenced by x86emu_intr_handle(), X86EMU_prepareForInt(), x86emuOp_int3(), x86emuOp_int_IMM(), and x86emuOp_into().
Definition at line 1975 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, M, s, and SET_FLAG.
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 2012 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, M, s, and SET_FLAG.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 1993 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, M, s, and SET_FLAG.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 656 of file prim_ops.c.
References calc_borrow_chain(), CONDITIONAL_SET_FLAG, F_CF, s, and set_szp_flags_8().
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 688 of file prim_ops.c.
References calc_borrow_chain(), CONDITIONAL_SET_FLAG, F_CF, s, and set_szp_flags_32().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 672 of file prim_ops.c.
References calc_borrow_chain(), CONDITIONAL_SET_FLAG, F_CF, s, and set_szp_flags_16().
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 165 of file prim_ops.c.
References CLEAR_FLAG, F_AF, F_CF, F_OF, and set_szp_flags_8().
Referenced by aad_word(), aam_word(), and_byte(), or_byte(), and xor_byte().
Definition at line 181 of file prim_ops.c.
References CLEAR_FLAG, F_AF, F_CF, F_OF, and set_szp_flags_32().
Referenced by and_long(), or_long(), and xor_long().
Definition at line 173 of file prim_ops.c.
References CLEAR_FLAG, F_AF, F_CF, F_OF, and set_szp_flags_16().
Referenced by and_word(), or_word(), and xor_word().
Definition at line 704 of file prim_ops.c.
References s.
Referenced by x86emuOp_opcF6_byte_RM().
Definition at line 722 of file prim_ops.c.
References s.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 713 of file prim_ops.c.
References s.
Referenced by x86emuOp_opcF7_word_RM().
Definition at line 616 of file prim_ops.c.
References no_carry_byte_side_eff(), and s.
Definition at line 643 of file prim_ops.c.
References no_carry_long_side_eff(), and s.
Definition at line 630 of file prim_ops.c.
References no_carry_word_side_eff(), and s.
void outs | ( | int | size | ) |
Definition at line 2347 of file prim_ops.c.
References ACCESS_FLAG, count, F_DF, M, single_out(), SYSMODE_32BIT_REP, SYSMODE_PREFIX_REPE, and SYSMODE_PREFIX_REPNE.
Referenced by x86emuOp_outs_byte(), and x86emuOp_outs_word().
Definition at line 2439 of file prim_ops.c.
References CHECK_SP_ACCESS, DB, M, and x86emu_check_sp_access().
Referenced by pmm_handleInt(), x86emuOp_pop_all(), x86emuOp_pop_register(), x86emuOp_pop_RM(), and x86emuOp_popf_word().
Definition at line 2422 of file prim_ops.c.
References CHECK_SP_ACCESS, DB, M, and x86emu_check_sp_access().
Referenced by biosemu(), pmm_handleInt(), x86emuOp2_pop_FS(), x86emuOp2_pop_GS(), x86emuOp_iret(), x86emuOp_leave(), x86emuOp_pop_all(), x86emuOp_pop_DS(), x86emuOp_pop_ES(), x86emuOp_pop_register(), x86emuOp_pop_RM(), x86emuOp_pop_SS(), x86emuOp_popf_word(), x86emuOp_ret_far(), x86emuOp_ret_far_IMM(), x86emuOp_ret_near(), and x86emuOp_ret_near_IMM().
Definition at line 2408 of file prim_ops.c.
References CHECK_SP_ACCESS, DB, M, and x86emu_check_sp_access().
Referenced by pmm_test(), x86emuOp_call_far_IMM(), x86emuOp_call_near_IMM(), x86emuOp_opcFF_word_RM(), x86emuOp_push_all(), x86emuOp_push_byte_IMM(), x86emuOp_push_register(), x86emuOp_push_word_IMM(), and x86emuOp_pushf_word().
Definition at line 2394 of file prim_ops.c.
References CHECK_SP_ACCESS, DB, M, and x86emu_check_sp_access().
Referenced by biosemu(), pmm_test(), runInt10(), runInt13(), setupInt(), x86emu_intr_handle(), X86EMU_prepareForInt(), x86emuOp2_push_FS(), x86emuOp2_push_GS(), x86emuOp_call_far_IMM(), x86emuOp_call_near_IMM(), x86emuOp_enter(), x86emuOp_int3(), x86emuOp_int_IMM(), x86emuOp_into(), x86emuOp_opcFF_word_RM(), x86emuOp_push_all(), x86emuOp_push_byte_IMM(), x86emuOp_push_CS(), x86emuOp_push_DS(), x86emuOp_push_ES(), x86emuOp_push_register(), x86emuOp_push_SS(), x86emuOp_push_word_IMM(), and x86emuOp_pushf_word().
Definition at line 731 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 828 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 804 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 852 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 968 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 936 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1001 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1075 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1050 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1100 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1169 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1146 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_CF, F_OF, mask, s, and XOR2.
Definition at line 1411 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_PF, F_SF, F_ZF, mask, s, SET_FLAG, and set_szp_flags_8().
Definition at line 1487 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_PF, F_SF, F_ZF, mask, s, SET_FLAG, and set_szp_flags_32().
Definition at line 1449 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_PF, F_SF, F_ZF, mask, s, SET_FLAG, and set_szp_flags_16().
Definition at line 1664 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_8(), and XOR2.
Definition at line 1710 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_32(), and XOR2.
Definition at line 1687 of file prim_ops.c.
References ACCESS_FLAG, CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_16(), and XOR2.
Definition at line 139 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_PF, and PARITY.
Referenced by div_long(), div_word(), idiv_long(), idiv_word(), set_szp_flags_16(), set_szp_flags_32(), and set_szp_flags_8().
Definition at line 151 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_SF, F_ZF, and set_parity_flag().
Referenced by aaa_word(), aas_word(), adc_word(), add_word(), cmp_word(), dec_word(), inc_word(), neg_word(), no_carry_word_side_eff(), sar_word(), sbb_word(), shl_word(), shld_word(), shr_word(), shrd_word(), sub_word(), and test_word().
Definition at line 158 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_SF, F_ZF, and set_parity_flag().
Referenced by adc_long(), add_long(), cmp_long(), dec_long(), inc_long(), neg_long(), no_carry_long_side_eff(), sar_long(), sbb_long(), shl_long(), shld_long(), shr_long(), shrd_long(), sub_long(), and test_long().
Definition at line 144 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_SF, F_ZF, and set_parity_flag().
Referenced by adc_byte(), add_byte(), cmp_byte(), daa_byte(), das_byte(), dec_byte(), inc_byte(), neg_byte(), no_carry_byte_side_eff(), sar_byte(), sbb_byte(), shl_byte(), shr_byte(), sub_byte(), and test_byte().
Definition at line 1192 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, and set_szp_flags_8().
Definition at line 1272 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, and set_szp_flags_32().
Definition at line 1234 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, and set_szp_flags_16().
Definition at line 1560 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, and set_szp_flags_32().
Referenced by x86emuOp2_shld_CL(), and x86emuOp2_shld_IMM().
Definition at line 1525 of file prim_ops.c.
References ACCESS_FLAG, CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, and set_szp_flags_16().
Referenced by x86emuOp2_shld_CL(), and x86emuOp2_shld_IMM().
Definition at line 1307 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, set_szp_flags_8(), and XOR2.
Definition at line 1377 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, set_szp_flags_32(), and XOR2.
Definition at line 1342 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, set_szp_flags_16(), and XOR2.
Definition at line 1630 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, set_szp_flags_32(), and XOR2.
Referenced by x86emuOp2_shrd_CL(), and x86emuOp2_shrd_IMM().
Definition at line 1595 of file prim_ops.c.
References CLEAR_FLAG, CONDITIONAL_SET_FLAG, F_CF, F_OF, F_PF, F_SF, F_ZF, s, SET_FLAG, set_szp_flags_16(), and XOR2.
Referenced by x86emuOp2_shrd_CL(), and x86emuOp2_shrd_IMM().
|
static |
Definition at line 2295 of file prim_ops.c.
References M, store_data_byte_abs(), store_data_long_abs(), and store_data_word_abs().
Referenced by ins().
|
static |
Definition at line 2337 of file prim_ops.c.
References fetch_data_byte_abs(), fetch_data_long_abs(), fetch_data_word_abs(), and M.
Referenced by outs().
Definition at line 1734 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_8(), and XOR2.
Definition at line 1774 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_32(), and XOR2.
Definition at line 1754 of file prim_ops.c.
References CONDITIONAL_SET_FLAG, F_AF, F_CF, F_OF, s, set_szp_flags_16(), and XOR2.
Definition at line 1794 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, s, and set_szp_flags_8().
Referenced by x86emuOp_opcF6_byte_RM(), x86emuOp_test_AL_IMM(), and x86emuOp_test_byte_RM_R().
Definition at line 1826 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, s, and set_szp_flags_32().
Referenced by x86emuOp_opcF7_word_RM(), x86emuOp_test_AX_IMM(), and x86emuOp_test_word_RM_R().
Definition at line 1810 of file prim_ops.c.
References CLEAR_FLAG, F_CF, F_OF, s, and set_szp_flags_16().
Referenced by x86emuOp_opcF7_word_RM(), x86emuOp_test_AX_IMM(), and x86emuOp_test_word_RM_R().
Definition at line 2454 of file prim_ops.c.
References M.
Referenced by x86emuOp2_cpuid().
Definition at line 1842 of file prim_ops.c.
References no_carry_byte_side_eff(), and s.
Definition at line 1868 of file prim_ops.c.
References no_carry_long_side_eff(), and s.
Definition at line 1855 of file prim_ops.c.
References no_carry_word_side_eff(), and s.
|
static |
Definition at line 115 of file prim_ops.c.