]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/X64/Thunk16.S
Fix the issue to clear the high 16-bit of EAX before use it Thunk code.
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / Thunk16.S
index 4c3c5605fa12408848015665562bc6f3ebd9c03c..d037a71043a06f15888e21e679ef3d19d2c5efce 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -109,7 +109,8 @@ L_1:
     orb     $2,%al\r
     outb    %al, $0x92                   # deactivate A20M#\r
 L_2: \r
-    movw    %ss,%ax\r
+    xorw    %ax, %ax                     # xor eax, eax\r
+    movl    %ss, %eax                    # mov ax, ss\r
     lea     IA32_REGS_SIZE(%esp), %bp\r
     #\r
     # rsi in the following 2 instructions is indeed bp in 16-bit code\r