diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 09:42:59 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 09:42:59 +0000 |
commit | d5172f911d21d03a3a4f50cb6ebe89854d191e4d (patch) | |
tree | a0653d75590009e994fa9dbfb848b250b798ccd9 | |
parent | dedfc3bbc97e726e259bfadbdf22502133faa8a8 (diff) |
1. Remove .extern from GCC assembly.
2. Define macro for .global/.globl in GCC assembly.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8344 6f19259b-4bc3-4df7-8a09-765794883524
89 files changed, 107 insertions, 98 deletions
diff --git a/DuetPkg/BootSector/bootsect.S b/DuetPkg/BootSector/bootsect.S index 91a1966c9..336c82bcb 100644 --- a/DuetPkg/BootSector/bootsect.S +++ b/DuetPkg/BootSector/bootsect.S @@ -42,8 +42,8 @@ .equ LOADER_FILENAME_PART2, 0x020205244 # "DR__"
.equ LOADER_FILENAME_PART3, 0x020202020 # "____"
- .org 0x0 -.global _start + .org 0x0
+ASM_GLOBAL _start
_start:
Ia32Jump:
jmp BootSectorEntryPoint # JMP inst - 3 bytes
diff --git a/DuetPkg/BootSector/bs16.S b/DuetPkg/BootSector/bs16.S index 57e790412..c1f13636d 100644 --- a/DuetPkg/BootSector/bs16.S +++ b/DuetPkg/BootSector/bs16.S @@ -30,8 +30,8 @@ .equ LOADER_FILENAME_PART2, 0x036315244 # "DR16"
.equ LOADER_FILENAME_PART3, 0x020202036 # "6___"
- .org 0x0 -.global _start + .org 0x0
+ASM_GLOBAL _start
_start:
Ia32Jump:
jmp BootSectorEntryPoint # JMP inst - 3 bytes
diff --git a/DuetPkg/BootSector/bs32.S b/DuetPkg/BootSector/bs32.S index 5df6d6a52..a1f8ec0b1 100644 --- a/DuetPkg/BootSector/bs32.S +++ b/DuetPkg/BootSector/bs32.S @@ -30,8 +30,8 @@ .equ LOADER_FILENAME_PART2, 0x30325244 # "DR20"
.equ LOADER_FILENAME_PART3, 0x20202030 # "0___"
- .org 0x0 -.global _start + .org 0x0
+ASM_GLOBAL _start
_start:
Ia32Jump:
jmp BootSectorEntryPoint # JMP inst - 3 bytes
diff --git a/DuetPkg/BootSector/start16.S b/DuetPkg/BootSector/start16.S index f0ff82a82..7106f15f5 100644 --- a/DuetPkg/BootSector/start16.S +++ b/DuetPkg/BootSector/start16.S @@ -26,8 +26,8 @@ .equ BLOCK_MASK, 0x01ff
.equ BLOCK_SHIFT, 9
- .org 0x00 -.global _start + .org 0x00
+ASM_GLOBAL _start
_start:
Ia32Jump:
jmp BootSectorEntryPoint # JMP inst - 3 bytes
@@ -452,7 +452,7 @@ gdtr: .word GDT_END - GDT_BASE - 1 # GDT limit .align 0x2
-.global GDT_BASE
+ASM_GLOBAL GDT_BASE
GDT_BASE:
# null descriptor
.equ NULL_SEL, .-GDT_BASE
@@ -546,7 +546,7 @@ idtr: .word IDT_END - IDT_BASE - 1 # IDT limit #idt_tag db "IDT",0
.align 0x2
-.global IDT_BASE
+ASM_GLOBAL IDT_BASE
IDT_BASE:
# divide by zero (INT 0)
.equ DIV_ZERO_SEL, .-IDT_BASE
diff --git a/MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.S b/MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.S index 3b86b53ab..acebb63a7 100644 --- a/MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.S +++ b/MdeModulePkg/Universal/EbcDxe/X64/EbcLowLevel.S @@ -33,10 +33,10 @@ #
# Destroys no working registers.
#****************************************************************************
-.global _CopyMem;
+ASM_GLOBAL _CopyMem;
# VOID EbcLLCALLEXNative(UINTN FuncAddr, UINTN NewStackPointer, VOID *FramePtr)
-.global ASM_PFX(EbcLLCALLEXNative);
+ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative);
ASM_PFX(EbcLLCALLEXNative):
push %rbp
push %rbx
@@ -84,7 +84,7 @@ ASM_PFX(EbcLLCALLEXNative): # Returns:
# The contents of the register in which the entry point is passed.
#
-.global ASM_PFX(EbcLLGetEbcEntryPoint);
+ASM_GLOBAL ASM_PFX(EbcLLGetEbcEntryPoint);
ASM_PFX(EbcLLGetEbcEntryPoint):
ret
@@ -107,7 +107,7 @@ ASM_PFX(EbcLLGetEbcEntryPoint): #--*/
# UINTN EbcLLGetStackPointer()
-.global ASM_PFX(EbcLLGetStackPointer);
+ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer);
ASM_PFX(EbcLLGetStackPointer):
mov %rsp, %rax
# Stack adjusted by this much when we were called,
@@ -115,7 +115,7 @@ ASM_PFX(EbcLLGetStackPointer): add $4, %rax
ret
-.global ASM_PFX(EbcLLGetReturnValue);
+ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue);
ASM_PFX(EbcLLGetReturnValue):
# UINT64 EbcLLGetReturnValue(VOID);
# Routine Description:
diff --git a/MdePkg/Include/Ia32/ProcessorBind.h b/MdePkg/Include/Ia32/ProcessorBind.h index 9cb4eac8c..a397f4b4b 100644 --- a/MdePkg/Include/Ia32/ProcessorBind.h +++ b/MdePkg/Include/Ia32/ProcessorBind.h @@ -341,6 +341,11 @@ typedef INT32 INTN; #else
#define ASM_PFX(name) _##name
#endif
+ #if defined(__APPLE__)
+ #define ASM_GLOBAL .globl
+ #else
+ #define ASM_GLOBAL .global
+ #endif
#endif
/**
diff --git a/MdePkg/Include/X64/ProcessorBind.h b/MdePkg/Include/X64/ProcessorBind.h index 9310f9f33..ce1986785 100644 --- a/MdePkg/Include/X64/ProcessorBind.h +++ b/MdePkg/Include/X64/ProcessorBind.h @@ -405,6 +405,11 @@ typedef INT64 INTN; #else
#define ASM_PFX(name) _##name
#endif
+ #if defined(__APPLE__)
+ #define ASM_GLOBAL .globl
+ #else
+ #define ASM_GLOBAL .global
+ #endif
#endif
/**
diff --git a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.S b/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.S index 535665cee..da366b36d 100644 --- a/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.S +++ b/MdePkg/Library/BaseCpuLib/X64/CpuFlushTlb.S @@ -20,7 +20,7 @@ #
#------------------------------------------------------------------------------
-.global ASM_PFX(CpuFlushTlb)
+ASM_GLOBAL ASM_PFX(CpuFlushTlb)
#------------------------------------------------------------------------------
# VOID
diff --git a/MdePkg/Library/BaseCpuLib/X64/CpuSleep.S b/MdePkg/Library/BaseCpuLib/X64/CpuSleep.S index 6cb46f9f8..77452d002 100644 --- a/MdePkg/Library/BaseCpuLib/X64/CpuSleep.S +++ b/MdePkg/Library/BaseCpuLib/X64/CpuSleep.S @@ -28,7 +28,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(CpuSleep)
+ASM_GLOBAL ASM_PFX(CpuSleep)
ASM_PFX(CpuSleep):
hlt
ret
diff --git a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.S b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.S index 95e8da16e..fbf4de85d 100644 --- a/MdePkg/Library/BaseLib/X64/CpuBreakpoint.S +++ b/MdePkg/Library/BaseLib/X64/CpuBreakpoint.S @@ -19,7 +19,7 @@ #
#------------------------------------------------------------------------------
-.global ASM_PFX(CpuBreakpoint)
+ASM_GLOBAL ASM_PFX(CpuBreakpoint)
ASM_PFX(CpuBreakpoint):
int $0x3
ret
diff --git a/MdePkg/Library/BaseLib/X64/CpuId.S b/MdePkg/Library/BaseLib/X64/CpuId.S index 0b7a66f85..8612c5d2b 100644 --- a/MdePkg/Library/BaseLib/X64/CpuId.S +++ b/MdePkg/Library/BaseLib/X64/CpuId.S @@ -32,7 +32,7 @@ # OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmCpuid)
+ASM_GLOBAL ASM_PFX(AsmCpuid)
ASM_PFX(AsmCpuid):
push %rbx
mov %ecx, %eax
diff --git a/MdePkg/Library/BaseLib/X64/CpuIdEx.S b/MdePkg/Library/BaseLib/X64/CpuIdEx.S index 8dd70b253..ae5c80a98 100644 --- a/MdePkg/Library/BaseLib/X64/CpuIdEx.S +++ b/MdePkg/Library/BaseLib/X64/CpuIdEx.S @@ -33,7 +33,7 @@ # OUT UINT32 *RegisterOutEdx OPTIONAL
# )
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmCpuidEx)
+ASM_GLOBAL ASM_PFX(AsmCpuidEx)
ASM_PFX(AsmCpuidEx):
push %rbx
movl %ecx,%eax
diff --git a/MdePkg/Library/BaseLib/X64/CpuPause.S b/MdePkg/Library/BaseLib/X64/CpuPause.S index 5706d872a..4afdb9ece 100644 --- a/MdePkg/Library/BaseLib/X64/CpuPause.S +++ b/MdePkg/Library/BaseLib/X64/CpuPause.S @@ -28,7 +28,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(CpuPause)
+ASM_GLOBAL ASM_PFX(CpuPause)
ASM_PFX(CpuPause):
pause
ret
diff --git a/MdePkg/Library/BaseLib/X64/DisableInterrupts.S b/MdePkg/Library/BaseLib/X64/DisableInterrupts.S index 00bd7b7e9..c688a43f2 100644 --- a/MdePkg/Library/BaseLib/X64/DisableInterrupts.S +++ b/MdePkg/Library/BaseLib/X64/DisableInterrupts.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(DisableInterrupts)
+ASM_GLOBAL ASM_PFX(DisableInterrupts)
ASM_PFX(DisableInterrupts):
cli
ret
diff --git a/MdePkg/Library/BaseLib/X64/DisablePaging64.S b/MdePkg/Library/BaseLib/X64/DisablePaging64.S index 8c71d2d49..f3ed29ed4 100644 --- a/MdePkg/Library/BaseLib/X64/DisablePaging64.S +++ b/MdePkg/Library/BaseLib/X64/DisablePaging64.S @@ -35,7 +35,7 @@ # );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86DisablePaging64)
+ASM_GLOBAL ASM_PFX(InternalX86DisablePaging64)
ASM_PFX(InternalX86DisablePaging64):
cli
shl $0x20,%rcx # rcx[32..47] <- Cs
diff --git a/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S b/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S index 22f029cdd..b3eb1218f 100644 --- a/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S +++ b/MdePkg/Library/BaseLib/X64/EnableDisableInterrupts.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(EnableDisableInterrupts)
+ASM_GLOBAL ASM_PFX(EnableDisableInterrupts)
.align 16
ASM_PFX(EnableDisableInterrupts):
sti
diff --git a/MdePkg/Library/BaseLib/X64/EnableInterrupts.S b/MdePkg/Library/BaseLib/X64/EnableInterrupts.S index 77a547193..86a3b14f4 100644 --- a/MdePkg/Library/BaseLib/X64/EnableInterrupts.S +++ b/MdePkg/Library/BaseLib/X64/EnableInterrupts.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(EnableInterrupts)
+ASM_GLOBAL ASM_PFX(EnableInterrupts)
ASM_PFX(EnableInterrupts):
sti
ret
diff --git a/MdePkg/Library/BaseLib/X64/FlushCacheLine.S b/MdePkg/Library/BaseLib/X64/FlushCacheLine.S index ad79ec172..ffaca31ac 100644 --- a/MdePkg/Library/BaseLib/X64/FlushCacheLine.S +++ b/MdePkg/Library/BaseLib/X64/FlushCacheLine.S @@ -29,7 +29,7 @@ # IN VOID *LinearAddress
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmFlushCacheLine)
+ASM_GLOBAL ASM_PFX(AsmFlushCacheLine)
ASM_PFX(AsmFlushCacheLine):
clflush (%rcx)
mov %rcx, %rax
diff --git a/MdePkg/Library/BaseLib/X64/FxRestore.S b/MdePkg/Library/BaseLib/X64/FxRestore.S index e38549fc8..d7e152182 100644 --- a/MdePkg/Library/BaseLib/X64/FxRestore.S +++ b/MdePkg/Library/BaseLib/X64/FxRestore.S @@ -29,7 +29,7 @@ # IN CONST IA32_FX_BUFFER *Buffer
# )#
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86FxRestore)
+ASM_GLOBAL ASM_PFX(InternalX86FxRestore)
ASM_PFX(InternalX86FxRestore):
fxrstor (%rcx)
ret
diff --git a/MdePkg/Library/BaseLib/X64/FxSave.S b/MdePkg/Library/BaseLib/X64/FxSave.S index f98320b82..961e46e31 100644 --- a/MdePkg/Library/BaseLib/X64/FxSave.S +++ b/MdePkg/Library/BaseLib/X64/FxSave.S @@ -29,7 +29,7 @@ # OUT IA32_FX_BUFFER *Buffer
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86FxSave)
+ASM_GLOBAL ASM_PFX(InternalX86FxSave)
ASM_PFX(InternalX86FxSave):
fxsave (%rcx)
ret
diff --git a/MdePkg/Library/BaseLib/X64/Invd.S b/MdePkg/Library/BaseLib/X64/Invd.S index 512fc86ee..6a1068644 100644 --- a/MdePkg/Library/BaseLib/X64/Invd.S +++ b/MdePkg/Library/BaseLib/X64/Invd.S @@ -29,7 +29,7 @@ # VOID
# )#
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmInvd)
+ASM_GLOBAL ASM_PFX(AsmInvd)
ASM_PFX(AsmInvd):
invd
ret
diff --git a/MdePkg/Library/BaseLib/X64/LongJump.S b/MdePkg/Library/BaseLib/X64/LongJump.S index ee840c07f..d43fcf000 100644 --- a/MdePkg/Library/BaseLib/X64/LongJump.S +++ b/MdePkg/Library/BaseLib/X64/LongJump.S @@ -27,7 +27,7 @@ # IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalLongJump)
+ASM_GLOBAL ASM_PFX(InternalLongJump)
ASM_PFX(InternalLongJump):
mov (%rcx), %rbx
mov 0x8(%rcx), %rsp
diff --git a/MdePkg/Library/BaseLib/X64/Monitor.S b/MdePkg/Library/BaseLib/X64/Monitor.S index 1581598c4..0be3b981f 100644 --- a/MdePkg/Library/BaseLib/X64/Monitor.S +++ b/MdePkg/Library/BaseLib/X64/Monitor.S @@ -31,7 +31,7 @@ # IN UINTN Edx
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmMonitor)
+ASM_GLOBAL ASM_PFX(AsmMonitor)
.align 16
ASM_PFX(AsmMonitor):
mov %ecx,%eax
diff --git a/MdePkg/Library/BaseLib/X64/Mwait.S b/MdePkg/Library/BaseLib/X64/Mwait.S index 9226ce361..403ed26c4 100644 --- a/MdePkg/Library/BaseLib/X64/Mwait.S +++ b/MdePkg/Library/BaseLib/X64/Mwait.S @@ -30,7 +30,7 @@ # IN UINTN Ecx
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmMwait)
+ASM_GLOBAL ASM_PFX(AsmMwait)
.align 16
ASM_PFX(AsmMwait):
mov %ecx,%eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadCr0.S b/MdePkg/Library/BaseLib/X64/ReadCr0.S index 0c858e495..23d375de4 100644 --- a/MdePkg/Library/BaseLib/X64/ReadCr0.S +++ b/MdePkg/Library/BaseLib/X64/ReadCr0.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr0)
+ASM_GLOBAL ASM_PFX(AsmReadCr0)
.align 16
ASM_PFX(AsmReadCr0):
mov %cr0, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadCr2.S b/MdePkg/Library/BaseLib/X64/ReadCr2.S index 665a401b7..26c2c2f27 100644 --- a/MdePkg/Library/BaseLib/X64/ReadCr2.S +++ b/MdePkg/Library/BaseLib/X64/ReadCr2.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr2)
+ASM_GLOBAL ASM_PFX(AsmReadCr2)
.align 16
ASM_PFX(AsmReadCr2):
mov %cr2, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadCr3.S b/MdePkg/Library/BaseLib/X64/ReadCr3.S index 5c80c1a63..1161eb2bd 100644 --- a/MdePkg/Library/BaseLib/X64/ReadCr3.S +++ b/MdePkg/Library/BaseLib/X64/ReadCr3.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr3)
+ASM_GLOBAL ASM_PFX(AsmReadCr3)
.align 16
ASM_PFX(AsmReadCr3):
mov %cr3, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadCr4.S b/MdePkg/Library/BaseLib/X64/ReadCr4.S index 8de29bd6c..192480d01 100644 --- a/MdePkg/Library/BaseLib/X64/ReadCr4.S +++ b/MdePkg/Library/BaseLib/X64/ReadCr4.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCr4)
+ASM_GLOBAL ASM_PFX(AsmReadCr4)
.align 16
ASM_PFX(AsmReadCr4):
mov %cr4, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadCs.S b/MdePkg/Library/BaseLib/X64/ReadCs.S index 85654c2e2..7bb98dfb7 100644 --- a/MdePkg/Library/BaseLib/X64/ReadCs.S +++ b/MdePkg/Library/BaseLib/X64/ReadCs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadCs)
+ASM_GLOBAL ASM_PFX(AsmReadCs)
.align 16
ASM_PFX(AsmReadCs):
mov %cs, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr0.S b/MdePkg/Library/BaseLib/X64/ReadDr0.S index 4e1cf5fb1..e4fb3b3f5 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr0.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr0.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr0)
+ASM_GLOBAL ASM_PFX(AsmReadDr0)
.align 16
ASM_PFX(AsmReadDr0):
mov %dr0, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr1.S b/MdePkg/Library/BaseLib/X64/ReadDr1.S index d45a18dee..e5c1cc868 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr1.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr1.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr1)
+ASM_GLOBAL ASM_PFX(AsmReadDr1)
.align 16
ASM_PFX(AsmReadDr1):
mov %dr1, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr2.S b/MdePkg/Library/BaseLib/X64/ReadDr2.S index 073f903e3..9ef017d3e 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr2.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr2.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr2)
+ASM_GLOBAL ASM_PFX(AsmReadDr2)
.align 16
ASM_PFX(AsmReadDr2):
mov %dr2, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr3.S b/MdePkg/Library/BaseLib/X64/ReadDr3.S index ebd90c902..277a99936 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr3.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr3.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr3)
+ASM_GLOBAL ASM_PFX(AsmReadDr3)
.align 16
ASM_PFX(AsmReadDr3):
mov %dr3, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr4.S b/MdePkg/Library/BaseLib/X64/ReadDr4.S index 752a04cfa..5f5651fd3 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr4.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr4.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr4)
+ASM_GLOBAL ASM_PFX(AsmReadDr4)
.align 16
ASM_PFX(AsmReadDr4):
#DB 0fh, 21h, 0e0h
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr5.S b/MdePkg/Library/BaseLib/X64/ReadDr5.S index 42a5ed3e7..766fc4570 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr5.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr5.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr5)
+ASM_GLOBAL ASM_PFX(AsmReadDr5)
.align 16
ASM_PFX(AsmReadDr5):
mov %dr5, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr6.S b/MdePkg/Library/BaseLib/X64/ReadDr6.S index 6186d497a..0bde38cca 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr6.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr6.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr6)
+ASM_GLOBAL ASM_PFX(AsmReadDr6)
.align 16
ASM_PFX(AsmReadDr6):
mov %dr6, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDr7.S b/MdePkg/Library/BaseLib/X64/ReadDr7.S index c43c7d450..3de98eb7f 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDr7.S +++ b/MdePkg/Library/BaseLib/X64/ReadDr7.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDr7)
+ASM_GLOBAL ASM_PFX(AsmReadDr7)
.align 16
ASM_PFX(AsmReadDr7):
mov %dr7, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadDs.S b/MdePkg/Library/BaseLib/X64/ReadDs.S index bd28aa931..119da0081 100644 --- a/MdePkg/Library/BaseLib/X64/ReadDs.S +++ b/MdePkg/Library/BaseLib/X64/ReadDs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadDs)
+ASM_GLOBAL ASM_PFX(AsmReadDs)
.align 16
ASM_PFX(AsmReadDs):
movl %ds, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadEflags.S b/MdePkg/Library/BaseLib/X64/ReadEflags.S index 3be5d7ab7..c90d51613 100644 --- a/MdePkg/Library/BaseLib/X64/ReadEflags.S +++ b/MdePkg/Library/BaseLib/X64/ReadEflags.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadEflags)
+ASM_GLOBAL ASM_PFX(AsmReadEflags)
.align 16
ASM_PFX(AsmReadEflags):
pushfq
diff --git a/MdePkg/Library/BaseLib/X64/ReadEs.S b/MdePkg/Library/BaseLib/X64/ReadEs.S index 9a45439e1..a75b95f95 100644 --- a/MdePkg/Library/BaseLib/X64/ReadEs.S +++ b/MdePkg/Library/BaseLib/X64/ReadEs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadEs)
+ASM_GLOBAL ASM_PFX(AsmReadEs)
.align 16
ASM_PFX(AsmReadEs):
mov %es, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadFs.S b/MdePkg/Library/BaseLib/X64/ReadFs.S index 74637b3db..5b26d5e57 100644 --- a/MdePkg/Library/BaseLib/X64/ReadFs.S +++ b/MdePkg/Library/BaseLib/X64/ReadFs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadFs)
+ASM_GLOBAL ASM_PFX(AsmReadFs)
.align 16
ASM_PFX(AsmReadFs):
mov %fs, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadGdtr.S b/MdePkg/Library/BaseLib/X64/ReadGdtr.S index c57ef3e89..889efeb61 100644 --- a/MdePkg/Library/BaseLib/X64/ReadGdtr.S +++ b/MdePkg/Library/BaseLib/X64/ReadGdtr.S @@ -29,7 +29,7 @@ # OUT IA32_DESCRIPTOR *Gdtr
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86ReadGdtr)
+ASM_GLOBAL ASM_PFX(InternalX86ReadGdtr)
.align 16
ASM_PFX(InternalX86ReadGdtr):
sgdt (%rcx)
diff --git a/MdePkg/Library/BaseLib/X64/ReadGs.S b/MdePkg/Library/BaseLib/X64/ReadGs.S index b89bb3b4f..a89b27dc1 100644 --- a/MdePkg/Library/BaseLib/X64/ReadGs.S +++ b/MdePkg/Library/BaseLib/X64/ReadGs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadGs)
+ASM_GLOBAL ASM_PFX(AsmReadGs)
.align 16
ASM_PFX(AsmReadGs):
mov %gs, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadIdtr.S b/MdePkg/Library/BaseLib/X64/ReadIdtr.S index 84cbab410..efdaf77a8 100644 --- a/MdePkg/Library/BaseLib/X64/ReadIdtr.S +++ b/MdePkg/Library/BaseLib/X64/ReadIdtr.S @@ -29,7 +29,7 @@ # OUT IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86ReadIdtr)
+ASM_GLOBAL ASM_PFX(InternalX86ReadIdtr)
.align 16
ASM_PFX(InternalX86ReadIdtr):
sidt (%rcx)
diff --git a/MdePkg/Library/BaseLib/X64/ReadLdtr.S b/MdePkg/Library/BaseLib/X64/ReadLdtr.S index 4d5a43cd0..6e7e0a3e3 100644 --- a/MdePkg/Library/BaseLib/X64/ReadLdtr.S +++ b/MdePkg/Library/BaseLib/X64/ReadLdtr.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadLdtr)
+ASM_GLOBAL ASM_PFX(AsmReadLdtr)
.align 16
ASM_PFX(AsmReadLdtr):
sldt %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm0.S b/MdePkg/Library/BaseLib/X64/ReadMm0.S index 57c91da85..dd259ed91 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm0.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm0.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm0)
+ASM_GLOBAL ASM_PFX(AsmReadMm0)
.align 16
ASM_PFX(AsmReadMm0):
movd %mm0, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm1.S b/MdePkg/Library/BaseLib/X64/ReadMm1.S index 45ef7f8a5..b3eed9fa2 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm1.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm1.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm1)
+ASM_GLOBAL ASM_PFX(AsmReadMm1)
.align 16
ASM_PFX(AsmReadMm1):
movd %mm1, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm2.S b/MdePkg/Library/BaseLib/X64/ReadMm2.S index d0cdf19b7..2459fcd55 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm2.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm2.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm2)
+ASM_GLOBAL ASM_PFX(AsmReadMm2)
.align 16
ASM_PFX(AsmReadMm2):
movd %mm2, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm3.S b/MdePkg/Library/BaseLib/X64/ReadMm3.S index c1d7fd9e5..0cf5bc793 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm3.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm3.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm3)
+ASM_GLOBAL ASM_PFX(AsmReadMm3)
.align 16
ASM_PFX(AsmReadMm3):
movd %mm3, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm4.S b/MdePkg/Library/BaseLib/X64/ReadMm4.S index dafeca484..fad10ae3b 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm4.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm4.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm4)
+ASM_GLOBAL ASM_PFX(AsmReadMm4)
.align 16
ASM_PFX(AsmReadMm4):
movd %mm4, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm5.S b/MdePkg/Library/BaseLib/X64/ReadMm5.S index 26d83631a..03629d575 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm5.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm5.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm5)
+ASM_GLOBAL ASM_PFX(AsmReadMm5)
.align 16
ASM_PFX(AsmReadMm5):
movd %mm5, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm6.S b/MdePkg/Library/BaseLib/X64/ReadMm6.S index a8ea02226..f496d3be4 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm6.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm6.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm6)
+ASM_GLOBAL ASM_PFX(AsmReadMm6)
.align 16
ASM_PFX(AsmReadMm6):
movd %mm6, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMm7.S b/MdePkg/Library/BaseLib/X64/ReadMm7.S index 1f273670f..aa6bb0fca 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMm7.S +++ b/MdePkg/Library/BaseLib/X64/ReadMm7.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMm7)
+ASM_GLOBAL ASM_PFX(AsmReadMm7)
.align 16
ASM_PFX(AsmReadMm7):
movd %mm7, %rax
diff --git a/MdePkg/Library/BaseLib/X64/ReadMsr64.S b/MdePkg/Library/BaseLib/X64/ReadMsr64.S index 8c7ec3b82..32be9dc7d 100644 --- a/MdePkg/Library/BaseLib/X64/ReadMsr64.S +++ b/MdePkg/Library/BaseLib/X64/ReadMsr64.S @@ -29,7 +29,7 @@ # IN UINT32 Index
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadMsr64)
+ASM_GLOBAL ASM_PFX(AsmReadMsr64)
.align 16
ASM_PFX(AsmReadMsr64):
rdmsr # edx & eax are zero extended
diff --git a/MdePkg/Library/BaseLib/X64/ReadPmc.S b/MdePkg/Library/BaseLib/X64/ReadPmc.S index f88061809..66ced6541 100644 --- a/MdePkg/Library/BaseLib/X64/ReadPmc.S +++ b/MdePkg/Library/BaseLib/X64/ReadPmc.S @@ -29,7 +29,7 @@ # IN UINT32 PmcIndex
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadPmc)
+ASM_GLOBAL ASM_PFX(AsmReadPmc)
.align 16
ASM_PFX(AsmReadPmc):
rdpmc
diff --git a/MdePkg/Library/BaseLib/X64/ReadSs.S b/MdePkg/Library/BaseLib/X64/ReadSs.S index 127d75f97..ea7e2e2c1 100644 --- a/MdePkg/Library/BaseLib/X64/ReadSs.S +++ b/MdePkg/Library/BaseLib/X64/ReadSs.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadSs)
+ASM_GLOBAL ASM_PFX(AsmReadSs)
.align 16
ASM_PFX(AsmReadSs):
movl %ss, %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadTr.S b/MdePkg/Library/BaseLib/X64/ReadTr.S index 7bf34d2f6..2dee7296a 100644 --- a/MdePkg/Library/BaseLib/X64/ReadTr.S +++ b/MdePkg/Library/BaseLib/X64/ReadTr.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadTr)
+ASM_GLOBAL ASM_PFX(AsmReadTr)
.align 16
ASM_PFX(AsmReadTr):
str %eax
diff --git a/MdePkg/Library/BaseLib/X64/ReadTsc.S b/MdePkg/Library/BaseLib/X64/ReadTsc.S index d472a5364..f3c45b558 100644 --- a/MdePkg/Library/BaseLib/X64/ReadTsc.S +++ b/MdePkg/Library/BaseLib/X64/ReadTsc.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmReadTsc)
+ASM_GLOBAL ASM_PFX(AsmReadTsc)
.align 16
ASM_PFX(AsmReadTsc):
rdtsc
diff --git a/MdePkg/Library/BaseLib/X64/SetJump.S b/MdePkg/Library/BaseLib/X64/SetJump.S index 597a2662a..d8454d396 100644 --- a/MdePkg/Library/BaseLib/X64/SetJump.S +++ b/MdePkg/Library/BaseLib/X64/SetJump.S @@ -19,8 +19,7 @@ #
#------------------------------------------------------------------------------
-.extern ASM_PFX(InternalAssertJumpBuffer)
-.global ASM_PFX(SetJump)
+ASM_GLOBAL ASM_PFX(SetJump)
ASM_PFX(SetJump):
push %rcx
add $0xffffffffffffffe0,%rsp
diff --git a/MdePkg/Library/BaseLib/X64/SwitchStack.S b/MdePkg/Library/BaseLib/X64/SwitchStack.S index e75ddaf96..e5b9e54ce 100644 --- a/MdePkg/Library/BaseLib/X64/SwitchStack.S +++ b/MdePkg/Library/BaseLib/X64/SwitchStack.S @@ -35,7 +35,7 @@ # None
#
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSwitchStack)
+ASM_GLOBAL ASM_PFX(InternalSwitchStack)
ASM_PFX(InternalSwitchStack):
mov %rcx, %rax
mov %rdx, %rcx
diff --git a/MdePkg/Library/BaseLib/X64/Wbinvd.S b/MdePkg/Library/BaseLib/X64/Wbinvd.S index 492c312b9..e05301d91 100644 --- a/MdePkg/Library/BaseLib/X64/Wbinvd.S +++ b/MdePkg/Library/BaseLib/X64/Wbinvd.S @@ -29,7 +29,7 @@ # VOID
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWbinvd)
+ASM_GLOBAL ASM_PFX(AsmWbinvd)
.align 16
ASM_PFX(AsmWbinvd):
wbinvd
diff --git a/MdePkg/Library/BaseLib/X64/WriteCr0.S b/MdePkg/Library/BaseLib/X64/WriteCr0.S index 28606cf5e..a8078fae7 100644 --- a/MdePkg/Library/BaseLib/X64/WriteCr0.S +++ b/MdePkg/Library/BaseLib/X64/WriteCr0.S @@ -29,7 +29,7 @@ # UINTN Cr0
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteCr0)
+ASM_GLOBAL ASM_PFX(AsmWriteCr0)
ASM_PFX(AsmWriteCr0):
mov %rcx,%cr0
mov %rcx,%rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteCr2.S b/MdePkg/Library/BaseLib/X64/WriteCr2.S index 5556cd376..b08a4e36b 100644 --- a/MdePkg/Library/BaseLib/X64/WriteCr2.S +++ b/MdePkg/Library/BaseLib/X64/WriteCr2.S @@ -29,7 +29,7 @@ # UINTN Cr2
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteCr2)
+ASM_GLOBAL ASM_PFX(AsmWriteCr2)
ASM_PFX(AsmWriteCr2):
mov %rcx,%cr2
mov %rcx,%rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteCr3.S b/MdePkg/Library/BaseLib/X64/WriteCr3.S index 1016ae46f..756e97cfa 100644 --- a/MdePkg/Library/BaseLib/X64/WriteCr3.S +++ b/MdePkg/Library/BaseLib/X64/WriteCr3.S @@ -29,7 +29,7 @@ # UINTN Cr3
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteCr3)
+ASM_GLOBAL ASM_PFX(AsmWriteCr3)
ASM_PFX(AsmWriteCr3):
mov %rcx,%cr3
mov %rcx,%rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteCr4.S b/MdePkg/Library/BaseLib/X64/WriteCr4.S index 04ee1b02e..ef6a53925 100644 --- a/MdePkg/Library/BaseLib/X64/WriteCr4.S +++ b/MdePkg/Library/BaseLib/X64/WriteCr4.S @@ -29,7 +29,7 @@ # UINTN Cr4
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteCr4)
+ASM_GLOBAL ASM_PFX(AsmWriteCr4)
ASM_PFX(AsmWriteCr4):
mov %rcx,%cr4
mov %rcx,%rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr0.S b/MdePkg/Library/BaseLib/X64/WriteDr0.S index 250e5e347..6b1d1bf19 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr0.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr0.S @@ -29,7 +29,7 @@ # UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr0)
+ASM_GLOBAL ASM_PFX(AsmWriteDr0)
.align 16
ASM_PFX(AsmWriteDr0):
mov %rcx, %dr0
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr1.S b/MdePkg/Library/BaseLib/X64/WriteDr1.S index b9805efb9..297217b45 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr1.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr1.S @@ -29,7 +29,7 @@ # UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr1)
+ASM_GLOBAL ASM_PFX(AsmWriteDr1)
.align 16
ASM_PFX(AsmWriteDr1):
mov %rcx, %dr1
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr2.S b/MdePkg/Library/BaseLib/X64/WriteDr2.S index c82705f83..92c085077 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr2.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr2.S @@ -29,7 +29,7 @@ # UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr2)
+ASM_GLOBAL ASM_PFX(AsmWriteDr2)
.align 16
ASM_PFX(AsmWriteDr2):
mov %rcx, %dr2
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr3.S b/MdePkg/Library/BaseLib/X64/WriteDr3.S index 823dfafa2..b64b97750 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr3.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr3.S @@ -29,7 +29,7 @@ # UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr3)
+ASM_GLOBAL ASM_PFX(AsmWriteDr3)
.align 16
ASM_PFX(AsmWriteDr3):
mov %rcx, %dr3
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr4.S b/MdePkg/Library/BaseLib/X64/WriteDr4.S index b340d2d4a..22f503db6 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr4.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr4.S @@ -29,7 +29,7 @@ # IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr4)
+ASM_GLOBAL ASM_PFX(AsmWriteDr4)
ASM_PFX(AsmWriteDr4):
mov %rcx, %dr4
mov %rcx, %rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr5.S b/MdePkg/Library/BaseLib/X64/WriteDr5.S index ac765d7c2..7beb726c1 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr5.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr5.S @@ -29,7 +29,7 @@ # IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr5)
+ASM_GLOBAL ASM_PFX(AsmWriteDr5)
ASM_PFX(AsmWriteDr5):
mov %rcx, %dr5
mov %rcx, %rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr6.S b/MdePkg/Library/BaseLib/X64/WriteDr6.S index f0bd42c44..c5c6430dc 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr6.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr6.S @@ -29,7 +29,7 @@ # IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr6)
+ASM_GLOBAL ASM_PFX(AsmWriteDr6)
ASM_PFX(AsmWriteDr6):
mov %rcx, %dr6
mov %rcx, %rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteDr7.S b/MdePkg/Library/BaseLib/X64/WriteDr7.S index f1d98232a..616b9c1db 100644 --- a/MdePkg/Library/BaseLib/X64/WriteDr7.S +++ b/MdePkg/Library/BaseLib/X64/WriteDr7.S @@ -29,7 +29,7 @@ # IN UINTN Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteDr7)
+ASM_GLOBAL ASM_PFX(AsmWriteDr7)
ASM_PFX(AsmWriteDr7):
mov %rcx, %dr7
mov %rcx, %rax
diff --git a/MdePkg/Library/BaseLib/X64/WriteGdtr.S b/MdePkg/Library/BaseLib/X64/WriteGdtr.S index d51793091..6f48f50d3 100644 --- a/MdePkg/Library/BaseLib/X64/WriteGdtr.S +++ b/MdePkg/Library/BaseLib/X64/WriteGdtr.S @@ -29,7 +29,7 @@ # IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86WriteGdtr)
+ASM_GLOBAL ASM_PFX(InternalX86WriteGdtr)
ASM_PFX(InternalX86WriteGdtr):
lgdt (%rcx)
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteIdtr.S b/MdePkg/Library/BaseLib/X64/WriteIdtr.S index cafd3de0d..e8e332e9b 100644 --- a/MdePkg/Library/BaseLib/X64/WriteIdtr.S +++ b/MdePkg/Library/BaseLib/X64/WriteIdtr.S @@ -29,7 +29,7 @@ # IN CONST IA32_DESCRIPTOR *Idtr
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalX86WriteIdtr)
+ASM_GLOBAL ASM_PFX(InternalX86WriteIdtr)
.align 16
ASM_PFX(InternalX86WriteIdtr):
lidt (%rcx)
diff --git a/MdePkg/Library/BaseLib/X64/WriteLdtr.S b/MdePkg/Library/BaseLib/X64/WriteLdtr.S index cefcd774b..ebc017215 100644 --- a/MdePkg/Library/BaseLib/X64/WriteLdtr.S +++ b/MdePkg/Library/BaseLib/X64/WriteLdtr.S @@ -29,7 +29,7 @@ # IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteLdtr)
+ASM_GLOBAL ASM_PFX(AsmWriteLdtr)
.align 16
ASM_PFX(AsmWriteLdtr):
lldt %cx
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm0.S b/MdePkg/Library/BaseLib/X64/WriteMm0.S index 1eeb502a5..e24a62a22 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm0.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm0.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm0)
+ASM_GLOBAL ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
movd %rcx, %mm0
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm1.S b/MdePkg/Library/BaseLib/X64/WriteMm1.S index b0a744db3..163e1674b 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm1.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm1.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm1)
+ASM_GLOBAL ASM_PFX(AsmWriteMm1)
ASM_PFX(AsmWriteMm1):
movd %rcx, %mm1
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm2.S b/MdePkg/Library/BaseLib/X64/WriteMm2.S index b9b438b32..e5cfe11de 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm2.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm2.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm2)
+ASM_GLOBAL ASM_PFX(AsmWriteMm2)
ASM_PFX(AsmWriteMm2):
movd %rcx, %mm2
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm3.S b/MdePkg/Library/BaseLib/X64/WriteMm3.S index 5a567156c..c576e46bc 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm3.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm3.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm3)
+ASM_GLOBAL ASM_PFX(AsmWriteMm3)
ASM_PFX(AsmWriteMm3):
movd %rcx, %mm3
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm4.S b/MdePkg/Library/BaseLib/X64/WriteMm4.S index dc82695de..24ecbc11c 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm4.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm4.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm4)
+ASM_GLOBAL ASM_PFX(AsmWriteMm4)
ASM_PFX(AsmWriteMm4):
movd %rcx, %mm4
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm5.S b/MdePkg/Library/BaseLib/X64/WriteMm5.S index 1d8223504..c1e0e7c2c 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm5.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm5.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm5)
+ASM_GLOBAL ASM_PFX(AsmWriteMm5)
ASM_PFX(AsmWriteMm5):
movd %rcx, %mm5
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm6.S b/MdePkg/Library/BaseLib/X64/WriteMm6.S index 01e53dbce..c5a216d29 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm6.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm6.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm6)
+ASM_GLOBAL ASM_PFX(AsmWriteMm6)
ASM_PFX(AsmWriteMm6):
movd %rcx, %mm6
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMm7.S b/MdePkg/Library/BaseLib/X64/WriteMm7.S index 6b8346fb4..b6e650355 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMm7.S +++ b/MdePkg/Library/BaseLib/X64/WriteMm7.S @@ -29,7 +29,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMm7)
+ASM_GLOBAL ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movd %rcx, %mm7
ret
diff --git a/MdePkg/Library/BaseLib/X64/WriteMsr64.S b/MdePkg/Library/BaseLib/X64/WriteMsr64.S index a034efe07..dd2bc3ddb 100644 --- a/MdePkg/Library/BaseLib/X64/WriteMsr64.S +++ b/MdePkg/Library/BaseLib/X64/WriteMsr64.S @@ -30,7 +30,7 @@ # IN UINT64 Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(AsmWriteMsr64)
+ASM_GLOBAL ASM_PFX(AsmWriteMsr64)
.align 16
ASM_PFX(AsmWriteMsr64):
mov %rdx, %rax # meanwhile, rax <- return value
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.S b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.S index 8faca8b7b..90b1af11d 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.S +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange32.S @@ -30,7 +30,7 @@ # IN UINT32 ExchangeValue
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSyncCompareExchange32)
+ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange32)
ASM_PFX(InternalSyncCompareExchange32):
mov %edx, %eax
lock cmpxchg %r8d, (%rcx)
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.S b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.S index 5e6e16352..227ee2500 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.S +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedCompareExchange64.S @@ -31,7 +31,7 @@ # IN UINT64 ExchangeValue
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSyncCompareExchange64)
+ASM_GLOBAL ASM_PFX(InternalSyncCompareExchange64)
.align 16
ASM_PFX(InternalSyncCompareExchange64):
mov %rdx, %rax
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.S b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.S index d06559bd2..2cadd0269 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.S +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedDecrement.S @@ -29,7 +29,7 @@ # IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSyncDecrement)
+ASM_GLOBAL ASM_PFX(InternalSyncDecrement)
ASM_PFX(InternalSyncDecrement):
lock decl (%rcx)
mov (%rcx), %eax
diff --git a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.S b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.S index 0416dd7d2..e1d3a02f2 100644 --- a/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.S +++ b/MdePkg/Library/BaseSynchronizationLib/X64/InterlockedIncrement.S @@ -29,7 +29,7 @@ # IN UINT32 *Value
# );
#------------------------------------------------------------------------------
-.global ASM_PFX(InternalSyncIncrement)
+ASM_GLOBAL ASM_PFX(InternalSyncIncrement)
ASM_PFX(InternalSyncIncrement):
lock incl (%rcx)
mov (%rcx), %eax
|