]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update GCC assembly files for MdePkg/Library/BaseLib/X64
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 23 Oct 2008 07:02:59 +0000 (07:02 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 23 Oct 2008 07:02:59 +0000 (07:02 +0000)
1. Fix bugs in assembly instructions
2. Change module names in comments from .asm to .S

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6196 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/X64/CpuIdEx.S
MdePkg/Library/BaseLib/X64/DisablePaging64.S
MdePkg/Library/BaseLib/X64/FlushCacheLine.S
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange32.S
MdePkg/Library/BaseLib/X64/InterlockedCompareExchange64.S
MdePkg/Library/BaseLib/X64/LongJump.S
MdePkg/Library/BaseLib/X64/WriteMm0.S

index d7154eb4fcd5a1459d2cc87311ed4b1cfbea06aa..62d698a58444f4c29efec11fbd2fee0fe02a4ca5 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:
 #
index 4ca4145fa263037df19259a474d7ac96f8bbf9b3..7a543febabc3e2a1656213fd9a77254e2d855e09 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
 ASM_PFX(InternalX86DisablePaging64):
     cli    
     shl    $0x20,%rcx
-    lea    (%rip), %eax
-    mov    %eax,%ecx
-    push   %rcx
-    mov    %edx,%ebx
-    mov    %r8d,%esi
-    mov    %r9d,%edi
-    mov    0x28(%rsp),%eax
-    lret   
+    lea    L1, %eax
+    mov    %r8d, %esi \r
+    or     %rax, %rcx\r
+    mov    %r9d, %edi \r
+    mov    0x28(%rsp), %eax\r
+    push   %rcx\r
+    ret\r
 L1:
     mov    %eax,%esp
     mov    %cr0,%rax
@@ -61,6 +60,6 @@ L1:
     mov    %rax,%cr4
     push   %rdi
     push   %rsi
-    callq  *%rbx
+    callq  *%rdx
     jmp    .
 
index 0d05d41f657d319c200ef0ed7cfa40d62e6f5a11..fa6cfb2e67d9ecb3f7155060a88446533deaa45a 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
@@ -31,6 +31,6 @@
 #------------------------------------------------------------------------------
 .global ASM_PFX(AsmFlushCacheLine)
 ASM_PFX(AsmFlushCacheLine):
-    clflush (%rdi)
-    mov     %rdi, %rax
+    clflush (%rcx)
+    mov     %rcx, %rax
     ret
index d248a1036943c1fb4b5c167044c0b5b517bc3d1c..8faca8b7b1f1370d929731df109e848b32aeea79 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\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
@@ -11,7 +11,7 @@
 #\r
 # Module Name:\r
 #\r
-#   InterlockedCompareExchange32.Asm\r
+#   InterlockedCompareExchange32.S\r
 #\r
 # Abstract:\r
 #\r
index 95f9d0501b6e2283ecf9aa01bec9c4c4e2c13e54..2034b670f1a750ab395d64a7def7c30c8a9a57fb 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
@@ -34,6 +34,6 @@
 .global ASM_PFX(InternalSyncCompareExchange64)
 .align 16
 ASM_PFX(InternalSyncCompareExchange64):
-    mov     %rsi, %rax
-    lock    cmpxchg %rdx,(%rdi)
+    mov     %rdx, %rax
+    lock    cmpxchg %r8,(%rcx)
     ret
index 1d6a916e04db3ff6c9136f016fecce3885eadfdc..69229c2bf18aaf219926c0c96d27f1e4759831a6 100644 (file)
@@ -11,7 +11,7 @@
 #\r
 # Module Name:\r
 #\r
-#   LongJump.Asm\r
+#   LongJump.S\r
 #\r
 # Abstract:\r
 #\r
index 03b0ae09c6e376b34685a2f3c4b48e3818d1bbc8..40e0a56dc34d362c061561b4e4e17376edea5967 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
@@ -31,5 +31,5 @@
 #------------------------------------------------------------------------------
 .global ASM_PFX(AsmWriteMm0)
 ASM_PFX(AsmWriteMm0):
-    movd       %rcx, %xmm0
+    movd       %rcx, %mm0
     ret