#------------------------------------------------------------------------------\r
#\r
-# Copyright (c) 2006, Intel Corporation\r
+# Copyright (c) 2006 - 2008, Intel Corporation\r
# All rights reserved. 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
#\r
# Module Name:\r
#\r
-# CpuId.Asm\r
+# CpuId.S\r
#\r
# Abstract:\r
#\r
#\r
#------------------------------------------------------------------------------\r
\r
-\r
-\r
+ASM_GLOBAL ASM_PFX(AsmCpuid)\r
\r
#------------------------------------------------------------------------------\r
# VOID\r
# OUT UINT32 *RegisterOutEdx OPTIONAL\r
# )\r
#------------------------------------------------------------------------------\r
-.globl _AsmCpuid\r
-_AsmCpuid:\r
- push %ebx\r
- push %edi\r
- movl 12(%esp),%eax\r
+ASM_PFX(AsmCpuid):\r
+ push %ebx\r
+ push %ebp\r
+ movl %esp, %ebp\r
+ movl 12(%ebp), %eax\r
cpuid\r
- movl %ecx,%edi\r
- movl 16(%esp),%ecx\r
+ push %ecx\r
+ movl 16(%ebp), %ecx\r
jecxz L1\r
- movl %eax,(%ecx)\r
+ movl %eax, (%ecx)\r
L1:\r
- movl 20(%esp),%ecx\r
+ movl 20(%ebp), %ecx\r
jecxz L2\r
- movl %ebx,(%ecx)\r
+ movl %ebx, (%ecx)\r
L2:\r
- movl 24(%esp),%ecx\r
+ movl 24(%ebp), %ecx\r
jecxz L3\r
- movl %edi,(%ecx)\r
+ popl (%ecx)\r
L3:\r
- movl 28(%esp),%ecx\r
+ movl 28(%ebp), %ecx\r
jecxz L4\r
- movl %edx,(%ecx)\r
+ movl %edx, (%ecx)\r
L4:\r
- pop %edi\r
- pop %ebx\r
+ movl 12(%ebp), %eax\r
+ leave\r
+ pop %ebx\r
ret\r