mirror of
https://github.com/elliotnunn/powermac-rom.git
synced 2024-06-01 01:41:30 +00:00
fix EmuKCallTblPtrLogical
This commit is contained in:
parent
681bd4e52f
commit
5fd5b541aa
|
@ -43,7 +43,7 @@ ExceptionAfterRetry
|
|||
lwz r8, KDP.r13(r1)
|
||||
stw r8, CB.r13(r6)
|
||||
|
||||
bge RunSystemContext ; Alt Context has left exception disabled => Sys Context
|
||||
bge RunSystemContext ; Alt Context has left exception disabled => Sys Context
|
||||
;fall through ; exception enabled => run userspace handler
|
||||
|
||||
########################################################################
|
||||
|
@ -62,12 +62,11 @@ RunExceptionHandler
|
|||
li r8, 0 ; r8/Enables = 0 (handler must not throw exception)
|
||||
lwz r10, CB.ExceptionHandler(r6) ; r10/SRR0 = handler addr
|
||||
lwz r4, CB.ExceptionHandlerR4(r6) ; r4 = arbitrary second argument
|
||||
lwz r3, KDP.ECBPtrLogical(r1) ; r3 = ContextBlock ptr
|
||||
lwz r3, KDP.ECBPtrLogical(r1) ; r3 = ContextBlock ptr
|
||||
bc BO_IF, bitFlagEmu, @sys
|
||||
lwz r3, KDP.NCBCacheLA0(r1)
|
||||
@sys
|
||||
lwz r12, KDP.LA_EmuKCallTbl + KCallTbl.ReturnFromException(r1)
|
||||
; r12/LR = address of KCallReturnFromException trap
|
||||
lwz r12, KDP.EmuKCallTblPtrLogical(r1) ; r12/LR = address of KCallReturnFromException trap
|
||||
|
||||
bcl BO_IF, bitFlagLowSaves, PreferRegistersFromKDPSavingContextBlock ; ???
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ InitKernelGlobals
|
|||
lwz r12, NKConfigurationInfo.LA_EmulatorCode(rCI)
|
||||
lwz r11, NKConfigurationInfo.KernelTrapTableOffset(rCI)
|
||||
add r12, r12, r11
|
||||
stw r12, KDP.LA_EmuKCallTbl(r1)
|
||||
stw r12, KDP.EmuKCallTblPtrLogical(r1)
|
||||
|
||||
bl * + 4
|
||||
mflr r12
|
||||
|
@ -371,7 +371,7 @@ InitEmulator
|
|||
lwz r12, NKConfigurationInfo.LA_DispatchTable(rCI) ; address of 512kb Emu dispatch table
|
||||
stw r12, CB.ExceptionOriginR4(r11)
|
||||
|
||||
lwz r12, KDP.LA_EmuKCallTbl(r1) ; address of KCallReturnFromException trap
|
||||
lwz r12, KDP.EmuKCallTblPtrLogical(r1) ; address of KCallReturnFromException trap
|
||||
stw r12, CB.ExceptionHandlerRetAddr(r11)
|
||||
|
||||
|
||||
|
@ -406,7 +406,7 @@ InitEmulator
|
|||
stw r7, KDP.Flags(r1)
|
||||
|
||||
|
||||
lwz r10, KDP.LA_EmuKCallTbl(r1) ; Start at KCallReturnFromException trap
|
||||
lwz r10, KDP.EmuKCallTblPtrLogical(r1) ; Start at KCallReturnFromException trap
|
||||
|
||||
|
||||
mfmsr r14 ; Calculate the user space MSR
|
||||
|
|
|
@ -113,7 +113,7 @@ KCallRunAlternateContext
|
|||
addi r8, r1, KDP.VecTblAlternate ; the only use of this vector table?
|
||||
mtsprg 3, r8
|
||||
|
||||
lwz r8, KDP.LA_EmuKCallTbl(r1)
|
||||
lwz r8, KDP.EmuKCallTblPtrLogical(r1)
|
||||
mtcrf 0x3f, r7
|
||||
clrlwi r7, r7, 8
|
||||
stw r8, CB.ExceptionHandlerRetAddr(r9)
|
||||
|
@ -339,7 +339,7 @@ IntProgram
|
|||
stw r13, CB.r13(r6)
|
||||
|
||||
; Compare SRR0 with address of Emulator's KCall trap table
|
||||
lwz r8, KDP.LA_EmuKCallTbl(r1)
|
||||
lwz r8, KDP.EmuKCallTblPtrLogical(r1)
|
||||
mfsrr0 r10
|
||||
mfcr r13
|
||||
xor. r8, r10, r8
|
||||
|
|
Loading…
Reference in New Issue
Block a user