fix aligns

now they are byte-perfect... but customized...
This commit is contained in:
Elliot Nunn 2018-07-08 18:05:24 +08:00
parent bdc296adef
commit 71c936c302
6 changed files with 28 additions and 17 deletions

View File

@ -98,7 +98,7 @@ PreferRegistersFromKDPSavingContextBlock
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
KCallReturnFromExceptionFastPath KCallReturnFromExceptionFastPath
lwz r11, KDP.NanoKernelInfo + NKNanoKernelInfo.NanoKernelCallCounts(r1) lwz r11, KDP.NanoKernelInfo + NKNanoKernelInfo.NanoKernelCallCounts(r1)
mr r10, r12 mr r10, r12

View File

@ -2,7 +2,7 @@
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
IntFPUnavail IntFPUnavail
; Reload the FPU ; Reload the FPU

View File

@ -46,7 +46,7 @@
align kIntAlign _alignToCacheBlock
IntDecrementer ; OUTSIDE REFERER IntDecrementer ; OUTSIDE REFERER
@ -108,7 +108,7 @@ IntDecrementer_0x54
; Kick it to the FDP-associated MemRetryDSI ; Kick it to the FDP-associated MemRetryDSI
align kIntAlign _alignToCacheBlock
IntDSI IntDSI
@ -250,7 +250,7 @@ major_0x03324_0x12c
; This int handler is our best foothold into the FDP! ; This int handler is our best foothold into the FDP!
align kIntAlign _alignToCacheBlock
IntAlignment ; OUTSIDE REFERER IntAlignment ; OUTSIDE REFERER
mfsprg r1, 0 mfsprg r1, 0
@ -372,7 +372,7 @@ major_0x03548_0x20 ; OUTSIDE REFERER
align kIntAlign _alignToCacheBlock
MemRetryDSI ; OUTSIDE REFERER MemRetryDSI ; OUTSIDE REFERER
@ -591,7 +591,7 @@ MemRetryMachineCheck_0x14c ; OUTSIDE REFERER
align kIntAlign _alignToCacheBlock
IntISI ; OUTSIDE REFERER IntISI ; OUTSIDE REFERER
@ -696,7 +696,7 @@ MaskedInterruptTaken ; OUTSIDE REFERER
align kIntAlign _alignToCacheBlock
PIHDSI ; OUTSIDE REFERER PIHDSI ; OUTSIDE REFERER
mfspr r8, dsisr mfspr r8, dsisr
@ -731,7 +731,7 @@ PIHDSI ; OUTSIDE REFERER
# # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # # ##
# # #### # # ###### # #### # # # # # # # #### # # ####### # # #### ###### # # # #### # # # # #### # # ###### # #### # # # # # # # #### # # ####### # # #### ###### # # # #### # #
align kIntAlign _alignToCacheBlock
; dead code? ; dead code?

View File

@ -310,3 +310,14 @@ _bclr_lbit set 31
addi &rd, &rs, (&label-NKTop) addi &rd, &rs, (&label-NKTop)
ENDM ENDM
MACRO
_alignToCacheBlock
IF (*-NKTop) & 0x1f
b * + 4
_alignToCacheBlock
ENDIF
ENDM

View File

@ -26,7 +26,7 @@
; three interrupts will return the CPU to full-on mode, and we will return ; three interrupts will return the CPU to full-on mode, and we will return
; from the PowerDispatch call. Called at NK init time. ; from the PowerDispatch call. Called at NK init time.
align kIntAlign _alignToCacheBlock
InitIdleVecTable InitIdleVecTable
@ -57,7 +57,7 @@ InitIdleVecTable
; ARG selector r3 (0-11), ... ; ARG selector r3 (0-11), ...
align kIntAlign _alignToCacheBlock
kcPowerDispatch kcPowerDispatch

View File

@ -94,7 +94,7 @@ IllegalInstruction
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
KCallRunAlternateContext KCallRunAlternateContext
; ARG ContextBlock *r3, flags r4 ; ARG ContextBlock *r3, flags r4
@ -240,7 +240,7 @@ KCallRunAlternateContext
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
KCallResetSystem KCallResetSystem
; PPC trap 1, or indirectly, 68k RESET ; PPC trap 1, or indirectly, 68k RESET
@ -267,7 +267,7 @@ Reset
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
KCallPrioritizeInterrupts KCallPrioritizeInterrupts
; Left side: roll back the interrupt preparation before the int handler repeats is ; Left side: roll back the interrupt preparation before the int handler repeats is
; Right side: jump to the external interrupt handler (PIH or IntProgram) ; Right side: jump to the external interrupt handler (PIH or IntProgram)
@ -324,7 +324,7 @@ KCallSystemCrash
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
IntProgram IntProgram
; (also called when the Alternate Context gets an External Int => Exception) ; (also called when the Alternate Context gets an External Int => Exception)
@ -423,7 +423,7 @@ IntProgram
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
IntSyscall IntSyscall
bl LoadInterruptRegisters bl LoadInterruptRegisters
@ -435,7 +435,7 @@ IntSyscall
######################################################################## ########################################################################
align kIntAlign _alignToCacheBlock
IntTrace IntTrace
bl LoadInterruptRegisters bl LoadInterruptRegisters