]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
Fix bug in AsmCpuVirtual() to return 1 instead of 0 when CPU is in virtual mode.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / SwapBytes64.S
index 313f4164faf0ef47afff39ee01bd0bf23823eab2..4c57c130dd20d0be2e756340b20ee6bc98b0402a 100644 (file)
@@ -1,12 +1,7 @@
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
-\r
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2006 - 2008, 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
 # http://opensource.org/licenses/bsd-license.php\r
@@ -16,7 +11,7 @@
 #\r
 # Module Name:\r
 #\r
-#   CpuId.Asm\r
+#   CpuId.S\r
 #\r
 # Abstract:\r
 #\r
 #   IN      UINT64                    Operand\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.globl ASM_PFX(InternalMathSwapBytes64)\r
+ASM_GLOBAL ASM_PFX(InternalMathSwapBytes64)\r
 ASM_PFX(InternalMathSwapBytes64):\r
-    movl    8(%esp), %eax\r
-    movl    4(%esp), %edx\r
+    movl    8(%esp), %eax               # eax <- upper 32 bits\r
+    movl    4(%esp), %edx               # edx <- lower 32 bits\r
     bswapl  %eax\r
     bswapl  %edx\r
     ret\r