]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/CpuId.S
1. Updated some files’ description files in MdePkg, EdkModulePkg & EdkNt32Pkg.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / CpuId.S
index 989daba1272aaf06c8e223f1d71d53ea954aea7d..c394de926d4602a03c306aaa42bced356209bcdb 100644 (file)
@@ -22,8 +22,6 @@
 #------------------------------------------------------------------------------\r
 \r
 \r
-\r
-\r
 #------------------------------------------------------------------------------\r
 #  VOID\r
 #  EFIAPI\r
 #    OUT  UINT32  *RegisterOutEdx  OPTIONAL\r
 #    )\r
 #------------------------------------------------------------------------------\r
-.globl _AsmCpuid\r
+.globl  _AsmCpuid\r
 _AsmCpuid:\r
-    push   %ebx\r
-    push   %edi\r
-    movl    12(%esp),%eax\r
+    pushl   %ebx\r
+    pushl   %ebp\r
+    movl    %esp, %ebp\r
+    movl    12(%ebp), %eax\r
     cpuid\r
-    movl    %ecx,%edi\r
-    movl    16(%esp),%ecx\r
+    pushl   %ecx\r
+    movl    16(%ebp), %ecx\r
     jecxz   L1\r
-    movl    %eax,(%ecx)\r
-L1:\r
-    movl    20(%esp),%ecx\r
+    movl    %eax, (%ecx)\r
+L1: \r
+    movl    20(%ebp), %ecx\r
     jecxz   L2\r
-    movl    %ebx,(%ecx)\r
-L2:\r
-    movl    24(%esp),%ecx\r
+    movl    %ebx, (%ecx)\r
+L2: \r
+    movl    24(%ebp), %ecx\r
     jecxz   L3\r
-    movl    %edi,(%ecx)\r
-L3:\r
-    movl    28(%esp),%ecx\r
+    popl    (%ecx)\r
+L3: \r
+    movl    28(%ebp), %ecx\r
     jecxz   L4\r
-    movl    %edx,(%ecx)\r
-L4:\r
-    pop    %edi\r
-    pop    %ebx\r
+    movl    %edx, (%ecx)\r
+L4: \r
+    movl    12(%ebp), %eax\r
+    leave\r
+    popl    %ebx\r
     ret\r
+\r
+\r