Save label "@F" to 64-bit register (r10) instead of 32-bit register (eax) in case label @F is above 4G.

Use "far retq" to load CS and 64-bit rip instead.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8455 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qhuang8 2009-06-03 08:11:34 +00:00
parent 693c4e024f
commit 1a76fbef84
1 changed files with 5 additions and 5 deletions

View File

@ -36,14 +36,14 @@
;------------------------------------------------------------------------------
InternalX86DisablePaging64 PROC
cli
shl rcx, 32 ; rcx[32..47] <- Cs
lea eax, @F
lea r10, @F
mov esi, r8d
or rcx, rax ; rcx[0..47] <- Cs:@F
mov edi, r9d
mov eax, [rsp + 28h] ; eax <- New Stack
push rcx
retf ; switch to compatibility mode
push rcx ; push Cs to stack
push r10
DB 48h ; prefix to composite "retq" with next "retf"
retf ; Use far return to load CS register from stack
@@:
mov esp, eax ; set up new stack
mov rax, cr0