]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/X64/CpuIdEx.S
Refine comments of X64 assembly files of MDE BaseLib.
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / CpuIdEx.S
index e5317e04cbf62f060a3f44c57685530fb1bfcbaf..32abf114dbb00bd99927a075c88fb5dfddb450d5 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 #
-# Copyright (c) 2006, Intel Corporation
+# Copyright (c) 2006 - 2008, Intel Corporation
 # All rights reserved. This program and the accompanying materials
 # are licensed and made available under the terms and conditions of the BSD License
 # which accompanies this distribution.  The full text of the license may be found at
@@ -11,7 +11,7 @@
 #
 # Module Name:
 #
-#   CpuIdEx.Asm
+#   CpuIdEx.S
 #
 # Abstract:
 #
 #    OUT  UINT32  *RegisterOutEdx  OPTIONAL
 #    )
 #------------------------------------------------------------------------------
-.global _AsmCpuidEx
-_AsmCpuidEx:
+.global ASM_PFX(AsmCpuidEx)
+ASM_PFX(AsmCpuidEx):
     push    %rbx
     movl    %ecx,%eax
     movl    %edx,%ecx
-    push    %rax
+    push    %rax                  # save Index on stack
     cpuid
     mov     0x38(%rsp), %r10
     test    %r10, %r10
@@ -57,6 +57,6 @@ L3:
     jrcxz   L4
     mov     %edx, (%rcx)
 L4: 
-    pop     %rax
+    pop     %rax                  # restore Index to rax as return value
     pop     %rbx
     ret