audk/ArmPlatformPkg/Library/ArmPlatformStackLib
Ard Biesheuvel 91231b55d5 ArmPlatformPkg/ArmPlatformStackLib: use callee preserved registers
The entry code in ArmPlatformStackSet () is a 1:1 transliteration of the
ARM version, which uses the callee preserved registers r3 - r7 (*) to
preserve the function arguments and the link register across a call to
ArmPlatformIsPrimaryCore ().

However, x3 - x7 are not callee preserved on AARCH64, and so we should use
registers >= x19 instead. While we're at it, drop an unnecessary preserve
of the link register, and simplify/deobfuscate the calculation of the
secondary stack position.

(*) Note that r3 is not actually a callee saved register even on ARM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2017-02-22 13:22:41 +00:00
..
AArch64 ArmPlatformPkg/ArmPlatformStackLib: use callee preserved registers 2017-02-22 13:22:41 +00:00
Arm ArmPlatformPkg/ArmPlatformStackLib: switch to ASM_FUNC() asm macro 2016-08-11 13:25:06 +02:00
ArmPlatformStackLib.inf ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00