]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/X64/ProcessorAsms.S
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / X64 / ProcessorAsms.S
index 5253c0e2d10388c45216212b7afe24b4589b3216..2d464488cc2fea7593cf0a140752a0425f99a650 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
 # 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        
@@ -99,6 +99,19 @@ ASM_PFX(TransferControlSetJump):
       mov    %r13,0x40(%rdx)
       mov    %r14,0x48(%rdx)
       mov    %r15,0x50(%rdx)
+      #; save non-volatile fp registers\r
+      stmxcsr 0x60(%rdx)\r
+      lea     0x68(%rdx), %rax\r
+      movdqu  %xmm6, (%rax) \r
+      movdqu  %xmm7, 0x10(%rax)\r
+      movdqu  %xmm8, 0x20(%rax)\r
+      movdqu  %xmm9, 0x30(%rax)\r
+      movdqu  %xmm10, 0x40(%rax)\r
+      movdqu  %xmm11, 0x50(%rax)\r
+      movdqu  %xmm12, 0x60(%rax)\r
+      movdqu  %xmm13, 0x70(%rax)\r
+      movdqu  %xmm14, 0x80(%rax)\r
+      movdqu  %xmm15, 0x90(%rax)\r
       mov    (%rsp),%rax
       mov    %rax,0x58(%rdx)
       mov    $0x0,%rax
@@ -115,7 +128,20 @@ ASM_PFX(TransferControlSetJump):
 #
 #
 ASM_PFX(TransferControlLongJump):
-  # set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP
+      # set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP
+      #; load non-volatile fp registers\r
+      ldmxcsr 0x60(%rdx)\r
+      lea     0x68(%rdx), %rax\r
+      movdqu  (%rax), %xmm6\r
+      movdqu  0x10(%rax), %xmm7\r
+      movdqu  0x20(%rax), %xmm8\r
+      movdqu  0x30(%rax), %xmm9\r
+      movdqu  0x40(%rax), %xmm10\r
+      movdqu  0x50(%rax), %xmm11\r
+      movdqu  0x60(%rax), %xmm12\r
+      movdqu  0x70(%rax), %xmm13\r
+      movdqu  0x80(%rax), %xmm14\r
+      movdqu  0x90(%rax), %xmm15\r
       mov    $0x5,%rax
       mov    (%rdx),%rbx
       mov    0x8(%rdx),%rsp