diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-08 00:14:23 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-12-08 00:14:23 +0000 |
commit | fe295078f26cc08652e167783722fad6bb089d81 (patch) | |
tree | 234afbe1e1df999a009d5eacec98e34a66806984 | |
parent | 6638a865ed2e21c91f96147475a8da50fd63cc94 (diff) | |
download | edk2-platforms-fe295078f26cc08652e167783722fad6bb089d81.tar.xz |
Add vpush/vpop to the exception handler as we added CopyMem/SetMem that can use NEON registers to speed things up. This means we need to save state so we don't blow up a CopyMem.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11130 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S | 5 | ||||
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.asm | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S b/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S index edf3d4723f..a4e165fdc7 100644 --- a/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S +++ b/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S @@ -57,6 +57,7 @@ This is the stack constructed by the exception handler (low address to high addr .globl ASM_PFX(CommonCExceptionHandler) .text +.fpu neon @ makes vpush/vpop assemble .align 3 @@ -246,6 +247,8 @@ NoAdjustNeeded: @ R0 is ExceptionType mov R1,SP @ R1 is SystemContext + vpush {d0-d15} @ save vstm registers in case they are used in optimizations
+ /* VOID EFIAPI @@ -257,6 +260,8 @@ CommonCExceptionHandler ( */ blx ASM_PFX(CommonCExceptionHandler) @ Call exception handler + vpop {d0-d15} + ldr R1, [SP, #0x4c] @ Restore EFI_SYSTEM_CONTEXT_ARM.IFSR mcr p15, 0, R1, c5, c0, 1 @ Write IFSR diff --git a/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.asm b/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.asm index 8584ef0794..a8a477026e 100644 --- a/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.asm +++ b/ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.asm @@ -243,6 +243,8 @@ NoAdjustNeeded ; R0 is ExceptionType mov R1,SP ; R1 is SystemContext + vpush {d0-d15} ; save vstm registers in case they are used in optimizations
+ /* VOID EFIAPI @@ -253,6 +255,8 @@ CommonCExceptionHandler ( */ blx CommonCExceptionHandler ; Call exception handler +
+ vpop {d0-d15}
ldr R1, [SP, #0x4c] ; Restore EFI_SYSTEM_CONTEXT_ARM.IFSR mcr p15, 0, R1, c5, c0, 1 ; Write IFSR |