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
This commit is contained in:
tgingold 2007-01-06 14:52:39 +00:00
parent 1e56bac2c8
commit a2b1bf96b3
96 changed files with 206 additions and 206 deletions

View File

@ -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

View File

@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
.globl _CpuBreakpoint
.globl ASM_PFX(CpuBreakpoint)
#------------------------------------------------------------------------------
# VOID
@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_CpuBreakpoint:
ASM_PFX(CpuBreakpoint):
int $3
ret

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
.globl _CpuPause
.globl ASM_PFX(CpuPause)
#------------------------------------------------------------------------------
# VOID
@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_CpuPause:
ASM_PFX(CpuPause):
pause
ret

View File

@ -20,7 +20,7 @@
#
#------------------------------------------------------------------------------
.globl _CpuSleep
.globl ASM_PFX(CpuSleep)
#------------------------------------------------------------------------------
# VOID
@ -29,6 +29,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_CpuSleep:
ASM_PFX(CpuSleep):
hlt
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _DisableInterrupts
.globl ASM_PFX(DisableInterrupts)
#------------------------------------------------------------------------------
# VOID
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_DisableInterrupts:
ASM_PFX(DisableInterrupts):
cli
ret

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _EnableDisableInterrupts
.globl ASM_PFX(EnableDisableInterrupts)
#------------------------------------------------------------------------------
# VOID
@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
_EnableDisableInterrupts:
ASM_PFX(EnableDisableInterrupts):
sti
cli
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _EnableInterrupts
.globl ASM_PFX(EnableInterrupts)
#------------------------------------------------------------------------------
# VOID
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_EnableInterrupts:
ASM_PFX(EnableInterrupts):
sti
ret

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmInvd
.globl ASM_PFX(AsmInvd)
#------------------------------------------------------------------------------
# VOID
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmInvd:
ASM_PFX(AsmInvd):
invd
ret

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadCr0
.globl ASM_PFX(AsmReadCr0)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadCr0:
ASM_PFX(AsmReadCr0):
movl %cr0, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadCr2
.globl ASM_PFX(AsmReadCr2)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadCr2:
ASM_PFX(AsmReadCr2):
movl %cr2, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadCr3
.globl ASM_PFX(AsmReadCr3)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadCr3:
ASM_PFX(AsmReadCr3):
movl %cr3, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadCr4
.globl ASM_PFX(AsmReadCr4)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadCr4:
ASM_PFX(AsmReadCr4):
movl %cr4, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadCs
.globl ASM_PFX(AsmReadCs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadCs:
ASM_PFX(AsmReadCs):
movl %cs, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr0
.globl ASM_PFX(AsmReadDr0)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr0:
ASM_PFX(AsmReadDr0):
movl %dr0, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr1
.globl ASM_PFX(AsmReadDr1)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr1:
ASM_PFX(AsmReadDr1):
movl %dr1, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr2
.globl ASM_PFX(AsmReadDr2)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr2:
ASM_PFX(AsmReadDr2):
movl %dr2, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr3
.globl ASM_PFX(AsmReadDr3)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr3:
ASM_PFX(AsmReadDr3):
movl %dr3, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr4
.globl ASM_PFX(AsmReadDr4)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr4:
ASM_PFX(AsmReadDr4):
movl %dr4, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr5
.globl ASM_PFX(AsmReadDr5)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr5:
ASM_PFX(AsmReadDr5):
movl %dr5, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr6
.globl ASM_PFX(AsmReadDr6)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr6:
ASM_PFX(AsmReadDr6):
movl %dr6, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDr7
.globl ASM_PFX(AsmReadDr7)
#------------------------------------------------------------------------------
# UINTN
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDr7:
ASM_PFX(AsmReadDr7):
movl %dr7, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadDs
.globl ASM_PFX(AsmReadDs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadDs:
ASM_PFX(AsmReadDs):
movl %ds, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadEflags
.globl ASM_PFX(AsmReadEflags)
#------------------------------------------------------------------------------
# UINTN
@ -30,7 +30,7 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadEflags:
ASM_PFX(AsmReadEflags):
pushfl
pop %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadEs
.globl ASM_PFX(AsmReadEs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadEs:
ASM_PFX(AsmReadEs):
movl %es, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadFs
.globl ASM_PFX(AsmReadFs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadFs:
ASM_PFX(AsmReadFs):
movl %fs, %eax
ret

View File

@ -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

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadGs
.globl ASM_PFX(AsmReadGs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadGs:
ASM_PFX(AsmReadGs):
movl %gs, %eax
ret

View File

@ -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

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadLdtr
.globl ASM_PFX(AsmReadLdtr)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadLdtr:
ASM_PFX(AsmReadLdtr):
sldt %eax
ret

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadSs
.globl ASM_PFX(AsmReadSs)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadSs:
ASM_PFX(AsmReadSs):
movl %ss, %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadTr
.globl ASM_PFX(AsmReadTr)
#------------------------------------------------------------------------------
# UINT16
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadTr:
ASM_PFX(AsmReadTr):
str %eax
ret

View File

@ -21,7 +21,7 @@
#
#------------------------------------------------------------------------------
.globl _AsmReadTsc
.globl ASM_PFX(AsmReadTsc)
#------------------------------------------------------------------------------
# UINT64
@ -30,6 +30,6 @@
# VOID
# );
#------------------------------------------------------------------------------
_AsmReadTsc:
ASM_PFX(AsmReadTsc):
rdtsc
ret

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -28,7 +28,7 @@
# VOID
# );
#------------------------------------------------------------------------------
.globl _AsmWbinvd
_AsmWbinvd:
.globl ASM_PFX(AsmWbinvd)
ASM_PFX(AsmWbinvd):
wbinvd
ret

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -28,8 +28,8 @@
# IN UINT16 Ldtr
# );
#------------------------------------------------------------------------------
.globl _AsmWriteLdtr
_AsmWriteLdtr:
.globl ASM_PFX(AsmWriteLdtr)
ASM_PFX(AsmWriteLdtr):
movl 4(%esp), %eax
lldtw %ax
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm0
_AsmWriteMm0:
.globl ASM_PFX(AsmWriteMm0)
ASM_PFX(AsmWriteMm0):
movq 4(%esp), %mm0
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm1
_AsmWriteMm1:
.globl ASM_PFX(AsmWriteMm1)
ASM_PFX(AsmWriteMm1):
movq 4(%esp), %mm1
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm2
_AsmWriteMm2:
.globl ASM_PFX(AsmWriteMm2)
ASM_PFX(AsmWriteMm2):
movq 4(%esp), %mm2
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm3
_AsmWriteMm3:
.globl ASM_PFX(AsmWriteMm3)
ASM_PFX(AsmWriteMm3):
movq 4(%esp), %mm3
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm4
_AsmWriteMm4:
.globl ASM_PFX(AsmWriteMm4)
ASM_PFX(AsmWriteMm4):
movq 4(%esp), %mm4
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm5
_AsmWriteMm5:
.globl ASM_PFX(AsmWriteMm5)
ASM_PFX(AsmWriteMm5):
movq 4(%esp), %mm5
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm6
_AsmWriteMm6:
.globl ASM_PFX(AsmWriteMm6)
ASM_PFX(AsmWriteMm6):
movq 4(%esp), %mm6
ret

View File

@ -28,7 +28,7 @@
# IN UINT64 Value
# );
#------------------------------------------------------------------------------
.globl _AsmWriteMm7
_AsmWriteMm7:
.globl ASM_PFX(AsmWriteMm7)
ASM_PFX(AsmWriteMm7):
movq 4(%esp), %mm7
ret

View File

@ -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