summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-06 14:52:39 +0000
committertgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-06 14:52:39 +0000
commita2b1bf96b3470f5eb82b47e629f6c3a840f87295 (patch)
tree28c3586a7ce0eb1f364ef9c64186ae7ee11d38ed
parent1e56bac2c836f695e84f11f54a10d9bdb938084f (diff)
downloadedk2-platforms-a2b1bf96b3470f5eb82b47e629f6c3a840f87295.tar.xz
Use ASM_PFX to optionnaly set the underscore prefix
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2179 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ARShiftU64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuId.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuIdEx.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuPause.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/CpuSleep.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DisablePaging32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnablePaging32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/EnablePaging64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxRestore.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/FxSave.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Invd.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LRotU64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LShiftU64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/LongJump.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ModU64x32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Monitor.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x32.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/MultU64x64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Mwait.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RRotU64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/RShiftU64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCr4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadCs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr1.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr5.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr6.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr7.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEflags.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadEs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadFs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadGs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadIdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadLdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm1.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm5.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm6.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMm7.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadMsr64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadPmc.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadSs.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadTsc.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/SetJump.S6
-rw-r--r--MdePkg/Library/BaseLib/Ia32/SwapBytes64.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Thunk16.S28
-rw-r--r--MdePkg/Library/BaseLib/Ia32/Wbinvd.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteCr4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr1.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr5.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr6.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteDr7.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteGdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteIdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteLdtr.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm0.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm1.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm2.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm3.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm4.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm5.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm6.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMm7.S4
-rw-r--r--MdePkg/Library/BaseLib/Ia32/WriteMsr64.S4
96 files changed, 206 insertions, 206 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
index 86c536b669..5498d2e991 100644
--- a/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/ARShiftU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathARShiftU64
+.globl ASM_PFX(InternalMathARShiftU64)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMathARShiftU64:
+ASM_PFX(InternalMathARShiftU64):
movb 12(%esp), %cl
movl 8(%esp), %eax
cltd
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
index 17880f4803..e82434b670 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuBreakpoint.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl _CpuBreakpoint
+.globl ASM_PFX(CpuBreakpoint)
#------------------------------------------------------------------------------
# VOID
@@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_CpuBreakpoint:
+ASM_PFX(CpuBreakpoint):
int $3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.S b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.S
index 0bd308d344..f8b1cdc7ee 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuFlushTlb.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl _CpuFlushTlb
+.globl ASM_PFX(CpuFlushTlb)
#------------------------------------------------------------------------------
# VOID
@@ -29,7 +29,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_CpuFlushTlb:
+ASM_PFX(CpuFlushTlb):
movl %cr3, %eax
movl %eax, %cr3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuId.S b/MdePkg/Library/BaseLib/Ia32/CpuId.S
index 592ade651a..6f41e72227 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuId.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuId.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmCpuid
+.globl ASM_PFX(AsmCpuid)
#------------------------------------------------------------------------------
# VOID
@@ -34,7 +34,7 @@
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-_AsmCpuid:
+ASM_PFX(AsmCpuid):
push %ebx
push %ebp
movl %esp, %ebp
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
index ab66fe75b2..48554cc96b 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuIdEx.S
@@ -36,8 +36,8 @@
# OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.globl _AsmCpuidEx
-_AsmCpuidEx:
+.globl ASM_PFX(AsmCpuidEx)
+ASM_PFX(AsmCpuidEx):
push %ebx
push %ebp
movl %esp, %ebp
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuPause.S b/MdePkg/Library/BaseLib/Ia32/CpuPause.S
index e9bf413cb6..5fef9c8d5c 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuPause.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuPause.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl _CpuPause
+.globl ASM_PFX(CpuPause)
#------------------------------------------------------------------------------
# VOID
@@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_CpuPause:
+ASM_PFX(CpuPause):
pause
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/CpuSleep.S b/MdePkg/Library/BaseLib/Ia32/CpuSleep.S
index 3bd1736250..ac39e8fcba 100644
--- a/MdePkg/Library/BaseLib/Ia32/CpuSleep.S
+++ b/MdePkg/Library/BaseLib/Ia32/CpuSleep.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl _CpuSleep
+.globl ASM_PFX(CpuSleep)
#------------------------------------------------------------------------------
# VOID
@@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_CpuSleep:
+ASM_PFX(CpuSleep):
hlt
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
index aa5111f5f6..ea04225fd6 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/DisableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _DisableInterrupts
+.globl ASM_PFX(DisableInterrupts)
#------------------------------------------------------------------------------
# VOID
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_DisableInterrupts:
+ASM_PFX(DisableInterrupts):
cli
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
index c250004a41..7898e8103a 100644
--- a/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
+++ b/MdePkg/Library/BaseLib/Ia32/DisablePaging32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86DisablePaging32
+.globl ASM_PFX(InternalX86DisablePaging32)
#------------------------------------------------------------------------------
# VOID
@@ -33,7 +33,7 @@
# IN VOID *NewStack
# );
#------------------------------------------------------------------------------
-_InternalX86DisablePaging32:
+ASM_PFX(InternalX86DisablePaging32):
movl 4(%esp), %ebx
movl 8(%esp), %ecx
movl 12(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
index 158b382a4a..b858278e64 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathDivU64x32
+.globl ASM_PFX(InternalMathDivU64x32)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINT32 Divisor
# );
#------------------------------------------------------------------------------
-_InternalMathDivU64x32:
+ASM_PFX(InternalMathDivU64x32):
movl 8(%esp), %eax
movl 12(%esp), %ecx
xorl %edx, %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
index 7c4bfb2512..974373d284 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x32Remainder.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathDivRemU64x32
+.globl ASM_PFX(InternalMathDivRemU64x32)
#------------------------------------------------------------------------------
# UINT64
@@ -30,7 +30,7 @@
# OUT UINT32 *Remainder
# );
#------------------------------------------------------------------------------
-_InternalMathDivRemU64x32:
+ASM_PFX(InternalMathDivRemU64x32):
movl 12(%esp), %ecx
movl 8(%esp), %eax
xorl %edx, %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
index a122c70ab2..cac7169d58 100644
--- a/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
+++ b/MdePkg/Library/BaseLib/Ia32/DivU64x64Remainder.S
@@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathDivRemU64x32, _InternalMathDivRemU64x64
+.globl ASM_PFX(InternalMathDivRemU64x32), ASM_PFX(InternalMathDivRemU64x64)
#------------------------------------------------------------------------------
# UINT64
@@ -31,7 +31,7 @@
# OUT UINT64 *Remainder OPTIONAL
# );
#------------------------------------------------------------------------------
-_InternalMathDivRemU64x64:
+ASM_PFX(InternalMathDivRemU64x64):
movl 16(%esp), %ecx
testl %ecx, %ecx
jnz Hard
@@ -40,7 +40,7 @@ _InternalMathDivRemU64x64:
and $0, 4(%ecx)
movl %ecx, 16(%esp)
L1:
- jmp _InternalMathDivRemU64x32
+ jmp ASM_PFX(InternalMathDivRemU64x32)
Hard:
push %ebx
push %esi
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
index dcee379611..c5742aee53 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnableDisableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _EnableDisableInterrupts
+.globl ASM_PFX(EnableDisableInterrupts)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_EnableDisableInterrupts:
+ASM_PFX(EnableDisableInterrupts):
sti
cli
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
index 8a40b3afc0..2d608036f7 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnableInterrupts.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _EnableInterrupts
+.globl ASM_PFX(EnableInterrupts)
#------------------------------------------------------------------------------
# VOID
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_EnableInterrupts:
+ASM_PFX(EnableInterrupts):
sti
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
index 39f991fe56..df5d67cfac 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86EnablePaging32
+.globl ASM_PFX(InternalX86EnablePaging32)
#------------------------------------------------------------------------------
# VOID
@@ -33,7 +33,7 @@
# IN VOID *NewStack
# );
#------------------------------------------------------------------------------
-_InternalX86EnablePaging32:
+ASM_PFX(InternalX86EnablePaging32):
movl 4(%esp), %ebx
movl 8(%esp), %ecx
movl 12(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
index 89502b7ef5..ffa9beb0a1 100644
--- a/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
+++ b/MdePkg/Library/BaseLib/Ia32/EnablePaging64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86EnablePaging64
+.globl ASM_PFX(InternalX86EnablePaging64)
#------------------------------------------------------------------------------
# VOID
@@ -34,7 +34,7 @@
# IN UINT64 NewStack
# );
#------------------------------------------------------------------------------
-_InternalX86EnablePaging64:
+ASM_PFX(InternalX86EnablePaging64):
cli
movl $LongStart, (%esp)
movl %cr4, %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
index f445464af9..07a92619d2 100644
--- a/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
+++ b/MdePkg/Library/BaseLib/Ia32/FlushCacheLine.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmFlushCacheLine
+.globl ASM_PFX(AsmFlushCacheLine)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
-_AsmFlushCacheLine:
+ASM_PFX(AsmFlushCacheLine):
movl 4(%esp), %eax
clflush (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/FxRestore.S b/MdePkg/Library/BaseLib/Ia32/FxRestore.S
index f88d3df09b..9cfa14be0f 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxRestore.S
+++ b/MdePkg/Library/BaseLib/Ia32/FxRestore.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86FxRestore
+.globl ASM_PFX(InternalX86FxRestore)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# IN CONST IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
-_InternalX86FxRestore:
+ASM_PFX(InternalX86FxRestore):
movl 4(%esp), %eax
fxrstor (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/FxSave.S b/MdePkg/Library/BaseLib/Ia32/FxSave.S
index cdb808e3cd..8857a8ec77 100644
--- a/MdePkg/Library/BaseLib/Ia32/FxSave.S
+++ b/MdePkg/Library/BaseLib/Ia32/FxSave.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86FxSave
+.globl ASM_PFX(InternalX86FxSave)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
-_InternalX86FxSave:
+ASM_PFX(InternalX86FxSave):
movl 4(%esp), %eax
fxsave (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
index f5acc82a95..a0a6ad9eb0 100644
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
+++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange32.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalSyncCompareExchange32
+.globl ASM_PFX(InternalSyncCompareExchange32)
#------------------------------------------------------------------------------
# UINT32
@@ -32,7 +32,7 @@
# IN UINT32 ExchangeValue
# );
#------------------------------------------------------------------------------
-_InternalSyncCompareExchange32:
+ASM_PFX(InternalSyncCompareExchange32):
movl 4(%esp), %ecx
movl 8(%esp), %eax
movl 12(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
index 32d3084806..98a20a5e29 100644
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
+++ b/MdePkg/Library/BaseLib/Ia32/InterlockedCompareExchange64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalSyncCompareExchange64
+.globl ASM_PFX(InternalSyncCompareExchange64)
#------------------------------------------------------------------------------
# UINT64
@@ -32,7 +32,7 @@
# IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
-_InternalSyncCompareExchange64:
+ASM_PFX(InternalSyncCompareExchange64):
push %esi
push %ebx
movl 12(%esp), %esi
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
index 1855732d51..dc8f7215cc 100644
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
+++ b/MdePkg/Library/BaseLib/Ia32/InterlockedDecrement.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalSyncDecrement
+.globl ASM_PFX(InternalSyncDecrement)
#------------------------------------------------------------------------------
# UINT32
@@ -30,7 +30,7 @@
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-_InternalSyncDecrement:
+ASM_PFX(InternalSyncDecrement):
movl 4(%esp), %eax
lock
decl (%eax)
diff --git a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
index 9bde4dc661..ecbbc7540c 100644
--- a/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
+++ b/MdePkg/Library/BaseLib/Ia32/InterlockedIncrement.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalSyncIncrement
+.globl ASM_PFX(InternalSyncIncrement)
#------------------------------------------------------------------------------
# UINT32
@@ -30,7 +30,7 @@
# IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-_InternalSyncIncrement:
+ASM_PFX(InternalSyncIncrement):
movl 4(%esp), %eax
lock
incl (%eax)
diff --git a/MdePkg/Library/BaseLib/Ia32/Invd.S b/MdePkg/Library/BaseLib/Ia32/Invd.S
index 97c4934af5..0a0c1a244a 100644
--- a/MdePkg/Library/BaseLib/Ia32/Invd.S
+++ b/MdePkg/Library/BaseLib/Ia32/Invd.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmInvd
+.globl ASM_PFX(AsmInvd)
#------------------------------------------------------------------------------
# VOID
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmInvd:
+ASM_PFX(AsmInvd):
invd
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/LRotU64.S b/MdePkg/Library/BaseLib/Ia32/LRotU64.S
index 0208134556..3b866e2700 100644
--- a/MdePkg/Library/BaseLib/Ia32/LRotU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/LRotU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathLRotU64
+.globl ASM_PFX(InternalMathLRotU64)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMathLRotU64:
+ASM_PFX(InternalMathLRotU64):
push %ebx
movb 16(%esp), %cl
movl 12(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S b/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
index ef572700ce..a4b99eb80a 100644
--- a/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/LShiftU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathLShiftU64
+.globl ASM_PFX(InternalMathLShiftU64)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMathLShiftU64:
+ASM_PFX(InternalMathLShiftU64):
movb 12(%esp), %cl
xorl %eax, %eax
movl 4(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/LongJump.S b/MdePkg/Library/BaseLib/Ia32/LongJump.S
index afb1ca5943..0b76896085 100644
--- a/MdePkg/Library/BaseLib/Ia32/LongJump.S
+++ b/MdePkg/Library/BaseLib/Ia32/LongJump.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalLongJump
+.globl ASM_PFX(InternalLongJump)
#------------------------------------------------------------------------------
# VOID
@@ -29,7 +29,7 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-_InternalLongJump:
+ASM_PFX(InternalLongJump):
pop %eax
pop %edx
pop %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S b/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
index b2829c09c7..00dc6a08ab 100644
--- a/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/ModU64x32.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathModU64x32
+.globl ASM_PFX(InternalMathModU64x32)
#------------------------------------------------------------------------------
# UINT32
@@ -29,7 +29,7 @@
# IN UINT32 Divisor
# );
#------------------------------------------------------------------------------
-_InternalMathModU64x32:
+ASM_PFX(InternalMathModU64x32):
movl 8(%esp), %eax
movl 12(%esp), %ecx
xorl %edx, %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/Monitor.S b/MdePkg/Library/BaseLib/Ia32/Monitor.S
index d1310c5a58..6e9284dcd4 100644
--- a/MdePkg/Library/BaseLib/Ia32/Monitor.S
+++ b/MdePkg/Library/BaseLib/Ia32/Monitor.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmMonitor
+.globl ASM_PFX(AsmMonitor)
#------------------------------------------------------------------------------
# UINT64
@@ -32,7 +32,7 @@
# IN UINTN Edx
# );
#------------------------------------------------------------------------------
-_AsmMonitor:
+ASM_PFX(AsmMonitor):
movl 4(%esp), %eax
movl 8(%esp), %ecx
movl 12(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S b/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
index c12d3bd15a..b9d1eb8ca7 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x32.S
@@ -22,7 +22,7 @@
.386:
.code:
-.globl _InternalMathMultU64x32
+.globl ASM_PFX(InternalMathMultU64x32)
#------------------------------------------------------------------------------
# UINT64
@@ -32,7 +32,7 @@
# IN UINT32 Multiplier
# );
#------------------------------------------------------------------------------
-_InternalMathMultU64x32:
+ASM_PFX(InternalMathMultU64x32):
movl 12(%esp), %ecx
movl %ecx, %eax
imull 8(%esp), %ecx
diff --git a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
index e8daa318be..03523865f6 100644
--- a/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
+++ b/MdePkg/Library/BaseLib/Ia32/MultU64x64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathMultU64x64
+.globl ASM_PFX(InternalMathMultU64x64)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINT64 Multiplier
# );
#------------------------------------------------------------------------------
-_InternalMathMultU64x64:
+ASM_PFX(InternalMathMultU64x64):
push %ebx
movl 8(%esp), %ebx
movl 16(%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/Mwait.S b/MdePkg/Library/BaseLib/Ia32/Mwait.S
index 9b8a8a9643..12f6a87511 100644
--- a/MdePkg/Library/BaseLib/Ia32/Mwait.S
+++ b/MdePkg/Library/BaseLib/Ia32/Mwait.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmMwait
+.globl ASM_PFX(AsmMwait)
#------------------------------------------------------------------------------
# UINT64
@@ -31,7 +31,7 @@
# IN UINTN Ecx
# );
#------------------------------------------------------------------------------
-_AsmMwait:
+ASM_PFX(AsmMwait):
movl 4(%esp), %eax
movl 8(%esp), %ecx
mwait %eax, %ecx
diff --git a/MdePkg/Library/BaseLib/Ia32/RRotU64.S b/MdePkg/Library/BaseLib/Ia32/RRotU64.S
index bf51f38ef6..35935639b9 100644
--- a/MdePkg/Library/BaseLib/Ia32/RRotU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/RRotU64.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalMathRRotU64
+.globl ASM_PFX(InternalMathRRotU64)
#------------------------------------------------------------------------------
# UINT64
@@ -29,7 +29,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMathRRotU64:
+ASM_PFX(InternalMathRRotU64):
push %ebx
movb 16(%esp), %cl
movl 8(%esp), %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S b/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
index 80133807cb..ca78394e39 100644
--- a/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
+++ b/MdePkg/Library/BaseLib/Ia32/RShiftU64.S
@@ -22,7 +22,7 @@
.686:
.code:
-.globl _InternalMathRShiftU64
+.globl ASM_PFX(InternalMathRShiftU64)
#------------------------------------------------------------------------------
# UINT64
@@ -32,7 +32,7 @@
# IN UINTN Count
# );
#------------------------------------------------------------------------------
-_InternalMathRShiftU64:
+ASM_PFX(InternalMathRShiftU64):
movb 12(%esp), %cl
xorl %edx, %edx
movl 8(%esp), %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr0.S b/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
index 324cba9046..3433344b7b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadCr0
+.globl ASM_PFX(AsmReadCr0)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadCr0:
+ASM_PFX(AsmReadCr0):
movl %cr0, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr2.S b/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
index dce8e0c7b7..d308895367 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadCr2
+.globl ASM_PFX(AsmReadCr2)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadCr2:
+ASM_PFX(AsmReadCr2):
movl %cr2, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr3.S b/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
index b9ad97f608..aaec1f01d0 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadCr3
+.globl ASM_PFX(AsmReadCr3)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadCr3:
+ASM_PFX(AsmReadCr3):
movl %cr3, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCr4.S b/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
index b1a2f6a19c..442d359eda 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCr4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadCr4
+.globl ASM_PFX(AsmReadCr4)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadCr4:
+ASM_PFX(AsmReadCr4):
movl %cr4, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadCs.S b/MdePkg/Library/BaseLib/Ia32/ReadCs.S
index 11c9c3f669..a3ad69d304 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadCs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadCs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadCs
+.globl ASM_PFX(AsmReadCs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadCs:
+ASM_PFX(AsmReadCs):
movl %cs, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr0.S b/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
index 3110752487..d4c61f1484 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr0
+.globl ASM_PFX(AsmReadDr0)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr0:
+ASM_PFX(AsmReadDr0):
movl %dr0, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr1.S b/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
index d975e1c15c..27c5554257 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr1.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr1
+.globl ASM_PFX(AsmReadDr1)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr1:
+ASM_PFX(AsmReadDr1):
movl %dr1, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr2.S b/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
index 8af8e22d6f..cca84b9efd 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr2
+.globl ASM_PFX(AsmReadDr2)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr2:
+ASM_PFX(AsmReadDr2):
movl %dr2, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr3.S b/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
index c1baf7c8fb..60b0550381 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr3
+.globl ASM_PFX(AsmReadDr3)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr3:
+ASM_PFX(AsmReadDr3):
movl %dr3, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr4.S b/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
index 4beac9fdfd..84883df971 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr4
+.globl ASM_PFX(AsmReadDr4)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr4:
+ASM_PFX(AsmReadDr4):
movl %dr4, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.S b/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
index 6aff412494..5abb226b91 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr5
+.globl ASM_PFX(AsmReadDr5)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr5:
+ASM_PFX(AsmReadDr5):
movl %dr5, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr6.S b/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
index f433ee3926..9594851c7e 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr6.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr6
+.globl ASM_PFX(AsmReadDr6)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr6:
+ASM_PFX(AsmReadDr6):
movl %dr6, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr7.S b/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
index 7cdd48d60e..4ba13efcb4 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr7.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDr7
+.globl ASM_PFX(AsmReadDr7)
#------------------------------------------------------------------------------
# UINTN
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDr7:
+ASM_PFX(AsmReadDr7):
movl %dr7, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDs.S b/MdePkg/Library/BaseLib/Ia32/ReadDs.S
index 439c272c09..c3dc8451ad 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadDs
+.globl ASM_PFX(AsmReadDs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadDs:
+ASM_PFX(AsmReadDs):
movl %ds, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEflags.S b/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
index c4dd095176..ab5e522739 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEflags.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadEflags
+.globl ASM_PFX(AsmReadEflags)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadEflags:
+ASM_PFX(AsmReadEflags):
pushfl
pop %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadEs.S b/MdePkg/Library/BaseLib/Ia32/ReadEs.S
index 164a2fc620..26ed55d9e1 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadEs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadEs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadEs
+.globl ASM_PFX(AsmReadEs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadEs:
+ASM_PFX(AsmReadEs):
movl %es, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadFs.S b/MdePkg/Library/BaseLib/Ia32/ReadFs.S
index 571cb7a3c8..bd38c6ac10 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadFs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadFs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadFs
+.globl ASM_PFX(AsmReadFs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadFs:
+ASM_PFX(AsmReadFs):
movl %fs, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
index f69f4219ed..8869164606 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86ReadGdtr
+.globl ASM_PFX(InternalX86ReadGdtr)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
-_InternalX86ReadGdtr:
+ASM_PFX(InternalX86ReadGdtr):
movl 4(%esp), %eax
sgdt (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadGs.S b/MdePkg/Library/BaseLib/Ia32/ReadGs.S
index 6ae5dd1b57..82b396661d 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadGs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadGs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadGs
+.globl ASM_PFX(AsmReadGs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadGs:
+ASM_PFX(AsmReadGs):
movl %gs, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
index 67f89c4fca..0e5d32e3d8 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadIdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _InternalX86ReadIdtr
+.globl ASM_PFX(InternalX86ReadIdtr)
#------------------------------------------------------------------------------
# VOID
@@ -30,7 +30,7 @@
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-_InternalX86ReadIdtr:
+ASM_PFX(InternalX86ReadIdtr):
movl 4(%esp), %eax
sidt (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
index a1581a9171..addb1757d0 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadLdtr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadLdtr
+.globl ASM_PFX(AsmReadLdtr)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadLdtr:
+ASM_PFX(AsmReadLdtr):
sldt %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm0.S b/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
index a021786cf8..f191337f68 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm0.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm0
+.globl ASM_PFX(AsmReadMm0)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm0:
+ASM_PFX(AsmReadMm0):
push %eax
push %eax
movq %mm0, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm1.S b/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
index 53774cbb37..790541aaeb 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm1.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm1
+.globl ASM_PFX(AsmReadMm1)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm1:
+ASM_PFX(AsmReadMm1):
push %eax
push %eax
movq %mm1, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm2.S b/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
index 8da95f4214..231d62c762 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm2.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm2
+.globl ASM_PFX(AsmReadMm2)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm2:
+ASM_PFX(AsmReadMm2):
push %eax
push %eax
movq %mm2, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm3.S b/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
index 6e5ac7f601..1e1f6dd684 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm3.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm3
+.globl ASM_PFX(AsmReadMm3)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm3:
+ASM_PFX(AsmReadMm3):
push %eax
push %eax
movq %mm3, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm4.S b/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
index 0df806b5d4..5da446befe 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm4.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm4
+.globl ASM_PFX(AsmReadMm4)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm4:
+ASM_PFX(AsmReadMm4):
push %eax
push %eax
movq %mm4, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm5.S b/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
index b41c895433..5528fe1812 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm5.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm5
+.globl ASM_PFX(AsmReadMm5)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm5:
+ASM_PFX(AsmReadMm5):
push %eax
push %eax
movq %mm5, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm6.S b/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
index ac416103a3..5d9bd11269 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm6.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm6
+.globl ASM_PFX(AsmReadMm6)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm6:
+ASM_PFX(AsmReadMm6):
push %eax
push %eax
movq %mm6, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMm7.S b/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
index 52200ed3fc..26866b6a09 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMm7.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMm7
+.globl ASM_PFX(AsmReadMm7)
#------------------------------------------------------------------------------
# UINTN
@@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadMm7:
+ASM_PFX(AsmReadMm7):
push %eax
push %eax
movq %mm7, (%esp)
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
index dadd449326..505b7e688b 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadMsr64.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadMsr64
+.globl ASM_PFX(AsmReadMsr64)
#------------------------------------------------------------------------------
# UINT64
@@ -30,7 +30,7 @@
# IN UINT32 Index
# );
#------------------------------------------------------------------------------
-_AsmReadMsr64:
+ASM_PFX(AsmReadMsr64):
movl 4(%esp), %ecx
rdmsr
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadPmc.S b/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
index 66041d700e..055e99c25a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadPmc.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadPmc
+.globl ASM_PFX(AsmReadPmc)
#------------------------------------------------------------------------------
# UINT64
@@ -30,7 +30,7 @@
# IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
-_AsmReadPmc:
+ASM_PFX(AsmReadPmc):
movl 4(%esp), %ecx
rdpmc
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadSs.S b/MdePkg/Library/BaseLib/Ia32/ReadSs.S
index 7d044c11e5..4f15248f1a 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadSs.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadSs.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadSs
+.globl ASM_PFX(AsmReadSs)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadSs:
+ASM_PFX(AsmReadSs):
movl %ss, %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTr.S b/MdePkg/Library/BaseLib/Ia32/ReadTr.S
index 3dbf3806a0..af12dd2f3f 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTr.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTr.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadTr
+.globl ASM_PFX(AsmReadTr)
#------------------------------------------------------------------------------
# UINT16
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadTr:
+ASM_PFX(AsmReadTr):
str %eax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadTsc.S b/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
index 90a0de9777..cab29661ae 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
+++ b/MdePkg/Library/BaseLib/Ia32/ReadTsc.S
@@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
-.globl _AsmReadTsc
+.globl ASM_PFX(AsmReadTsc)
#------------------------------------------------------------------------------
# UINT64
@@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
-_AsmReadTsc:
+ASM_PFX(AsmReadTsc):
rdtsc
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/SetJump.S b/MdePkg/Library/BaseLib/Ia32/SetJump.S
index d68b95a87a..c8993084ac 100644
--- a/MdePkg/Library/BaseLib/Ia32/SetJump.S
+++ b/MdePkg/Library/BaseLib/Ia32/SetJump.S
@@ -19,7 +19,7 @@
#
#------------------------------------------------------------------------------
-.globl _SetJump, _InternalAssertJumpBuffer
+.globl ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer)
#------------------------------------------------------------------------------
# UINTN
@@ -28,9 +28,9 @@
# OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
# );
#------------------------------------------------------------------------------
-_SetJump:
+ASM_PFX(SetJump):
pushl 0x4(%esp)
- call _InternalAssertJumpBuffer
+ call ASM_PFX(InternalAssertJumpBuffer)
pop %ecx
pop %ecx
movl (%esp), %edx
diff --git a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
index a6a6bb0451..c15ca444f0 100644
--- a/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
+++ b/MdePkg/Library/BaseLib/Ia32/SwapBytes64.S
@@ -29,8 +29,8 @@
# IN UINT64 Operand
# );
#------------------------------------------------------------------------------
-.globl _InternalMathSwapBytes64
-_InternalMathSwapBytes64:
+.globl ASM_PFX(InternalMathSwapBytes64)
+ASM_PFX(InternalMathSwapBytes64):
movl 8(%esp), %eax
movl 4(%esp), %edx
bswapl %eax
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.S b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
index 2641556d98..c45cdb0a2d 100644
--- a/MdePkg/Library/BaseLib/Ia32/Thunk16.S
+++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.S
@@ -19,14 +19,14 @@
#
#------------------------------------------------------------------------------
-.globl _m16Start, _m16Size, _mThunk16Attr, _m16Gdt, _m16GdtrBase, _mTransition
-.globl _InternalAsmThunk16
+.globl ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)
+.globl ASM_PFX(InternalAsmThunk16)
-_m16Start:
+ASM_PFX(m16Start):
SavedGdt: .space 6
-_BackFromUserCode:
+ASM_PFX(BackFromUserCode):
push %ss
push %cs
.byte 0x66
@@ -40,7 +40,7 @@ L_Base1:
push %ds
pushaw # pushad actually
.byte 0x66, 0xba # mov edx, imm32
-_ThunkAttr: .space 4
+ASM_PFX(ThunkAttr): .space 4
testb $THUNK_ATTRIBUTE_DISABLE_A20_MASK_INT_15, %dl
jz 1f
movl $0x15cd2401, %eax # mov ax, 2401h & int 15h
@@ -74,14 +74,14 @@ SavedEsp: .space 4
.byte 0x66
lret # return to protected mode
-_EntryPoint: .long _ToUserCode - _m16Start
+_EntryPoint: .long ASM_PFX(ToUserCode) - ASM_PFX(m16Start)
.word 0x8
_16Idtr: .word 0x3ff
.long 0
_16Gdtr: .word GdtEnd - _NullSegDesc - 1
-_16GdtrBase: .long _NullSegDesc
+_16GdtrBase: .long _NullSegDesc
-_ToUserCode:
+ASM_PFX(ToUserCode):
movl %ss, %edx
movl %ecx, %ss # set new segment selectors
movl %ecx, %ds
@@ -136,7 +136,7 @@ GdtEnd:
# @param Transition Pointer to the transition code
# @return The address of the 16-bit stack after returning from user code
#
-_InternalAsmThunk16:
+ASM_PFX(InternalAsmThunk16):
push %ebp
push %ebx
push %esi
@@ -193,8 +193,8 @@ _InternalAsmThunk16:
.const:
-_m16Size: .word _InternalAsmThunk16 - _m16Start
-_mThunk16Attr: .word _ThunkAttr - _m16Start
-_m16Gdt: .word _NullSegDesc - _m16Start
-_m16GdtrBase: .word _16GdtrBase - _m16Start
-_mTransition: .word _EntryPoint - _m16Start
+ASM_PFX(m16Size): .word _InternalAsmThunk16 - ASM_PFX(m16Start)
+ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)
+ASM_PFX(m16Gdt): .word _NullSegDesc - ASM_PFX(m16Start)
+ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)
+ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)
diff --git a/MdePkg/Library/BaseLib/Ia32/Wbinvd.S b/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
index 42e9fc3974..b19348dad9 100644
--- a/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
+++ b/MdePkg/Library/BaseLib/Ia32/Wbinvd.S
@@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
-.globl _AsmWbinvd
-_AsmWbinvd:
+.globl ASM_PFX(AsmWbinvd)
+ASM_PFX(AsmWbinvd):
wbinvd
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr0.S b/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
index 273f0bf8a6..6bce3a4d50 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr0.S
@@ -28,8 +28,8 @@
# IN UINTN Cr0
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteCr0
-_AsmWriteCr0:
+.globl ASM_PFX(AsmWriteCr0)
+ASM_PFX(AsmWriteCr0):
movl 4(%esp), %eax
movl %eax, %cr0
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr2.S b/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
index bc947e99a2..64d2c1b534 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr2.S
@@ -28,8 +28,8 @@
# IN UINTN Cr2
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteCr2
-_AsmWriteCr2:
+.globl ASM_PFX(AsmWriteCr2)
+ASM_PFX(AsmWriteCr2):
movl 4(%esp), %eax
movl %eax, %cr2
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr3.S b/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
index 9d5c215714..767182ee4e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr3.S
@@ -28,8 +28,8 @@
# IN UINTN Cr3
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteCr3
-_AsmWriteCr3:
+.globl ASM_PFX(AsmWriteCr3)
+ASM_PFX(AsmWriteCr3):
movl 4(%esp), %eax
movl %eax, %cr3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteCr4.S b/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
index 346bb7e85a..dc6828ac91 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteCr4.S
@@ -28,8 +28,8 @@
# IN UINTN Cr4
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteCr4
-_AsmWriteCr4:
+.globl ASM_PFX(AsmWriteCr4)
+ASM_PFX(AsmWriteCr4):
movl 4(%esp), %eax
movl %eax, %cr4
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr0.S b/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
index f65bb3fc6f..c05af0ec1e 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr0.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr0
-_AsmWriteDr0:
+.globl ASM_PFX(AsmWriteDr0)
+ASM_PFX(AsmWriteDr0):
movl 4(%esp), %eax
movl %eax, %dr0
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr1.S b/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
index 8c5ed5997d..87031768ac 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr1.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr1
-_AsmWriteDr1:
+.globl ASM_PFX(AsmWriteDr1)
+ASM_PFX(AsmWriteDr1):
movl 4(%esp), %eax
movl %eax, %dr1
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr2.S b/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
index c946d296da..ca4e301b93 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr2.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr2
-_AsmWriteDr2:
+.globl ASM_PFX(AsmWriteDr2)
+ASM_PFX(AsmWriteDr2):
movl 4(%esp), %eax
movl %eax, %dr2
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr3.S b/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
index 27080ddbcd..ed23db7e90 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr3.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr3
-_AsmWriteDr3:
+.globl ASM_PFX(AsmWriteDr3)
+ASM_PFX(AsmWriteDr3):
movl 4(%esp), %eax
movl %eax, %dr3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr4.S b/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
index 453de9ad44..d17595213a 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr4.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr4
-_AsmWriteDr4:
+.globl ASM_PFX(AsmWriteDr4)
+ASM_PFX(AsmWriteDr4):
movl 4(%esp), %eax
movl %eax, %dr4
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr5.S b/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
index 833fb8ee62..7e3bb94f1f 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr5.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr5
-_AsmWriteDr5:
+.globl ASM_PFX(AsmWriteDr5)
+ASM_PFX(AsmWriteDr5):
movl 4(%esp), %eax
movl %eax, %dr5
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr6.S b/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
index f4e4e9919f..0827f347bd 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr6.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr6
-_AsmWriteDr6:
+.globl ASM_PFX(AsmWriteDr6)
+ASM_PFX(AsmWriteDr6):
movl 4(%esp), %eax
movl %eax, %dr6
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteDr7.S b/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
index 62210ec911..1f3e916675 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteDr7.S
@@ -28,8 +28,8 @@
# IN UINTN Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteDr7
-_AsmWriteDr7:
+.globl ASM_PFX(AsmWriteDr7)
+ASM_PFX(AsmWriteDr7):
movl 4(%esp), %eax
movl %eax, %dr7
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
index 1a0f1d9d95..3aedf7dd68 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteGdtr.S
@@ -28,8 +28,8 @@
# OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
-.globl _InternalX86WriteGdtr
-_InternalX86WriteGdtr:
+.globl ASM_PFX(InternalX86WriteGdtr)
+ASM_PFX(InternalX86WriteGdtr):
movl 4(%esp), %eax
lgdt (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
index 6e79b212cc..c3e6ad3353 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
@@ -28,8 +28,8 @@
# OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.globl _InternalX86WriteIdtr
-_InternalX86WriteIdtr:
+.globl ASM_PFX(InternalX86WriteIdtr)
+ASM_PFX(InternalX86WriteIdtr):
movl 4(%esp), %eax
lidt (%eax)
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
index 69f1ed046e..8b2cc3c029 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteLdtr.S
@@ -28,8 +28,8 @@
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteLdtr
-_AsmWriteLdtr:
+.globl ASM_PFX(AsmWriteLdtr)
+ASM_PFX(AsmWriteLdtr):
movl 4(%esp), %eax
lldtw %ax
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm0.S b/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
index 15cd960790..ef70763e52 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm0.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm0
-_AsmWriteMm0:
+.globl ASM_PFX(AsmWriteMm0)
+ASM_PFX(AsmWriteMm0):
movq 4(%esp), %mm0
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm1.S b/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
index 510dcedb08..74a3d711b5 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm1.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm1
-_AsmWriteMm1:
+.globl ASM_PFX(AsmWriteMm1)
+ASM_PFX(AsmWriteMm1):
movq 4(%esp), %mm1
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm2.S b/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
index c30c1711ae..a3c548dcec 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm2.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm2
-_AsmWriteMm2:
+.globl ASM_PFX(AsmWriteMm2)
+ASM_PFX(AsmWriteMm2):
movq 4(%esp), %mm2
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm3.S b/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
index 1abafd244b..98b11a5818 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm3.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm3
-_AsmWriteMm3:
+.globl ASM_PFX(AsmWriteMm3)
+ASM_PFX(AsmWriteMm3):
movq 4(%esp), %mm3
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm4.S b/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
index beeaa48699..107c695cf7 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm4.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm4
-_AsmWriteMm4:
+.globl ASM_PFX(AsmWriteMm4)
+ASM_PFX(AsmWriteMm4):
movq 4(%esp), %mm4
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm5.S b/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
index c8da38c970..be6a6f78b2 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm5.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm5
-_AsmWriteMm5:
+.globl ASM_PFX(AsmWriteMm5)
+ASM_PFX(AsmWriteMm5):
movq 4(%esp), %mm5
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm6.S b/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
index 79003e2f48..51a8973460 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm6.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm6
-_AsmWriteMm6:
+.globl ASM_PFX(AsmWriteMm6)
+ASM_PFX(AsmWriteMm6):
movq 4(%esp), %mm6
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMm7.S b/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
index 9100e25dfa..824bbeae17 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMm7.S
@@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMm7
-_AsmWriteMm7:
+.globl ASM_PFX(AsmWriteMm7)
+ASM_PFX(AsmWriteMm7):
movq 4(%esp), %mm7
ret
diff --git a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
index 1289c5f862..5c12c981a9 100644
--- a/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
+++ b/MdePkg/Library/BaseLib/Ia32/WriteMsr64.S
@@ -29,8 +29,8 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.globl _AsmWriteMsr64
-_AsmWriteMsr64:
+.globl ASM_PFX(AsmWriteMsr64)
+ASM_PFX(AsmWriteMsr64):
movl 12(%esp), %edx
movl 8(%esp), %eax
movl 4(%esp), %ecx