this is probably in vain because this tool should use the same x86emu as
coreboot in order to produce comparable results. But, this patch drops the CONFIG_ from CONFIG_DEBUG because that was added by accident when we automatically renamed coreboot variables to be consistent. "vgabios" is an independent userspace utility, and it does not use newconfig nor Kconfig, so it should not be converted. (trivial) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4782 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
61c7fbfd5e
commit
9d37532bc1
|
@ -24,7 +24,7 @@ static const OptionInfoRec INT10Options[] = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
void dprint(unsigned long start, unsigned long size)
|
void dprint(unsigned long start, unsigned long size)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
@ -44,7 +44,7 @@ void dprint(unsigned long start, unsigned long size)
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#ifndef _PC
|
#ifndef _PC
|
||||||
|
|
|
@ -155,7 +155,7 @@ void X86EMU_prepareForInt(int num);
|
||||||
void X86EMU_exec(void);
|
void X86EMU_exec(void);
|
||||||
void X86EMU_halt_sys(void);
|
void X86EMU_halt_sys(void);
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
#define HALT_SYS() \
|
#define HALT_SYS() \
|
||||||
printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__), \
|
printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__), \
|
||||||
X86EMU_halt_sys()
|
X86EMU_halt_sys()
|
||||||
|
|
|
@ -102,7 +102,7 @@ struct x86_fpu_registers {
|
||||||
|
|
||||||
#endif /* X86_FPU_SUPPORT */
|
#endif /* X86_FPU_SUPPORT */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define DECODE_PRINTINSTR32(t,mod,rh,rl) \
|
# define DECODE_PRINTINSTR32(t,mod,rh,rl) \
|
||||||
DECODE_PRINTF(t[(mod<<3)+(rh)]);
|
DECODE_PRINTF(t[(mod<<3)+(rh)]);
|
||||||
# define DECODE_PRINTINSTR256(t,mod,rh,rl) \
|
# define DECODE_PRINTINSTR256(t,mod,rh,rl) \
|
||||||
|
|
|
@ -275,7 +275,7 @@ typedef struct {
|
||||||
u32 mode;
|
u32 mode;
|
||||||
volatile int intr; /* mask of pending interrupts */
|
volatile int intr; /* mask of pending interrupts */
|
||||||
int debug;
|
int debug;
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
int check;
|
int check;
|
||||||
u16 saved_ip;
|
u16 saved_ip;
|
||||||
u16 saved_cs;
|
u16 saved_cs;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
/*----------------------------- Implementation ----------------------------*/
|
/*----------------------------- Implementation ----------------------------*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static void print_encoded_bytes (u16 s, u16 o);
|
static void print_encoded_bytes (u16 s, u16 o);
|
||||||
static void print_decoded_instruction (void);
|
static void print_decoded_instruction (void);
|
||||||
|
@ -90,7 +90,7 @@ static void disassemble_forward (u16 seg, u16 off, int n)
|
||||||
* flag associated with the "execution", and we are using a copy
|
* flag associated with the "execution", and we are using a copy
|
||||||
* of the register struct. All the major opcodes, once fully
|
* of the register struct. All the major opcodes, once fully
|
||||||
* decoded, have the following two steps: TRACE_REGS(r,m);
|
* decoded, have the following two steps: TRACE_REGS(r,m);
|
||||||
* SINGLE_STEP(r,m); which disappear if CONFIG_DEBUG is not defined to
|
* SINGLE_STEP(r,m); which disappear if DEBUG is not defined to
|
||||||
* the preprocessor. The TRACE_REGS macro expands to:
|
* the preprocessor. The TRACE_REGS macro expands to:
|
||||||
*
|
*
|
||||||
* if (debug&DEBUG_DISASSEMBLE)
|
* if (debug&DEBUG_DISASSEMBLE)
|
||||||
|
@ -354,7 +354,7 @@ static int parse_line (char *s, int *ps, int *n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
void x86emu_dump_regs (void)
|
void x86emu_dump_regs (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -283,7 +283,7 @@ _INLINE u32 get_data_segment(void)
|
||||||
case SYSMODE_SEGOVR_SS | SYSMODE_SEG_DS_SS:
|
case SYSMODE_SEGOVR_SS | SYSMODE_SEG_DS_SS:
|
||||||
return M.x86.R_SS;
|
return M.x86.R_SS;
|
||||||
default:
|
default:
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
printk("error: should not happen: multiple overrides.\n");
|
printk("error: should not happen: multiple overrides.\n");
|
||||||
#endif
|
#endif
|
||||||
HALT_SYS();
|
HALT_SYS();
|
||||||
|
@ -303,7 +303,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
|
||||||
u8 fetch_data_byte(
|
u8 fetch_data_byte(
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -322,7 +322,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
|
||||||
u16 fetch_data_word(
|
u16 fetch_data_word(
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -341,7 +341,7 @@ NOTE: Do not inline this function as (*sys_rdX) is already inline!
|
||||||
u32 fetch_data_long(
|
u32 fetch_data_long(
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -362,7 +362,7 @@ u8 fetch_data_byte_abs(
|
||||||
uint segment,
|
uint segment,
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -383,7 +383,7 @@ u16 fetch_data_word_abs(
|
||||||
uint segment,
|
uint segment,
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -404,7 +404,7 @@ u32 fetch_data_long_abs(
|
||||||
uint segment,
|
uint segment,
|
||||||
uint offset)
|
uint offset)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -426,7 +426,7 @@ void store_data_byte(
|
||||||
uint offset,
|
uint offset,
|
||||||
u8 val)
|
u8 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -448,7 +448,7 @@ void store_data_word(
|
||||||
uint offset,
|
uint offset,
|
||||||
u16 val)
|
u16 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -470,7 +470,7 @@ void store_data_long(
|
||||||
uint offset,
|
uint offset,
|
||||||
u32 val)
|
u32 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access((u16)get_data_segment(), offset);
|
x86emu_check_data_access((u16)get_data_segment(), offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -493,7 +493,7 @@ void store_data_byte_abs(
|
||||||
uint offset,
|
uint offset,
|
||||||
u8 val)
|
u8 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -516,7 +516,7 @@ void store_data_word_abs(
|
||||||
uint offset,
|
uint offset,
|
||||||
u16 val)
|
u16 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
@ -539,7 +539,7 @@ void store_data_long_abs(
|
||||||
uint offset,
|
uint offset,
|
||||||
u32 val)
|
u32 val)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (CHECK_DATA_ACCESS())
|
if (CHECK_DATA_ACCESS())
|
||||||
x86emu_check_data_access(segment, offset);
|
x86emu_check_data_access(segment, offset);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,7 +50,7 @@ void x86emuOp_esc_coprocess_d8(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static char *x86emu_fpu_op_d9_tab[] = {
|
static char *x86emu_fpu_op_d9_tab[] = {
|
||||||
"FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ",
|
"FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ",
|
||||||
|
@ -89,7 +89,7 @@ static char *x86emu_fpu_op_d9_tab1[] = {
|
||||||
"FRNDINT", "FSCALE", "ESC_D9", "ESC_D9",
|
"FRNDINT", "FSCALE", "ESC_D9", "ESC_D9",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xd9 */
|
/* opcode=0xd9 */
|
||||||
void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -100,7 +100,7 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
|
||||||
|
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (mod != 3) {
|
if (mod != 3) {
|
||||||
DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl);
|
DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl);
|
||||||
} else {
|
} else {
|
||||||
|
@ -294,7 +294,7 @@ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
char *x86emu_fpu_op_da_tab[] = {
|
char *x86emu_fpu_op_da_tab[] = {
|
||||||
"FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ",
|
"FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ",
|
||||||
|
@ -316,7 +316,7 @@ char *x86emu_fpu_op_da_tab[] = {
|
||||||
"ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ",
|
"ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xda */
|
/* opcode=0xda */
|
||||||
void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -384,7 +384,7 @@ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
char *x86emu_fpu_op_db_tab[] = {
|
char *x86emu_fpu_op_db_tab[] = {
|
||||||
"FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ",
|
"FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ",
|
||||||
|
@ -397,7 +397,7 @@ char *x86emu_fpu_op_db_tab[] = {
|
||||||
"ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ",
|
"ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xdb */
|
/* opcode=0xdb */
|
||||||
void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -407,7 +407,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
|
||||||
|
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (mod != 3) {
|
if (mod != 3) {
|
||||||
DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl);
|
DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl);
|
||||||
} else if (rh == 4) { /* === 11 10 0 nnn */
|
} else if (rh == 4) { /* === 11 10 0 nnn */
|
||||||
|
@ -428,7 +428,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
|
||||||
} else {
|
} else {
|
||||||
DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl));
|
DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl));
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
switch (mod) {
|
switch (mod) {
|
||||||
case 0:
|
case 0:
|
||||||
destoffset = decode_rm00_address(rl);
|
destoffset = decode_rm00_address(rl);
|
||||||
|
@ -504,7 +504,7 @@ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
char *x86emu_fpu_op_dc_tab[] = {
|
char *x86emu_fpu_op_dc_tab[] = {
|
||||||
"FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ",
|
"FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ",
|
||||||
"FCOMP\tQWORD PTR ",
|
"FCOMP\tQWORD PTR ",
|
||||||
|
@ -524,7 +524,7 @@ char *x86emu_fpu_op_dc_tab[] = {
|
||||||
"FADD\t", "FMUL\t", "FCOM\t", "FCOMP\t",
|
"FADD\t", "FMUL\t", "FCOM\t", "FCOMP\t",
|
||||||
"FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t",
|
"FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t",
|
||||||
};
|
};
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xdc */
|
/* opcode=0xdc */
|
||||||
void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -618,7 +618,7 @@ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static char *x86emu_fpu_op_dd_tab[] = {
|
static char *x86emu_fpu_op_dd_tab[] = {
|
||||||
"FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ",
|
"FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ",
|
||||||
|
@ -634,7 +634,7 @@ static char *x86emu_fpu_op_dd_tab[] = {
|
||||||
"ESC_DD\t2C,", "ESC_DD\t2D,", "ESC_DD\t2E,", "ESC_DD\t2F,",
|
"ESC_DD\t2C,", "ESC_DD\t2D,", "ESC_DD\t2E,", "ESC_DD\t2F,",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xdd */
|
/* opcode=0xdd */
|
||||||
void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -718,7 +718,7 @@ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static char *x86emu_fpu_op_de_tab[] =
|
static char *x86emu_fpu_op_de_tab[] =
|
||||||
{
|
{
|
||||||
|
@ -741,7 +741,7 @@ static char *x86emu_fpu_op_de_tab[] =
|
||||||
"FSUBRP\t", "FSUBP\t", "FDIVRP\t", "FDIVP\t",
|
"FSUBRP\t", "FSUBP\t", "FDIVRP\t", "FDIVP\t",
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xde */
|
/* opcode=0xde */
|
||||||
void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
|
||||||
|
@ -837,7 +837,7 @@ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1))
|
||||||
END_OF_INSTR_NO_TRACE();
|
END_OF_INSTR_NO_TRACE();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static char *x86emu_fpu_op_df_tab[] = {
|
static char *x86emu_fpu_op_df_tab[] = {
|
||||||
/* mod == 00 */
|
/* mod == 00 */
|
||||||
|
@ -860,7 +860,7 @@ static char *x86emu_fpu_op_df_tab[] = {
|
||||||
"ESC_DF\t3C,", "ESC_DF\t3D,", "ESC_DF\t3E,", "ESC_DF\t3F,"
|
"ESC_DF\t3C,", "ESC_DF\t3D,", "ESC_DF\t3E,", "ESC_DF\t3F,"
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_DEBUG */
|
#endif /* DEBUG */
|
||||||
|
|
||||||
/* opcode=0xdf */
|
/* opcode=0xdf */
|
||||||
void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
|
void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1))
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#
|
#
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
.IMPORT .IGNORE: CONFIG_DEBUG
|
.IMPORT .IGNORE: DEBUG
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Define the lists of object files
|
# Define the lists of object files
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
OBJECTS = sys$O decode$O ops$O ops2$O prim_ops$O fpu$O debug$O
|
OBJECTS = sys$O decode$O ops$O ops2$O prim_ops$O fpu$O debug$O
|
||||||
CFLAGS += -DSCITECH
|
CFLAGS += -DSCITECH
|
||||||
.IF $(CONFIG_DEBUG)
|
.IF $(DEBUG)
|
||||||
CFLAGS += -DDEBUG
|
CFLAGS += -DDEBUG
|
||||||
.ENDIF
|
.ENDIF
|
||||||
LIBCLEAN = *.dll *.lib *.a
|
LIBCLEAN = *.dll *.lib *.a
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
/* constant arrays to do several instructions in just one function */
|
/* constant arrays to do several instructions in just one function */
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
static char *x86emu_GenOpName[8] = {
|
static char *x86emu_GenOpName[8] = {
|
||||||
"ADD", "OR", "ADC", "SBB", "AND", "SUB", "XOR", "CMP"};
|
"ADD", "OR", "ADC", "SBB", "AND", "SUB", "XOR", "CMP"};
|
||||||
#endif
|
#endif
|
||||||
|
@ -157,7 +157,7 @@ static u32 (*opcD1_long_operation[])(u32 s, u8 d) =
|
||||||
sar_long,
|
sar_long,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static char *opF6_names[8] =
|
static char *opF6_names[8] =
|
||||||
{ "TEST\t", "", "NOT\t", "NEG\t", "MUL\t", "IMUL\t", "DIV\t", "IDIV\t" };
|
{ "TEST\t", "", "NOT\t", "NEG\t", "MUL\t", "IMUL\t", "DIV\t", "IDIV\t" };
|
||||||
|
@ -1278,7 +1278,7 @@ void x86emuOp_opc80_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -1356,7 +1356,7 @@ void x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -1472,7 +1472,7 @@ void x86emuOp_opc82_byte_RM_IMM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -1548,7 +1548,7 @@ void x86emuOp_opc83_word_RM_IMM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3080,7 +3080,7 @@ void x86emuOp_opcC0_byte_RM_MEM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3155,7 +3155,7 @@ void x86emuOp_opcC1_word_RM_MEM(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3632,7 +3632,7 @@ void x86emuOp_opcD0_byte_RM_1(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3703,7 +3703,7 @@ void x86emuOp_opcD1_word_RM_1(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3805,7 +3805,7 @@ void x86emuOp_opcD2_byte_RM_CL(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -3878,7 +3878,7 @@ void x86emuOp_opcD3_word_RM_CL(u8 X86EMU_UNUSED(op1))
|
||||||
*/
|
*/
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -4863,7 +4863,7 @@ void x86emuOp_opcFE_byte_RM(u8 X86EMU_UNUSED(op1))
|
||||||
/* Yet another special case instruction. */
|
/* Yet another special case instruction. */
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
@ -4927,7 +4927,7 @@ void x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
/* Yet another special case instruction. */
|
/* Yet another special case instruction. */
|
||||||
START_OF_INSTR();
|
START_OF_INSTR();
|
||||||
FETCH_DECODE_MODRM(mod, rh, rl);
|
FETCH_DECODE_MODRM(mod, rh, rl);
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
if (DEBUG_DECODE()) {
|
if (DEBUG_DECODE()) {
|
||||||
/* XXX DECODE_PRINTF may be changed to something more
|
/* XXX DECODE_PRINTF may be changed to something more
|
||||||
general, so that it is important to leave the strings
|
general, so that it is important to leave the strings
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
|
#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */
|
||||||
#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/
|
#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
|
# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F)
|
||||||
# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
|
# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F)
|
||||||
# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
|
# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F)
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
# define CHECK_DATA_ACCESS()
|
# define CHECK_DATA_ACCESS()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
|
# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F)
|
||||||
# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
|
# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F)
|
||||||
# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
|
# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F)
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
# define DEBUG_DECODE_NOPRINT() 0
|
# define DEBUG_DECODE_NOPRINT() 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
|
# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \
|
||||||
x86emu_decode_printf(x)
|
x86emu_decode_printf(x)
|
||||||
|
@ -129,7 +129,7 @@
|
||||||
# define SAVE_IP_CS(x,y)
|
# define SAVE_IP_CS(x,y)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
#define TRACE_REGS() \
|
#define TRACE_REGS() \
|
||||||
if (DEBUG_DISASSEMBLE()) { \
|
if (DEBUG_DISASSEMBLE()) { \
|
||||||
x86emu_just_disassemble(); \
|
x86emu_just_disassemble(); \
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
# define TRACE_REGS()
|
# define TRACE_REGS()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
|
# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step()
|
||||||
#else
|
#else
|
||||||
# define SINGLE_STEP()
|
# define SINGLE_STEP()
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
TRACE_REGS(); \
|
TRACE_REGS(); \
|
||||||
SINGLE_STEP()
|
SINGLE_STEP()
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define START_OF_INSTR()
|
# define START_OF_INSTR()
|
||||||
# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
|
# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr();
|
||||||
# define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
|
# define END_OF_INSTR_NO_TRACE() x86emu_end_instr();
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
# define END_OF_INSTR_NO_TRACE()
|
# define END_OF_INSTR_NO_TRACE()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
# define CALL_TRACE(u,v,w,x,s) \
|
# define CALL_TRACE(u,v,w,x,s) \
|
||||||
if (DEBUG_TRACECALLREGS()) \
|
if (DEBUG_TRACECALLREGS()) \
|
||||||
x86emu_dump_regs(); \
|
x86emu_dump_regs(); \
|
||||||
|
@ -176,7 +176,7 @@
|
||||||
# define RETURN_TRACE(n,u,v)
|
# define RETURN_TRACE(n,u,v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG
|
#ifdef DEBUG
|
||||||
#define DB(x) x
|
#define DB(x) x
|
||||||
#else
|
#else
|
||||||
#define DB(x)
|
#define DB(x)
|
||||||
|
|
Loading…
Reference in New Issue