MdePkg: BaseSynchronizationLib: fix Increment/Decrement retvals for ARM

The procedure call standard dictates that we move the result to r0 before
returning.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tyler Smith <tylers@hp.com>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Leif Lindholm <leif.lindholm@arm.com>
Reviewed-by: Ronald Cron <Ronald.Cron@arm.com>
[lersek@redhat.com: cleaned up commit message]

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17068 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Tyler Smith 2015-03-20 12:17:02 +00:00 committed by lersek
parent ac2aaf315d
commit f61762d0c8
2 changed files with 4 additions and 0 deletions

View File

@ -179,6 +179,7 @@ TryInternalSyncIncrement:
cmp r2, #0 cmp r2, #0
bne TryInternalSyncIncrement bne TryInternalSyncIncrement
dmb dmb
mov r0, r1
bx lr bx lr
/** /**
@ -208,4 +209,5 @@ TryInternalSyncDecrement:
cmp r2, #0 cmp r2, #0
bne TryInternalSyncDecrement bne TryInternalSyncDecrement
dmb dmb
mov r0, r1
bx lr bx lr

View File

@ -178,6 +178,7 @@ TryInternalSyncIncrement
cmp r2, #0 cmp r2, #0
bne TryInternalSyncIncrement bne TryInternalSyncIncrement
dmb dmb
mov r0, r1
bx lr bx lr
/** /**
@ -207,6 +208,7 @@ TryInternalSyncDecrement
cmp r2, #0 cmp r2, #0
bne TryInternalSyncDecrement bne TryInternalSyncDecrement
dmb dmb
mov r0, r1
bx lr bx lr
END END