|
|
| version 1.9, 2004/03/05 14:17:35 | version 1.13, 2005/03/12 12:32:54 |
|---|---|
| Line 12 | Line 12 |
| * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. |
| * 3. The name of the author may not be used to endorse or promote products | |
| * derived from this software without specific prior written permission. | |
| * | * |
| * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| Line 31 | Line 29 |
| #include "cpu.h" | #include "cpu.h" |
| #include "memory.h" | #include "memory.h" |
| #ifdef USE_FPU | #if defined(USE_FPU) |
| #include "instructions/fpu/fpu.h" | #include "instructions/fpu/fp.h" |
| #endif | #endif |
| Line 45 cpu_reg2str(void) | Line 43 cpu_reg2str(void) |
| "eax=%08x ecx=%08x edx=%08x ebx=%08x\n" | "eax=%08x ecx=%08x edx=%08x ebx=%08x\n" |
| "esp=%08x ebp=%08x esi=%08x edi=%08x\n" | "esp=%08x ebp=%08x esi=%08x edi=%08x\n" |
| "eip=%08x prev_eip=%08x\n" | "eip=%08x prev_eip=%08x\n" |
| "cs=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x\n" | "es=%04x cs=%04x ss=%04x ds=%04x fs=%04x gs=%04x\n" |
| "eflag=%08x " | "eflag=%08x " |
| /* ID VIP VIF AC VM RF NT IOPL OF DF IF TF SF ZF AF PF CF */ | /* ID VIP VIF AC VM RF NT IOPL OF DF IF TF SF ZF AF PF CF */ |
| "[ ID=%d VIP=%d VIF=%d AC=%d VM=%d RF=%d NT=%d IOPL=%d %s %s %s TF=%d %s %s %s %s %s ]\n" | "[ ID=%d VIP=%d VIF=%d AC=%d VM=%d RF=%d NT=%d IOPL=%d %s %s %s TF=%d %s %s %s %s %s ]\n" |
| Line 82 cpu_reg2str(void) | Line 80 cpu_reg2str(void) |
| return buf; | return buf; |
| } | } |
| #ifdef USE_FPU | |
| char * | |
| fpu_reg2str(void) | |
| { | |
| static char buf[512]; | |
| char tmp[128]; | |
| int i; | |
| int no; | |
| strcpy(buf, "st=\n"); | |
| for (no = 0; no < 8; no++) { | |
| for (i = 9; i >= 0; i--) { | |
| snprintf(tmp, sizeof(tmp), "%02x", FPU_ST[no][i]); | |
| strcat(buf, tmp); | |
| } | |
| strcat(buf, "\n"); | |
| } | |
| snprintf(tmp, sizeof(tmp), | |
| "ctrl=%04x status=%04x tag=%04x\n" | |
| "inst=%08x%04x data=%08x%04x op=%03x\n", | |
| FPU_CTRLWORD, | |
| FPU_STATUSWORD, | |
| FPU_TAGWORD, | |
| FPU_INSTPTR_OFFSET, FPU_INSTPTR_SEG, | |
| FPU_DATAPTR_OFFSET, FPU_DATAPTR_SEG, | |
| FPU_LASTINSTOP); | |
| strcat(buf, tmp); | |
| return buf; | |
| } | |
| #endif | |
| static char * | static char * |
| a20str(void) | a20str(void) |
| { | { |
| Line 132 put_cpuinfo(void) | Line 97 put_cpuinfo(void) |
| strcpy(buf, cpu_reg2str()); | strcpy(buf, cpu_reg2str()); |
| strcat(buf, "\n"); | strcat(buf, "\n"); |
| #ifdef USE_FPU | #if defined(USE_FPU) |
| strcat(buf, fpu_reg2str()); | strcat(buf, fpu_reg2str()); |
| strcat(buf, "\n"); | strcat(buf, "\n"); |
| #endif | #endif |
| Line 243 tr_dump(UINT16 selector, UINT32 base, UI | Line 208 tr_dump(UINT16 selector, UINT32 base, UI |
| UINT32 v; | UINT32 v; |
| UINT i; | UINT i; |
| (void)selector; | |
| VERBOSE(("TR_DUMP: selector = %04x", selector)); | VERBOSE(("TR_DUMP: selector = %04x", selector)); |
| for (i = 0; i < limit; i += 4) { | for (i = 0; i < limit; i += 4) { |