diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S index 0a6e039af9..69de4c1fd4 100644 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S +++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/CopyMem.S @@ -17,6 +17,8 @@ # #------------------------------------------------------------------------------ +#include + /** Copy Length bytes from Source to Destination. Overlap is OK. @@ -37,11 +39,7 @@ InternalMemCopyMem ( IN UINTN Length ) **/ -.text -.align 2 -GCC_ASM_EXPORT(InternalMemCopyMem) - -ASM_PFX(InternalMemCopyMem): +ASM_FUNC(InternalMemCopyMem) stmfd sp!, {r4, r9, lr} tst r0, #3 mov r4, r0 diff --git a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S index 6a6bb20ec1..28ba38b79c 100644 --- a/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S +++ b/ArmPkg/Library/BaseMemoryLibVstm/Arm/SetMem.S @@ -17,6 +17,8 @@ # #------------------------------------------------------------------------------ +#include + /** Set Buffer to Value for Size bytes. @@ -34,12 +36,7 @@ InternalMemSetMem ( IN UINT8 Value ) **/ - -.text -.align 2 -GCC_ASM_EXPORT(InternalMemSetMem) - -ASM_PFX(InternalMemSetMem): +ASM_FUNC(InternalMemSetMem) stmfd sp!, {r4-r7, lr} tst r0, #3 movne r3, #0