mirror of https://github.com/acidanthera/audk.git
sync GCC assembly files with MASM assembly files
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@878 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
983ba75c92
commit
bd0cd44be5
|
@ -23,15 +23,13 @@
|
|||
|
||||
|
||||
|
||||
.global _ARShiftU64
|
||||
_ARShiftU64:
|
||||
.global _InternalMathARShiftU64
|
||||
_InternalMathARShiftU64:
|
||||
movb 12(%esp),%cl
|
||||
movl 8(%esp),%eax
|
||||
cltd
|
||||
testb $32,%cl
|
||||
# MISMATCH: " cmovz edx, eax"
|
||||
cmovz %eax, %edx
|
||||
# MISMATCH: " cmovz eax, [esp + 4]"
|
||||
cmovz 4(%esp), %eax
|
||||
shrdl %cl,%edx,%eax
|
||||
sar %cl,%edx
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmDisablePaging32 function
|
||||
# InternalX86DisablePaging32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,15 +28,15 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmDisablePaging32 (
|
||||
# InternalX86DisablePaging32 (
|
||||
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
# IN VOID *Context1, OPTIONAL
|
||||
# IN VOID *Context2, OPTIONAL
|
||||
# IN VOID *NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmDisablePaging32
|
||||
_AsmDisablePaging32:
|
||||
.global _InternalX86DisablePaging32
|
||||
_InternalX86DisablePaging32:
|
||||
movl 4(%esp),%ebx
|
||||
movl 8(%esp),%ecx
|
||||
movl 12(%esp),%edx
|
||||
|
|
|
@ -39,9 +39,8 @@ L1:
|
|||
jmp _InternalMathDivRemU64x32
|
||||
|
||||
|
||||
.global DivRemU64x64
|
||||
DivRemU64x64:
|
||||
# MISMATCH: "DivRemU64x64: USES ebx esi edi"
|
||||
.global _DivRemU64x64
|
||||
_DivRemU64x64:
|
||||
push %ebx
|
||||
push %esi
|
||||
push %edi
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmEnablePaging32 function
|
||||
# InternalX86EnablePaging32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,15 +28,15 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmEnablePaging32 (
|
||||
# InternalX86EnablePaging32 (
|
||||
# IN SWITCH_STACK_ENTRY_POINT EntryPoint,
|
||||
# IN VOID *Context1, OPTIONAL
|
||||
# IN VOID *Context2, OPTIONAL
|
||||
# IN VOID *NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmEnablePaging32
|
||||
_AsmEnablePaging32:
|
||||
.global _InternalX86EnablePaging32
|
||||
_InternalX86EnablePaging32:
|
||||
movl 4(%esp),%ebx
|
||||
movl 8(%esp),%ecx
|
||||
movl 12(%esp),%edx
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmEnablePaging64 function
|
||||
# InternalX86EnablePaging64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,7 +28,7 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmEnablePaging64 (
|
||||
# InternalX86EnablePaging64 (
|
||||
# IN UINT16 CodeSelector,
|
||||
# IN UINT64 EntryPoint,
|
||||
# IN UINT64 Context1, OPTIONAL
|
||||
|
@ -36,10 +36,10 @@
|
|||
# IN UINT64 NewStack
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmEnablePaging64
|
||||
_AsmEnablePaging64:
|
||||
.global _InternalX86EnablePaging64
|
||||
_InternalX86EnablePaging64:
|
||||
cli
|
||||
movl $$LongStart, (%esp)
|
||||
movl $LongStart, (%esp)
|
||||
movl %cr4, %eax
|
||||
orb $0x20, %al
|
||||
movl %eax, %cr4 # enable PAE
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmFxRestore function
|
||||
# InternalX86FxRestore function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -29,12 +29,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmFxRestore (
|
||||
# InternalX86FxRestore (
|
||||
# IN CONST IA32_FX_BUFFER *Buffer
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmFxRestore
|
||||
_AsmFxRestore:
|
||||
.global _InternalX86FxRestore
|
||||
_InternalX86FxRestore:
|
||||
movl 4(%esp),%eax
|
||||
fxrstor (%eax)
|
||||
ret
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmFxSave function
|
||||
# InternalX86FxSave function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -29,12 +29,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmFxSave (
|
||||
# InternalX86FxSave (
|
||||
# OUT IA32_FX_BUFFER *Buffer
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmFxSave
|
||||
_AsmFxSave:
|
||||
.global _InternalX86FxSave
|
||||
_InternalX86FxSave:
|
||||
movl 4(%esp),%eax
|
||||
fxsave (%eax)
|
||||
ret
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InterlockedCompareExchange32 function
|
||||
# InternalSyncCompareExchange32 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -25,35 +25,17 @@
|
|||
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
# EFIAPI
|
||||
# InterlockedCompareExchangePointer (
|
||||
# IN VOID **Value,
|
||||
# IN VOID *CompareValue,
|
||||
# IN VOID *ExchangeValue
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _InterlockedCompareExchangePointer
|
||||
_InterlockedCompareExchangePointer:
|
||||
#
|
||||
# InterlockedCompareExchangePointer() shares the same code as
|
||||
# InterlockedCompareExchange32() on IA32 and thus no code inside this
|
||||
# function
|
||||
#
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InterlockedCompareExchange32 (
|
||||
# InternalSyncCompareExchange32 (
|
||||
# IN UINT32 *Value,
|
||||
# IN UINT32 CompareValue,
|
||||
# IN UINT32 ExchangeValue
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _InterlockedCompareExchange32
|
||||
_InterlockedCompareExchange32:
|
||||
.global _InternalSyncCompareExchange32
|
||||
_InternalSyncCompareExchange32:
|
||||
movl 4(%esp),%ecx
|
||||
movl 8(%esp),%eax
|
||||
movl 12(%esp),%edx
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InterlockedCompareExchange64 function
|
||||
# InternalSyncCompareExchange64 function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,13 +28,14 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# UINT64
|
||||
# EFIAPI
|
||||
# InterlockedCompareExchange64 (
|
||||
# InternalSyncCompareExchange64 (
|
||||
# IN UINT64 *Value,
|
||||
# IN UINT64 CompareValue,
|
||||
# IN UINT64 ExchangeValue
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _InterlockedCompareExchange64
|
||||
.global _InternalSyncCompareExchange64
|
||||
_InternalSyncCompareExchange64:
|
||||
push %esi
|
||||
push %ebx
|
||||
movl 12(%esp),%esi
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InterlockedDecrement function
|
||||
# InternalSyncDecrement function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InterlockedDecrement (
|
||||
# InternalSyncDecrement (
|
||||
# IN UINT32 *Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _InterlockedDecrement
|
||||
_InterlockedDecrement:
|
||||
.global _InternalSyncDecrement
|
||||
_InternalSyncDecrement:
|
||||
movl 4(%esp),%eax
|
||||
lock
|
||||
decl (%eax)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# InterlockedIncrement function
|
||||
# InternalSyncIncrement function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# UINT32
|
||||
# EFIAPI
|
||||
# InterlockedIncrement (
|
||||
# InternalSyncIncrement (
|
||||
# IN UINT32 *Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _InterlockedIncrement
|
||||
_InterlockedIncrement:
|
||||
.global _InternalSyncIncrement
|
||||
_InternalSyncIncrement:
|
||||
movl 4(%esp),%eax
|
||||
lock
|
||||
incl (%eax)
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
|
||||
|
||||
.global _LRotU64
|
||||
.global _InternalMathLRotU64
|
||||
_InternalMathLRotU64:
|
||||
push %ebx
|
||||
movb 16(%esp),%cl
|
||||
movl 12(%esp),%edx
|
||||
|
|
|
@ -23,15 +23,8 @@
|
|||
|
||||
|
||||
|
||||
.global _MultS64x64
|
||||
_MultS64x64:
|
||||
#
|
||||
# MultS64x32 shares the same implementation with _MultU64x32, and thus no
|
||||
# code inside this function.
|
||||
#
|
||||
|
||||
|
||||
.global _MultU64x64
|
||||
.global _InternalMathMultU64x64
|
||||
_InternalMathMultU64x64:
|
||||
push %ebx
|
||||
movl 8(%esp),%ebx
|
||||
movl 16(%esp),%edx
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
|
||||
|
||||
.global _RRotU64
|
||||
.global _InternalMathRRotU64
|
||||
_InternalMathRRotU64:
|
||||
push %ebx
|
||||
movb 16(%esp),%cl
|
||||
movl 8(%esp),%eax
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadGdtr function
|
||||
# InternalX86ReadGdtr function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmReadGdtr (
|
||||
# InternalX86ReadGdtr (
|
||||
# OUT IA32_DESCRIPTOR *Gdtr
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmReadGdtr
|
||||
_AsmReadGdtr:
|
||||
.global _InternalX86ReadGdtr
|
||||
_InternalX86ReadGdtr:
|
||||
movl 4(%esp),%eax
|
||||
sgdt (%eax)
|
||||
ret
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmReadIdtr function
|
||||
# InternalX86ReadIdtr function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmReadIdtr (
|
||||
# InternalX86ReadIdtr (
|
||||
# OUT IA32_DESCRIPTOR *Idtr
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmReadIdtr
|
||||
_AsmReadIdtr:
|
||||
.global _InternalX86ReadIdtr
|
||||
_InternalX86ReadIdtr:
|
||||
movl 4(%esp),%eax
|
||||
sidt (%eax)
|
||||
ret
|
||||
|
|
|
@ -19,9 +19,26 @@
|
|||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.global _m16Start, _m16Size, _mThunk16Attr, _m16GdtBase, _m16Gdt, _m16GdtrBase, _mTransition
|
||||
##########
|
||||
# FIXME! #
|
||||
##########
|
||||
# The following data are INVALID!!
|
||||
# They just follow GAS syntax.
|
||||
_m16Start: .byte 0x00
|
||||
_m16Size: .word 0x00
|
||||
_mThunk16Attr: .word 0x00
|
||||
_m16Gdt: .word 0x00
|
||||
_m16GdtrBase: .word 0x00
|
||||
_mTransition: .word 0x00
|
||||
|
||||
|
||||
.global _InternalAsmThunk16
|
||||
_InternalAsmThunk16:
|
||||
|
||||
##########
|
||||
# FIXME! #
|
||||
##########
|
||||
# This function won't work for now.
|
||||
# it will directly enter dead loop.
|
||||
jmp .
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmWriteGdtr function
|
||||
# InternalX86WriteGdtr function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmWriteGdtr (
|
||||
# InternalX86WriteGdtr (
|
||||
# OUT IA32_DESCRIPTOR *Gdtr
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmWriteGdtr
|
||||
_AsmWriteGdtr:
|
||||
.global _InternalX86WriteGdtr
|
||||
_InternalX86WriteGdtr:
|
||||
movl 4(%esp),%eax
|
||||
lgdt (%eax)
|
||||
ret
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#
|
||||
# Abstract:
|
||||
#
|
||||
# AsmWriteIdtr function
|
||||
# InternalX86WriteIdtr function
|
||||
#
|
||||
# Notes:
|
||||
#
|
||||
|
@ -28,12 +28,12 @@
|
|||
#------------------------------------------------------------------------------
|
||||
# VOID
|
||||
# EFIAPI
|
||||
# AsmWriteIdtr (
|
||||
# InternalX86WriteIdtr (
|
||||
# OUT IA32_DESCRIPTOR *Idtr
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
.global _AsmWriteIdtr
|
||||
_AsmWriteIdtr:
|
||||
.global _InternalX86WriteIdtr
|
||||
_InternalX86WriteIdtr:
|
||||
movl 4(%esp),%eax
|
||||
lidt (%eax)
|
||||
ret
|
||||
|
|
|
@ -52,7 +52,7 @@ L0:
|
|||
mfence
|
||||
@SetDwords:
|
||||
testb $1, %dl
|
||||
jz @F
|
||||
jz L1
|
||||
movd %mm0, (%edi)
|
||||
L1:
|
||||
pop %edi
|
||||
|
|
Loading…
Reference in New Issue