ArmPkg: update RVCT assembly functions to use new RVCT_ASM_EXPORT macro
This has the effect of splitting assembly functions into their own sections so the linker can remove unused ones to save space. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@gmail.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19109 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
abiesheuvel
parent
e04671e81a
commit
efda177513
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_lasr
|
||||
|
||||
AREA Math, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;UINT32
|
||||
@@ -25,7 +24,7 @@
|
||||
; IN UINT32 Divisor
|
||||
; );
|
||||
;
|
||||
__aeabi_lasr
|
||||
RVCT_ASM_EXPORT __aeabi_lasr
|
||||
SUBS r3,r2,#0x20
|
||||
BPL {pc} + 0x18 ; 0x1c
|
||||
RSB r3,r2,#0x20
|
||||
|
@@ -13,10 +13,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_ldivmod
|
||||
EXTERN __aeabi_uldivmod
|
||||
|
||||
AREA Math, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;UINT32
|
||||
@@ -27,7 +26,7 @@
|
||||
; );
|
||||
;
|
||||
|
||||
__aeabi_ldivmod
|
||||
RVCT_ASM_EXPORT __aeabi_ldivmod
|
||||
PUSH {r4,lr}
|
||||
ASRS r4,r1,#1
|
||||
EOR r4,r4,r3,LSR #1
|
||||
|
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_llsl
|
||||
|
||||
AREA Math, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;VOID
|
||||
@@ -27,7 +26,7 @@
|
||||
; );
|
||||
;
|
||||
|
||||
__aeabi_llsl
|
||||
RVCT_ASM_EXPORT __aeabi_llsl
|
||||
SUBS r3,r2,#0x20
|
||||
BPL {pc} + 0x18 ; 0x1c
|
||||
RSB r3,r2,#0x20
|
||||
|
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_llsr
|
||||
|
||||
AREA Math, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;VOID
|
||||
@@ -26,7 +25,7 @@
|
||||
; IN UINT32 Size
|
||||
; );
|
||||
;
|
||||
__aeabi_llsr
|
||||
RVCT_ASM_EXPORT __aeabi_llsr
|
||||
SUBS r3,r2,#0x20
|
||||
BPL {pc} + 0x18 ; 0x1c
|
||||
RSB r3,r2,#0x20
|
||||
|
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_memcpy
|
||||
|
||||
AREA Memcpy, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;VOID
|
||||
@@ -26,7 +25,7 @@
|
||||
; IN UINT32 Size
|
||||
; );
|
||||
;
|
||||
__aeabi_memcpy
|
||||
RVCT_ASM_EXPORT __aeabi_memcpy
|
||||
cmp r2, #0
|
||||
bxeq lr
|
||||
push {lr}
|
||||
|
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_memcpy4
|
||||
|
||||
AREA Memcpy4, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;VOID
|
||||
@@ -26,7 +25,7 @@
|
||||
; IN UINT32 Size
|
||||
; );
|
||||
;
|
||||
__aeabi_memcpy4
|
||||
RVCT_ASM_EXPORT __aeabi_memcpy4
|
||||
stmdb sp!, {r4, lr}
|
||||
subs r2, r2, #32 ; 0x20
|
||||
bcc memcpy4_label2
|
||||
|
@@ -13,9 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_memmove
|
||||
|
||||
AREA Memmove, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;VOID
|
||||
@@ -26,7 +25,7 @@
|
||||
; IN UINT32 Size
|
||||
; );
|
||||
;
|
||||
__aeabi_memmove
|
||||
RVCT_ASM_EXPORT __aeabi_memmove
|
||||
CMP r2, #0
|
||||
BXEQ lr
|
||||
CMP r0, r1
|
||||
|
@@ -14,11 +14,10 @@
|
||||
|
||||
|
||||
|
||||
EXPORT __ARM_switch8
|
||||
|
||||
AREA ArmSwitch, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
__ARM_switch8
|
||||
RVCT_ASM_EXPORT __ARM_switch8
|
||||
LDRB r12,[lr,#-1]
|
||||
CMP r3,r12
|
||||
LDRBCC r3,[lr,r3]
|
||||
|
@@ -14,9 +14,8 @@
|
||||
|
||||
|
||||
|
||||
EXPORT __aeabi_uldivmod
|
||||
|
||||
AREA Uldivmod, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;UINT64
|
||||
@@ -26,7 +25,7 @@
|
||||
; IN UINT64 Divisor
|
||||
; )
|
||||
;
|
||||
__aeabi_uldivmod
|
||||
RVCT_ASM_EXPORT __aeabi_uldivmod
|
||||
stmdb sp!, {r4, r5, r6, lr}
|
||||
mov r4, r1
|
||||
mov r5, r0
|
||||
|
@@ -14,10 +14,8 @@
|
||||
|
||||
|
||||
|
||||
EXPORT __aeabi_uread4
|
||||
EXPORT __aeabi_uread8
|
||||
|
||||
AREA Uread4, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;UINT32
|
||||
@@ -26,7 +24,7 @@
|
||||
; IN VOID *Pointer
|
||||
; );
|
||||
;
|
||||
__aeabi_uread4
|
||||
RVCT_ASM_EXPORT __aeabi_uread4
|
||||
ldrb r1, [r0]
|
||||
ldrb r2, [r0, #1]
|
||||
ldrb r3, [r0, #2]
|
||||
@@ -43,7 +41,7 @@ __aeabi_uread4
|
||||
; IN VOID *Pointer
|
||||
; );
|
||||
;
|
||||
__aeabi_uread8
|
||||
RVCT_ASM_EXPORT __aeabi_uread8
|
||||
mov r3, r0
|
||||
|
||||
ldrb r1, [r3]
|
||||
|
@@ -13,10 +13,8 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
EXPORT __aeabi_uwrite4
|
||||
EXPORT __aeabi_uwrite8
|
||||
|
||||
AREA Uwrite4, CODE, READONLY
|
||||
INCLUDE AsmMacroExport.inc
|
||||
|
||||
;
|
||||
;UINT32
|
||||
@@ -27,7 +25,7 @@
|
||||
; );
|
||||
;
|
||||
;
|
||||
__aeabi_uwrite4
|
||||
RVCT_ASM_EXPORT __aeabi_uwrite4
|
||||
mov r2, r0, lsr #8
|
||||
strb r0, [r1]
|
||||
strb r2, [r1, #1]
|
||||
@@ -46,7 +44,7 @@ __aeabi_uwrite4
|
||||
; );
|
||||
;
|
||||
;
|
||||
__aeabi_uwrite8
|
||||
RVCT_ASM_EXPORT __aeabi_uwrite8
|
||||
mov r3, r0, lsr #8
|
||||
strb r0, [r2]
|
||||
strb r3, [r2, #1]
|
||||
|
@@ -102,6 +102,7 @@
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
ArmPkg/ArmPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
|
||||
|
Reference in New Issue
Block a user