diff options
author | Elvin Li <elvin.li@intel.com> | 2013-10-29 06:52:25 +0000 |
---|---|---|
committer | li-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-10-29 06:52:25 +0000 |
commit | a93b0e3f6895a074b99c8817181dfa6dbc7a4807 (patch) | |
tree | 196beb9be463be1c67ce1d3ee9f6e49b916da229 /MdePkg/Library/BaseLib/X64/Thunk16.asm | |
parent | d1edec0a33dd6c10249c094c6ccb60c6c98d7b27 (diff) | |
download | edk2-platforms-a93b0e3f6895a074b99c8817181dfa6dbc7a4807.tar.xz |
Use rsp instead of esp to save 64-bit stack pointer.
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14812 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseLib/X64/Thunk16.asm')
-rw-r--r-- | MdePkg/Library/BaseLib/X64/Thunk16.asm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.asm b/MdePkg/Library/BaseLib/X64/Thunk16.asm index 01051341f6..e01de272d2 100644 --- a/MdePkg/Library/BaseLib/X64/Thunk16.asm +++ b/MdePkg/Library/BaseLib/X64/Thunk16.asm @@ -142,8 +142,8 @@ SavedCr0 DD ? SavedCs DW ?
@64BitCode:
db 090h
- db 067h, 0bch ; mov esp, imm32
-SavedSp DD ? ; restore stack
+ db 048h, 0bch ; mov rsp, imm64
+SavedSp DQ ? ; restore stack
nop
ret
_BackFromUserCode ENDP
@@ -294,7 +294,7 @@ InternalAsmThunk16 PROC USES rbp rbx rsi rdi push r8
mov r8d, cs
mov [rcx + (SavedCs - SavedCr4)], r8w
- mov [rcx + (SavedSp - SavedCr4)], esp
+ mov [rcx + (SavedSp - SavedCr4)], rsp
jmp fword ptr [rcx + (_EntryPoint - SavedCr4)]
@RetFromRealMode:
popfq
|