diff options
author | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-10 08:07:37 +0000 |
---|---|---|
committer | gikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-10 08:07:37 +0000 |
commit | 63b65a9e4f8b93af810c45a47702602394015769 (patch) | |
tree | 722eba8a719026df3e5bf11c82c769fb26353194 /MdePkg/Library | |
parent | 9b9641c6d92c5222a2ad457273cdb9a3b32ecaa3 (diff) | |
download | edk2-63b65a9e4f8b93af810c45a47702602394015769.tar.gz edk2-63b65a9e4f8b93af810c45a47702602394015769.tar.bz2 edk2-63b65a9e4f8b93af810c45a47702602394015769.zip |
Save/Restore xmm6-xmm15 in function setJump/longJump for GAS.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8507 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library')
-rw-r--r-- | MdePkg/Library/BaseLib/X64/LongJump.S | 12 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/X64/SetJump.S | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/X64/LongJump.S b/MdePkg/Library/BaseLib/X64/LongJump.S index d43fcf000f..a0fe61f8e7 100644 --- a/MdePkg/Library/BaseLib/X64/LongJump.S +++ b/MdePkg/Library/BaseLib/X64/LongJump.S @@ -38,5 +38,17 @@ ASM_PFX(InternalLongJump): mov 0x30(%rcx), %r13
mov 0x38(%rcx), %r14
mov 0x40(%rcx), %r15
+ # load non-volatile fp registers
+ ldmxcsr 0x50(%rcx)
+ movdqa 0x58(%rcx), %xmm6
+ movdqa 0x68(%rcx), %xmm7
+ movdqa 0x78(%rcx), %xmm8
+ movdqa 0x88(%rcx), %xmm9
+ movdqa 0x98(%rcx), %xmm10
+ movdqa 0xA8(%rcx), %xmm11
+ movdqa 0xB8(%rcx), %xmm12
+ movdqa 0xC8(%rcx), %xmm13
+ movdqa 0xD8(%rcx), %xmm14
+ movdqa 0xE8(%rcx), %xmm15
mov %rdx, %rax # set return value
jmp *0x48(%rcx)
diff --git a/MdePkg/Library/BaseLib/X64/SetJump.S b/MdePkg/Library/BaseLib/X64/SetJump.S index d8454d3965..3ba5be6f15 100644 --- a/MdePkg/Library/BaseLib/X64/SetJump.S +++ b/MdePkg/Library/BaseLib/X64/SetJump.S @@ -37,5 +37,17 @@ ASM_PFX(SetJump): mov %r14,0x38(%rcx)
mov %r15,0x40(%rcx)
mov %rdx,0x48(%rcx)
+ # save non-volatile fp registers
+ stmxcsr 0x50(%rcx)
+ movdqa %xmm6, 0x58(%rcx)
+ movdqa %xmm7, 0x68(%rcx)
+ movdqa %xmm8, 0x78(%rcx)
+ movdqa %xmm9, 0x88(%rcx)
+ movdqa %xmm10, 0x98(%rcx)
+ movdqa %xmm11, 0xA8(%rcx)
+ movdqa %xmm12, 0xB8(%rcx)
+ movdqa %xmm13, 0xC8(%rcx)
+ movdqa %xmm14, 0xD8(%rcx)
+ movdqa %xmm15, 0xE8(%rcx)
xor %rax,%rax
jmpq *%rdx
|