or1k: Correct longjmp return value
Invert equality check instruction to correct the return value handling in longjmp. The return value should be the value of the second argument to longjmp, unless the argument value was 0 in which case it should be 1. Previously, longjmp would set return value 1 if the second argument was non-zero, and 0 if it was 0, which was incorrect.
This commit is contained in:
parent
09e2ec87ef
commit
8b080534ca
|
@ -70,7 +70,7 @@ longjmp:
|
||||||
/* If the second argument to longjmp is zero, set return address to 1,
|
/* If the second argument to longjmp is zero, set return address to 1,
|
||||||
otherwise set it to the value of the second argument */
|
otherwise set it to the value of the second argument */
|
||||||
l.addi r11, r0, 1
|
l.addi r11, r0, 1
|
||||||
l.sfne r4, r0
|
l.sfeq r4, r0
|
||||||
l.bf 1f
|
l.bf 1f
|
||||||
l.nop
|
l.nop
|
||||||
l.addi r11, r4, 0
|
l.addi r11, r4, 0
|
||||||
|
|
Loading…
Reference in New Issue