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.72 by gbeauche, 2007-01-17T06:20:36Z vs.
Revision 1.74 by gbeauche, 2007-12-30T09:18:40Z

# Line 118 | Line 118 | static uint8 *emul_op_trampoline;
118   static uint8 *native_op_trampoline;
119   #endif
120  
121 // JIT Compiler enabled?
122 static inline bool enable_jit_p()
123 {
124        return PrefsFindBool("jit");
125 }
126
121  
122   /**
123   *              PowerPC emulator glue with special 'sheep' opcodes
# Line 177 | Line 171 | public:
171          void interrupt(uint32 entry);
172  
173          // Make sure the SIGSEGV handler can access CPU registers
174 <        friend sigsegv_return_t sigsegv_handler(sigsegv_address_t, sigsegv_address_t);
174 >        friend sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip);
175   };
176  
177   sheepshaver_cpu::sheepshaver_cpu()
184        : powerpc_cpu(enable_jit_p())
178   {
179          init_decoder();
180 +
181 + #if PPC_ENABLE_JIT
182 +        if (PrefsFindBool("jit"))
183 +                enable_jit();
184 + #endif
185   }
186  
187   void sheepshaver_cpu::init_decoder()
# Line 732 | Line 730 | static void dump_log(void)
730   *  Initialize CPU emulation
731   */
732  
733 < sigsegv_return_t sigsegv_handler(sigsegv_address_t fault_address, sigsegv_address_t fault_instruction)
733 > sigsegv_return_t sigsegv_handler(sigsegv_info_t *sip)
734   {
735   #if ENABLE_VOSF
736          // Handle screen fault
737 <        extern bool Screen_fault_handler(sigsegv_address_t, sigsegv_address_t);
738 <        if (Screen_fault_handler(fault_address, fault_instruction))
737 >        extern bool Screen_fault_handler(sigsegv_info_t *sip);
738 >        if (Screen_fault_handler(sip))
739                  return SIGSEGV_RETURN_SUCCESS;
740   #endif
741  
742 <        const uintptr addr = (uintptr)fault_address;
742 >        const uintptr addr = (uintptr)sigsegv_get_fault_address(sip);
743   #if HAVE_SIGSEGV_SKIP_INSTRUCTION
744          // Ignore writes to ROM
745          if ((addr - (uintptr)ROMBaseHost) < ROM_SIZE)
# Line 792 | Line 790 | sigsegv_return_t sigsegv_handler(sigsegv
790   #endif
791  
792          fprintf(stderr, "SIGSEGV\n");
793 <        fprintf(stderr, "  pc %p\n", fault_instruction);
794 <        fprintf(stderr, "  ea %p\n", fault_address);
793 >        fprintf(stderr, "  pc %p\n", sigsegv_get_fault_instruction_address(sip));
794 >        fprintf(stderr, "  ea %p\n", sigsegv_get_fault_address(sip));
795          dump_registers();
796          ppc_cpu->dump_log();
797          enter_mon();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines