ArmPlatformPkg RVCT: drop dependency on GCC macro library

The RVCT .asm files include AsmMacroIoLib.h only for the definition of
LoadConstantToReg (), which makes it tedious to make change to that file
without the risk of making the RVCT assembler unhappy. So simply replace
LoadConstantToReg() with mov32, which does the right thing in all cases.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Ard Biesheuvel
2016-08-10 15:50:25 +02:00
parent 874883a49d
commit 66edb631f8
9 changed files with 29 additions and 66 deletions

View File

@@ -11,7 +11,6 @@
//
//
#include <AsmMacroIoLib.h>
#include <Library/ArmLib.h>
INCLUDE AsmMacroIoLib.inc
@@ -47,8 +46,7 @@ ArmPlatformGetCorePosition FUNCTION
// VOID
// );
ArmPlatformGetPrimaryCoreMpId FUNCTION
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r0)
ldr r0, [r0]
mov32 r0, FixedPcdGet32(PcdArmPrimaryCore)
bx lr
ENDFUNC
@@ -57,11 +55,9 @@ ArmPlatformGetPrimaryCoreMpId FUNCTION
// IN UINTN MpId
// );
ArmPlatformIsPrimaryCore FUNCTION
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCoreMask, r1)
ldr r1, [r1]
mov32 r1, FixedPcdGet32(PcdArmPrimaryCoreMask)
and r0, r0, r1
LoadConstantToReg (_gPcd_FixedAtBuild_PcdArmPrimaryCore, r1)
ldr r1, [r1]
mov32 r1, FixedPcdGet32(PcdArmPrimaryCore)
cmp r0, r1
moveq r0, #1
movne r0, #0