#------------------------------------------------------------------------------
#
-# 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
#
# 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
jrcxz L4
mov %edx, (%rcx)
L4:
- pop %rax
+ pop %rax # restore Index to rax as return value
pop %rbx
ret