ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp
(Generate patch)

Comparing SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp (file contents):
Revision 1.23 by gbeauche, 2003-12-05T13:37:56Z vs.
Revision 1.24 by gbeauche, 2003-12-25T23:54:36Z

# Line 127 | Line 127 | public:
127          // Constructor
128          sheepshaver_cpu();
129  
130 <        // Condition Register accessors
130 >        // CR & XER accessors
131          uint32 get_cr() const           { return cr().get(); }
132          void set_cr(uint32 v)           { cr().set(v); }
133 +        uint32 get_xer() const          { return xer().get(); }
134 +        void set_xer(uint32 v)          { xer().set(v); }
135  
136          // Execute 68k routine
137          void execute_68k(uint32 entry, M68kRegisters *r);
# Line 241 | Line 243 | void sheepshaver_cpu::execute_sheep(uint
243                  for (int i = 0; i < 7; i++)
244                          r68.a[i] = gpr(16 + i);
245                  r68.a[7] = gpr(1);
246 +                uint32 saved_cr = get_cr() & CR_field<2>::mask();
247 +                uint32 saved_xer = get_xer();
248                  EmulOp(&r68, gpr(24), EMUL_OP_field::extract(opcode) - 3);
249 +                set_cr(saved_cr);
250 +                set_xer(saved_xer);
251                  for (int i = 0; i < 8; i++)
252                          gpr(8 + i) = r68.d[i];
253                  for (int i = 0; i < 7; i++)
# Line 623 | Line 629 | void init_emul_ppc(void)
629          // Initialize main CPU emulator
630          main_cpu = new sheepshaver_cpu();
631          main_cpu->set_register(powerpc_registers::GPR(3), any_register((uint32)ROM_BASE + 0x30d000));
632 +        main_cpu->set_register(powerpc_registers::GPR(4), any_register(KernelDataAddr + 0x1000));
633          WriteMacInt32(XLM_RUN_MODE, MODE_68K);
634  
635   #if MULTICORE_CPU
# Line 687 | Line 694 | void exit_emul_ppc(void)
694   void emul_ppc(uint32 entry)
695   {
696          current_cpu = main_cpu;
697 < #if DEBUG
697 > #if 0
698          current_cpu->start_log();
699   #endif
700          // start emulation loop and enable code translation or caching

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines