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:
@@ -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
|
||||
|
@@ -11,8 +11,6 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include <AsmMacroIoLib.h>
|
||||
#include <Base.h>
|
||||
#include <AutoGen.h>
|
||||
|
||||
INCLUDE AsmMacroIoLib.inc
|
||||
@@ -79,8 +77,7 @@ ArmPlatformStackSetPrimary FUNCTION
|
||||
add r0, r0, r2
|
||||
|
||||
// Compute SecondaryCoresCount * SecondaryCoreStackSize
|
||||
LoadConstantToReg (_gPcd_FixedAtBuild_PcdCoreCount, r1)
|
||||
ldr r1, [r1]
|
||||
mov32 r1, FixedPcdGet32 (PcdCoreCount)
|
||||
sub r1, #1
|
||||
mul r3, r3, r1
|
||||
|
||||
|
Reference in New Issue
Block a user