diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-config.hpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-config.hpp index e81d7b79..ecec8aa6 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-config.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-config.hpp @@ -83,6 +83,9 @@ **/ #ifndef PPC_LAZY_PC_UPDATE +#define PPC_LAZY_PC_UPDATE +#endif +#ifdef PPC_NO_LAZY_PC_UPDATE #undef PPC_LAZY_PC_UPDATE #endif @@ -124,7 +127,7 @@ **/ #ifndef PPC_NO_DECODE_CACHE -#define PPC_NO_DECODE_CACHE 1 +#undef PPC_NO_DECODE_CACHE #endif diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp index e1c291be..bacffcb5 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp @@ -119,6 +119,9 @@ void powerpc_cpu::record_step(uint32 opcode) #if PPC_FLIGHT_RECORDER log[log_ptr].pc = pc(); log[log_ptr].opcode = opcode; +#ifdef SHEEPSHAVER + log[log_ptr].extra = gpr(24); +#endif #if PPC_FLIGHT_RECORDER >= 2 for (int i = 0; i < 32; i++) { log[log_ptr].r[i] = gpr(i); @@ -168,7 +171,11 @@ void powerpc_cpu::dump_log(const char *filename) fprintf(f, "r28 %08x r29 %08x r30 %08x r31 %08x\n", log[j].r[28], log[j].r[29], log[j].r[30], log[j].r[31]); fprintf(f, "opcode %08x\n", log[j].opcode); #else - fprintf(f, " pc %08x opc %08x | ", log[j].pc, log[j].opcode); + fprintf(f, " pc %08x opc %08x", log[j].pc, log[j].opcode); +#ifdef SHEEPSHAVER + fprintf(f, " r24 %08x", log[j].extra); +#endif + fprintf(f, "| "); #if !ENABLE_MON fprintf(f, "\n"); #endif diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp index d4fcc59c..f021aa6e 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.hpp @@ -101,6 +101,7 @@ protected: #endif uint32 pc; uint32 opcode; + uint32 extra; }; // Instruction formats @@ -202,10 +203,12 @@ public: // Handle flight recorder #if PPC_FLIGHT_RECORDER + bool is_logging() { return logging; } void start_log() { logging = true; } void stop_log() { logging = false; } void dump_log(const char *filename = NULL); #else + bool is_logging() { return false; } void start_log() { } void stop_log() { } void dump_log(const char *filename = NULL) { } diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-execute.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-execute.cpp index e678dd89..910f93aa 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-execute.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-execute.cpp @@ -566,7 +566,7 @@ void powerpc_cpu::execute_loadstore_multiple(uint32 opcode) // FIXME: generate exception if ea is not word-aligned if ((ea & 3) != 0) { #ifdef SHEEPSHAVER - D(bug("unaligned EA load/store multiple\n")); + D(bug("unaligned load/store multiple to %08x\n", ea)); increment_pc(4); return; #else