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.21 by gbeauche, 2003-12-04T17:26:38Z vs.
Revision 1.23 by gbeauche, 2003-12-05T13:37:56Z

# Line 73 | Line 73 | static void enter_mon(void)
73   #endif
74   }
75  
76 + // From main_*.cpp
77 + extern uintptr SignalStackBase();
78 +
79   // PowerPC EmulOp to exit from emulation looop
80   const uint32 POWERPC_EXEC_RETURN = POWERPC_EMUL_OP | 1;
81  
# Line 268 | Line 271 | void sheepshaver_cpu::interrupt(uint32 e
271   #endif
272  
273          // Initialize stack pointer to SheepShaver alternate stack base
274 <        SheepArray<64> stack_area;
272 <        gpr(1) = stack_area.addr();
274 >        gpr(1) = SignalStackBase() - 64;
275  
276          // Build trampoline to return from interrupt
277          SheepVar32 trampoline = POWERPC_EXEC_RETURN;
# Line 784 | Line 786 | void sheepshaver_cpu::handle_interrupt(v
786                                  if (InterruptFlags & INTFLAG_VIA) {
787                                          ClearInterruptFlag(INTFLAG_VIA);
788                                          ADBInterrupt();
789 <                                        ExecutePPC(VideoVBL);
789 >                                        ExecuteNative(NATIVE_VIDEO_VBL);
790                                  }
791                          }
792   #endif
# Line 908 | Line 910 | static void NativeOp(int selector)
910   }
911  
912   /*
911 *  Execute native subroutine (LR must contain return address)
912 */
913
914 void ExecuteNative(int selector)
915 {
916        SheepRoutineDescriptor desc(0, NativeTVECT(selector));
917        M68kRegisters r;
918        Execute68k(desc.addr(), &r);
919 }
920
921 /*
913   *  Execute 68k subroutine (must be ended with EXEC_RETURN)
914   *  This must only be called by the emul_thread when in EMUL_OP mode
915   *  r->a[7] is unused, the routine runs on the caller's stack

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines