sync GCC assembly files with MASM assembly files
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Jul 2006 10:25:13 +0000 (10:25 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 11 Jul 2006 10:25:13 +0000 (10:25 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@878 6f19259b-4bc3-4df7-8a09-765794883524

20 files changed:
MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
MdePkg/Library/BaseLib/Ia32/FxRestore.S
MdePkg/Library/BaseLib/Ia32/FxSave.S
MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
MdePkg/Library/BaseLib/Ia32/LRotU64.S
MdePkg/Library/BaseLib/Ia32/MultU64x64.S
MdePkg/Library/BaseLib/Ia32/RRotU64.S
MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
MdePkg/Library/BaseLib/Ia32/Thunk16.S
MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
MdePkg/Library/BaseMemoryLibMmx/Ia32/SetMem32.S

index d6af974d0f9bb77252367c7090b6f86069ecb253..426ce5bd264039cce520f712d762db56972239bd 100644 (file)
 \r
      \r
 \r
-.global _ARShiftU64\r
-_ARShiftU64: \r
+.global _InternalMathARShiftU64\r
+_InternalMathARShiftU64: \r
     movb    12(%esp),%cl\r
     movl    8(%esp),%eax\r
     cltd\r
     testb   $32,%cl\r
-# MISMATCH: "    cmovz   edx, eax"\r
     cmovz   %eax, %edx\r
-# MISMATCH: "    cmovz   eax, [esp + 4]"\r
     cmovz   4(%esp), %eax\r
     shrdl   %cl,%edx,%eax\r
     sar     %cl,%edx\r
index 21e8a82c0e5f1ccba11fe0a0266f8586c4907904..b4e488ffe64929917c094c515b23697f35dbe3ad 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmDisablePaging32 function\r
+#   InternalX86DisablePaging32 function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmDisablePaging32 (\r
+# InternalX86DisablePaging32 (\r
 #   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
 #   IN      VOID                      *Context1,    OPTIONAL\r
 #   IN      VOID                      *Context2,    OPTIONAL\r
 #   IN      VOID                      *NewStack\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmDisablePaging32\r
-_AsmDisablePaging32: \r
+.global _InternalX86DisablePaging32\r
+_InternalX86DisablePaging32: \r
     movl    4(%esp),%ebx\r
     movl    8(%esp),%ecx\r
     movl    12(%esp),%edx\r
index f604f7c72e1875fed33353897eb5428efe5ecfd3..df1e6ad495c4028ca19482fdce6dfa96d6d3384a 100644 (file)
@@ -39,9 +39,8 @@ L1:
     jmp     _InternalMathDivRemU64x32\r
 \r
 \r
-.global DivRemU64x64\r
-DivRemU64x64:\r
-# MISMATCH: "DivRemU64x64:    USES    ebx esi edi"\r
+.global _DivRemU64x64\r
+_DivRemU64x64:\r
     push   %ebx                                                                             \r
     push   %esi                                                                             \r
     push   %edi                                        \r
index 6f9befcb4a391f084416e74371f8125bf5fd2c86..7c97a502daab03cd79b2c88ea431aa80d3a6a7ec 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmEnablePaging32 function\r
+#   InternalX86EnablePaging32 function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmEnablePaging32 (\r
+# InternalX86EnablePaging32 (\r
 #   IN      SWITCH_STACK_ENTRY_POINT  EntryPoint,\r
 #   IN      VOID                      *Context1,    OPTIONAL\r
 #   IN      VOID                      *Context2,    OPTIONAL\r
 #   IN      VOID                      *NewStack\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmEnablePaging32\r
-_AsmEnablePaging32: \r
+.global _InternalX86EnablePaging32\r
+_InternalX86EnablePaging32: \r
     movl    4(%esp),%ebx\r
     movl    8(%esp),%ecx\r
     movl    12(%esp),%edx\r
index b365ea762af4984760b1ea947f9ae1544655d7a7..37584799803e8e9301578f03338a3d6f1d1fd52e 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmEnablePaging64 function\r
+#   InternalX86EnablePaging64 function\r
 #\r
 # Notes:\r
 #\r
@@ -28,7 +28,7 @@
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmEnablePaging64 (\r
+# InternalX86EnablePaging64 (\r
 #   IN      UINT16                    CodeSelector,\r
 #   IN      UINT64                    EntryPoint,\r
 #   IN      UINT64                    Context1,    OPTIONAL\r
 #   IN      UINT64                    NewStack\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmEnablePaging64\r
-_AsmEnablePaging64:\r
+.global _InternalX86EnablePaging64\r
+_InternalX86EnablePaging64:\r
     cli\r
-    movl    $$LongStart, (%esp)\r
+    movl    $LongStart, (%esp)\r
     movl    %cr4, %eax\r
     orb     $0x20, %al\r
     movl    %eax, %cr4                  # enable PAE\r
index 631a3ef68ae0cfacd29e02f9be5830b787d78509..cc840de464547e5abf7ee8c72a5460a7438245fc 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmFxRestore function\r
+#   InternalX86FxRestore function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmFxRestore (\r
+# InternalX86FxRestore (\r
 #   IN CONST IA32_FX_BUFFER *Buffer\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmFxRestore\r
-_AsmFxRestore: \r
+.global _InternalX86FxRestore\r
+_InternalX86FxRestore: \r
     movl    4(%esp),%eax\r
     fxrstor (%eax)\r
     ret\r
index 44a55126a9ca79e3d408b5cde73100fe20d8c471..a558816e1dc391bd766ddb9b35eeb71ce2877079 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmFxSave function\r
+#   InternalX86FxSave function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmFxSave (\r
+# InternalX86FxSave (\r
 #   OUT IA32_FX_BUFFER *Buffer\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmFxSave\r
-_AsmFxSave: \r
+.global _InternalX86FxSave\r
+_InternalX86FxSave: \r
     movl    4(%esp),%eax\r
     fxsave  (%eax)\r
     ret\r
index 43bb92526eb2fafb1664430fa05f11526fb502f1..b53ca0fb93e07c6b994c22c3147c015c9c6e923d 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   InterlockedCompareExchange32 function\r
+#   InternalSyncCompareExchange32 function\r
 #\r
 # Notes:\r
 #\r
 \r
      \r
 \r
-#------------------------------------------------------------------------------\r
-# VOID *\r
-# EFIAPI\r
-# InterlockedCompareExchangePointer (\r
-#   IN      VOID                      **Value,\r
-#   IN      VOID                      *CompareValue,\r
-#   IN      VOID                      *ExchangeValue\r
-#   );\r
-#------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchangePointer\r
-_InterlockedCompareExchangePointer: \r
-    #\r
-    # InterlockedCompareExchangePointer() shares the same code as\r
-    # InterlockedCompareExchange32() on IA32 and thus no code inside this\r
-    # function\r
-    #\r
-\r
-\r
 #------------------------------------------------------------------------------\r
 # UINT32\r
 # EFIAPI\r
-# InterlockedCompareExchange32 (\r
+# InternalSyncCompareExchange32 (\r
 #   IN      UINT32                    *Value,\r
 #   IN      UINT32                    CompareValue,\r
 #   IN      UINT32                    ExchangeValue\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange32\r
-_InterlockedCompareExchange32: \r
+.global _InternalSyncCompareExchange32\r
+_InternalSyncCompareExchange32: \r
     movl    4(%esp),%ecx\r
     movl    8(%esp),%eax\r
     movl    12(%esp),%edx\r
index abc51e905bf7d41683a42ce3564c97803c4cad41..383503fbfe985aacf22b46d33eca103e35bff2d6 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   InterlockedCompareExchange64 function\r
+#   InternalSyncCompareExchange64 function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # UINT64\r
 # EFIAPI\r
-# InterlockedCompareExchange64 (\r
+# InternalSyncCompareExchange64 (\r
 #   IN      UINT64                    *Value,\r
 #   IN      UINT64                    CompareValue,\r
 #   IN      UINT64                    ExchangeValue\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _InterlockedCompareExchange64\r
+.global _InternalSyncCompareExchange64\r
+_InternalSyncCompareExchange64:\r
     push    %esi\r
     push    %ebx\r
     movl    12(%esp),%esi\r
index a7b653ac2020e9f9109fed7a3cb44942b2fc145b..4256b60ee96115cfd801bbe4dec52321de9abc86 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   InterlockedDecrement function\r
+#   InternalSyncDecrement function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # UINT32\r
 # EFIAPI\r
-# InterlockedDecrement (\r
+# InternalSyncDecrement (\r
 #   IN      UINT32                    *Value\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _InterlockedDecrement\r
-_InterlockedDecrement: \r
+.global _InternalSyncDecrement\r
+_InternalSyncDecrement: \r
     movl    4(%esp),%eax\r
     lock    \r
     decl     (%eax)\r
index 3f9beec21160fb0f7372274d1a2387efd3132931..02cb33b29bac735ca0d6acc49aa9d5b16de1a62f 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   InterlockedIncrement function\r
+#   InternalSyncIncrement function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # UINT32\r
 # EFIAPI\r
-# InterlockedIncrement (\r
+# InternalSyncIncrement (\r
 #   IN      UINT32                    *Value\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _InterlockedIncrement\r
-_InterlockedIncrement: \r
+.global _InternalSyncIncrement\r
+_InternalSyncIncrement: \r
     movl    4(%esp),%eax\r
     lock    \r
     incl     (%eax)\r
index 9c961ce3789759e873687c5964adab8cccb365b9..54cdfadcc8f4a2234048071c7473dc9b5647ce72 100644 (file)
@@ -23,7 +23,8 @@
 \r
      \r
 \r
-.global _LRotU64\r
+.global _InternalMathLRotU64\r
+_InternalMathLRotU64:\r
     push    %ebx\r
     movb    16(%esp),%cl\r
     movl    12(%esp),%edx\r
index 8841fc44dc2eb2179a65895a7eed1af038e129c0..641b0d652ca664260d373239611ff7908a648677 100644 (file)
 \r
      \r
 \r
-.global _MultS64x64\r
-_MultS64x64: \r
-    #\r
-    # MultS64x32 shares the same implementation with _MultU64x32, and thus no\r
-    # code inside this function.\r
-    #\r
-\r
-\r
-.global _MultU64x64\r
+.global _InternalMathMultU64x64\r
+_InternalMathMultU64x64: \r
     push    %ebx\r
     movl    8(%esp),%ebx\r
     movl    16(%esp),%edx\r
index 541e420a3c3dbe37205e631f33b4e732ca66e98f..2d4f42fe36063125fe34e866ec7296d3f69d3683 100644 (file)
@@ -23,7 +23,8 @@
 \r
      \r
 \r
-.global _RRotU64\r
+.global _InternalMathRRotU64\r
+_InternalMathRRotU64:\r
     push    %ebx\r
     movb    16(%esp),%cl\r
     movl    8(%esp),%eax\r
index f03a05696d92e3b95fb26de1938f9525301abb0b..ebfe800e686b621e1d1b1d9f9427e8d217fb0871 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmReadGdtr function\r
+#   InternalX86ReadGdtr function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmReadGdtr (\r
+# InternalX86ReadGdtr (\r
 #   OUT IA32_DESCRIPTOR  *Gdtr\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmReadGdtr\r
-_AsmReadGdtr: \r
+.global _InternalX86ReadGdtr\r
+_InternalX86ReadGdtr: \r
     movl    4(%esp),%eax\r
     sgdt    (%eax)\r
     ret\r
index fa72d3ba7de822bc718a170ca31109c6e51830dc..052c74553482ef0fed837f8248d5711e05201533 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmReadIdtr function\r
+#   InternalX86ReadIdtr function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmReadIdtr (\r
+# InternalX86ReadIdtr (\r
 #   OUT IA32_DESCRIPTOR  *Idtr\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmReadIdtr\r
-_AsmReadIdtr: \r
+.global _InternalX86ReadIdtr\r
+_InternalX86ReadIdtr: \r
     movl    4(%esp),%eax\r
     sidt    (%eax)\r
     ret\r
index fa7be9192d7cd9206592f8c3ff36d03aa253899e..b3ac412efe3b6f23e68d4dc0dacaa047eefbd8ee 100644 (file)
 #\r
 #------------------------------------------------------------------------------\r
 \r
+.global _m16Start, _m16Size, _mThunk16Attr, _m16GdtBase, _m16Gdt, _m16GdtrBase, _mTransition\r
+                        ##########\r
+                        # FIXME! #\r
+                        ##########\r
+# The following data are INVALID!!\r
+# They just follow GAS syntax.\r
+_m16Start:        .byte   0x00\r
+_m16Size:         .word   0x00\r
+_mThunk16Attr:    .word   0x00\r
+_m16Gdt:          .word   0x00\r
+_m16GdtrBase:     .word   0x00\r
+_mTransition:     .word   0x00\r
 \r
-\r
+.global _InternalAsmThunk16\r
+_InternalAsmThunk16:\r
 \r
                         ##########\r
                         # FIXME! #\r
                         ##########\r
+ # This function won't work for now.\r
+ # it will directly enter dead loop.\r
+ jmp .\r
\ No newline at end of file
index c3eb63d9e45c25d20531a2c90f554e99be48f911..50600717bf1a69a15b37187b1fd7a8e73a17eb44 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmWriteGdtr function\r
+#   InternalX86WriteGdtr function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmWriteGdtr (\r
+# InternalX86WriteGdtr (\r
 #   OUT IA32_DESCRIPTOR  *Gdtr\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmWriteGdtr\r
-_AsmWriteGdtr: \r
+.global _InternalX86WriteGdtr\r
+_InternalX86WriteGdtr: \r
     movl    4(%esp),%eax\r
     lgdt    (%eax)\r
     ret\r
index f71b696d9720f7616fcab39b22fbde0e4b497d51..3e6da5c1c5fa817e5e29bc4ae8256fda51aee830 100644 (file)
@@ -15,7 +15,7 @@
 #\r
 # Abstract:\r
 #\r
-#   AsmWriteIdtr function\r
+#   InternalX86WriteIdtr function\r
 #\r
 # Notes:\r
 #\r
 #------------------------------------------------------------------------------\r
 # VOID\r
 # EFIAPI\r
-# AsmWriteIdtr (\r
+# InternalX86WriteIdtr (\r
 #   OUT IA32_DESCRIPTOR  *Idtr\r
 #   );\r
 #------------------------------------------------------------------------------\r
-.global _AsmWriteIdtr\r
-_AsmWriteIdtr: \r
+.global _InternalX86WriteIdtr\r
+_InternalX86WriteIdtr: \r
     movl    4(%esp),%eax\r
     lidt    (%eax)\r
     ret\r
index a1a0eaf02ec21e001c902e06b21fac4ce54fdc84..27fd6174bdfc340be407ac97868f186ee6d1753a 100644 (file)
@@ -52,7 +52,7 @@ L0:
     mfence
 @SetDwords: 
     testb   $1, %dl
-    jz      @F
+    jz      L1
     movd    %mm0, (%edi)
 L1: 
     pop     %edi