|
|
| version 1.31, 2011/12/23 04:19:43 | version 1.34, 2012/01/08 11:32:16 |
|---|---|
| Line 61 static const int dftable[4][4] = { | Line 61 static const int dftable[4][4] = { |
| { 1, 1, 1, 1, }, | { 1, 1, 1, 1, }, |
| }; | }; |
| void | void CPUCALL |
| exception(int num, int error_code) | exception(int num, int error_code) |
| { | { |
| #if defined(DEBUG) | |
| extern int cpu_debug_rep_cont; | |
| extern CPU_REGS cpu_debug_rep_regs; | |
| #endif | |
| int errorp = 0; | int errorp = 0; |
| __ASSERT((unsigned int)num < EXCEPTION_NUM); | __ASSERT((unsigned int)num < EXCEPTION_NUM); |
| Line 74 exception(int num, int error_code) | Line 78 exception(int num, int error_code) |
| #endif | #endif |
| VERBOSE(("exception: -------------------------------------------------------------- start")); | VERBOSE(("exception: -------------------------------------------------------------- start")); |
| VERBOSE(("exception: %s, error_code = %x at %04x:%08x, %04x:%08x", exception_str[num], error_code, CPU_CS, CPU_PREV_EIP, CPU_SS, CPU_ESP)); | VERBOSE(("exception: %s, error_code = %x at %04x:%08x", exception_str[num], error_code, CPU_CS, CPU_PREV_EIP)); |
| VERBOSE(("%s", cpu_reg2str())); | VERBOSE(("%s", cpu_reg2str())); |
| VERBOSE(("code: %dbit(%dbit), address: %dbit(%dbit)", CPU_INST_OP32 ? 32 : 16, CPU_STATSAVE.cpu_inst_default.op_32 ? 32 : 16, CPU_INST_AS32 ? 32 : 16, CPU_STATSAVE.cpu_inst_default.as_32 ? 32 : 16)); | |
| #if defined(DEBUG) | |
| if (cpu_debug_rep_cont) { | |
| VERBOSE(("rep: original regs: ecx=%08x, esi=%08x, edi=%08x", cpu_debug_rep_regs.reg[CPU_ECX_INDEX].d, cpu_debug_rep_regs.reg[CPU_ESI_INDEX].d, cpu_debug_rep_regs.reg[CPU_EDI_INDEX].d)); | |
| } | |
| VERBOSE(("%s", cpu_disasm2str(CPU_PREV_EIP))); | |
| #endif | |
| CPU_STAT_EXCEPTION_COUNTER_INC(); | CPU_STAT_EXCEPTION_COUNTER_INC(); |
| if ((CPU_STAT_EXCEPTION_COUNTER >= 3) | if ((CPU_STAT_EXCEPTION_COUNTER >= 3) |
| Line 204 exception(int num, int error_code) | Line 215 exception(int num, int error_code) |
| * D : ゲートのサイズ.0 = 16 bit, 1 = 32 bit | * D : ゲートのサイズ.0 = 16 bit, 1 = 32 bit |
| */ | */ |
| static void interrupt_task_gate(const descriptor_t *gsdp, int intrtype, int errorp, int error_code); | static void CPUCALL interrupt_task_gate(const descriptor_t *gsdp, int intrtype, int errorp, int error_code); |
| static void interrupt_intr_or_trap(const descriptor_t *gsdp, int intrtype, int errorp, int error_code); | static void CPUCALL interrupt_intr_or_trap(const descriptor_t *gsdp, int intrtype, int errorp, int error_code); |
| void | void CPUCALL |
| interrupt(int num, int intrtype, int errorp, int error_code) | interrupt(int num, int intrtype, int errorp, int error_code) |
| { | { |
| descriptor_t gsd; | descriptor_t gsd; |
| Line 337 interrupt(int num, int intrtype, int err | Line 348 interrupt(int num, int intrtype, int err |
| CPU_CLEAR_PREV_ESP(); | CPU_CLEAR_PREV_ESP(); |
| } | } |
| static void | static void CPUCALL |
| interrupt_task_gate(const descriptor_t *gsdp, int intrtype, int errorp, int error_code) | interrupt_task_gate(const descriptor_t *gsdp, int intrtype, int errorp, int error_code) |
| { | { |
| selector_t task_sel; | selector_t task_sel; |
| Line 388 interrupt_task_gate(const descriptor_t * | Line 399 interrupt_task_gate(const descriptor_t * |
| } | } |
| } | } |
| static void | static void CPUCALL |
| interrupt_intr_or_trap(const descriptor_t *gsdp, int intrtype, int errorp, int error_code) | interrupt_intr_or_trap(const descriptor_t *gsdp, int intrtype, int errorp, int error_code) |
| { | { |
| selector_t cs_sel, ss_sel; | selector_t cs_sel, ss_sel; |