mirror of https://github.com/acidanthera/audk.git
MdePkg/BaseLib: ensure ARM LongJump never returns 0
The ARM implementation of InternalLongJump always returned the value Value - but it is not supposed to ever return 0. Add the test to prevent that, and return 1 if Value is 0 - as is already present in AArch64. Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
2b2705343a
commit
1a66bd51ca
|
@ -57,6 +57,8 @@ ASM_PFX(SetJump):
|
|||
ASM_PFX(InternalLongJump):
|
||||
ldmia r0, {r3-r12,r14}
|
||||
mov r13, r3
|
||||
cmp r1, #0
|
||||
moveq r1, #1
|
||||
mov r0, r1
|
||||
bx lr
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ SetJump
|
|||
InternalLongJump
|
||||
LDM R0, {R3-R12,R14}
|
||||
MOV R13, R3
|
||||
CMP R1, #0
|
||||
MOVEQ R1, #1
|
||||
MOV R0, R1
|
||||
BX LR
|
||||
|
||||
|
|
Loading…
Reference in New Issue