mirror of https://github.com/acidanthera/audk.git
Update ECP Package Glue BaseLib to save/restore xmm6-xmm15 in functions setJump/longJump.
Signed-off-by: lgao4 Reviewed-by: jyao1 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13037 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
3dbef428c7
commit
287d8d1192
|
@ -1,6 +1,6 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2012, 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
|
||||
|
@ -151,6 +151,8 @@ typedef struct {
|
|||
UINT64 R14;
|
||||
UINT64 R15;
|
||||
UINT64 Rip;
|
||||
UINT64 MxCsr;
|
||||
UINT8 XmmBuffer[160]; ///< XMM6-XMM15.
|
||||
} BASE_LIBRARY_JUMP_BUFFER;
|
||||
|
||||
#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2012, 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# Module Name:
|
||||
#
|
||||
# LongJump.Asm
|
||||
# LongJump.S
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
|
@ -38,5 +38,17 @@ ASM_PFX(InternalLongJump):
|
|||
mov 0x30(%rcx), %r13
|
||||
mov 0x38(%rcx), %r14
|
||||
mov 0x40(%rcx), %r15
|
||||
mov %rdx, %rax
|
||||
# load non-volatile fp registers
|
||||
ldmxcsr 0x50(%rcx)
|
||||
movdqu 0x58(%rcx), %xmm6
|
||||
movdqu 0x68(%rcx), %xmm7
|
||||
movdqu 0x78(%rcx), %xmm8
|
||||
movdqu 0x88(%rcx), %xmm9
|
||||
movdqu 0x98(%rcx), %xmm10
|
||||
movdqu 0xA8(%rcx), %xmm11
|
||||
movdqu 0xB8(%rcx), %xmm12
|
||||
movdqu 0xC8(%rcx), %xmm13
|
||||
movdqu 0xD8(%rcx), %xmm14
|
||||
movdqu 0xE8(%rcx), %xmm15
|
||||
mov %rdx, %rax # set return value
|
||||
jmp *0x48(%rcx)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2004 - 2012, 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
|
||||
|
@ -37,7 +37,19 @@ InternalLongJump PROC
|
|||
mov r13, [rcx + 30h]
|
||||
mov r14, [rcx + 38h]
|
||||
mov r15, [rcx + 40h]
|
||||
mov rax, rdx ; set return value
|
||||
; load non-volatile fp registers
|
||||
ldmxcsr [rcx + 50h]
|
||||
movdqu xmm6, [rcx + 58h]
|
||||
movdqu xmm7, [rcx + 68h]
|
||||
movdqu xmm8, [rcx + 78h]
|
||||
movdqu xmm9, [rcx + 88h]
|
||||
movdqu xmm10, [rcx + 98h]
|
||||
movdqu xmm11, [rcx + 0A8h]
|
||||
movdqu xmm12, [rcx + 0B8h]
|
||||
movdqu xmm13, [rcx + 0C8h]
|
||||
movdqu xmm14, [rcx + 0D8h]
|
||||
movdqu xmm15, [rcx + 0E8h]
|
||||
mov rax, rdx ; set return value
|
||||
jmp qword ptr [rcx + 48h]
|
||||
InternalLongJump ENDP
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2006 - 2012, 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
|
||||
|
@ -38,5 +38,17 @@ ASM_PFX(SetJump):
|
|||
mov %r14,0x38(%rcx)
|
||||
mov %r15,0x40(%rcx)
|
||||
mov %rdx,0x48(%rcx)
|
||||
# save non-volatile fp registers
|
||||
stmxcsr 0x50(%rcx)
|
||||
movdqu %xmm6, 0x58(%rcx)
|
||||
movdqu %xmm7, 0x68(%rcx)
|
||||
movdqu %xmm8, 0x78(%rcx)
|
||||
movdqu %xmm9, 0x88(%rcx)
|
||||
movdqu %xmm10, 0x98(%rcx)
|
||||
movdqu %xmm11, 0xA8(%rcx)
|
||||
movdqu %xmm12, 0xB8(%rcx)
|
||||
movdqu %xmm13, 0xC8(%rcx)
|
||||
movdqu %xmm14, 0xD8(%rcx)
|
||||
movdqu %xmm15, 0xE8(%rcx)
|
||||
xor %rax,%rax
|
||||
jmpq *%rdx
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
|
||||
; Copyright (c) 2004 - 2012, 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
|
||||
|
@ -45,6 +45,18 @@ SetJump PROC
|
|||
mov [rcx + 38h], r14
|
||||
mov [rcx + 40h], r15
|
||||
mov [rcx + 48h], rdx
|
||||
; save non-volatile fp registers
|
||||
stmxcsr [rcx + 50h]
|
||||
movdqu [rcx + 58h], xmm6
|
||||
movdqu [rcx + 68h], xmm7
|
||||
movdqu [rcx + 78h], xmm8
|
||||
movdqu [rcx + 88h], xmm9
|
||||
movdqu [rcx + 98h], xmm10
|
||||
movdqu [rcx + 0A8h], xmm11
|
||||
movdqu [rcx + 0B8h], xmm12
|
||||
movdqu [rcx + 0C8h], xmm13
|
||||
movdqu [rcx + 0D8h], xmm14
|
||||
movdqu [rcx + 0E8h], xmm15
|
||||
xor rax, rax
|
||||
jmp rdx
|
||||
SetJump ENDP
|
||||
|
|
Loading…
Reference in New Issue