]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Drivers/CpuDxe/ExceptionSupport.ARMv6.S
Update remaining ARM .S files with INTERWORK_FUNC macro. This is the 2nd half of...
[mirror_edk2.git] / ArmPkg / Drivers / CpuDxe / ExceptionSupport.ARMv6.S
index bf9a4d4b76bf71d460c93a8350441730275133a8..1c2bb62605f297053d7956f7867c47938a91ed58 100644 (file)
@@ -2,9 +2,9 @@
 #
 # Use ARMv6 instruction to operate on a single stack
 #
-# Copyright (c) 2008-2010 Apple Inc. All rights reserved.
+# Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
 #
-# All rights reserved. This program and the accompanying materials
+# This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
 # http://opensource.org/licenses/bsd-license.php
@@ -51,12 +51,20 @@ This is the stack constructed by the exception handler (low address to high addr
  
 
 .globl ASM_PFX(ExceptionHandlersStart)
+INTERWORK_FUNC(ExceptionHandlersStart)
 .globl ASM_PFX(ExceptionHandlersEnd)
+INTERWORK_FUNC(ExceptionHandlersEnd)
 .globl ASM_PFX(CommonExceptionEntry)
+INTERWORK_FUNC(CommonExceptionEntry)
 .globl ASM_PFX(AsmCommonExceptionEntry)
+INTERWORK_FUNC(AsmCommonExceptionEntry)
 .globl ASM_PFX(CommonCExceptionHandler)
+INTERWORK_FUNC(CommonCExceptionHandler)
 
 .text
+#if !defined(__APPLE__)
+.fpu neon    @ makes vpush/vpop assemble
+#endif
 .align 3
 
 
@@ -246,6 +254,9 @@ 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 +268,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