diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-02-08 13:10:45 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-02-08 13:42:38 +0000 |
commit | e05663051671bdec38056a2da5ddebd390b4abca (patch) | |
tree | 3371718c3add99e403f96db4e19fbed348ff26f2 /lib/aarch64 | |
parent | 30490b15fef50900acac0f23a528651c24759e7d (diff) |
Make setjmp.h prototypes comply with the C standard
Instead of having a custom implementation of setjmp() and longjmp() it
is better to follow the C standard.
The comments in setjmp.h are no longer needed as there are no deviations
from the expected one, so they have been removed.
All SDEI code that relied on them has been fixed to use the new function
prototypes and structs.
Change-Id: I6cd2e21cb5a5bcf81ba12283f2e4c067bd5172ca
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'lib/aarch64')
-rw-r--r-- | lib/aarch64/setjmp.S | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/aarch64/setjmp.S b/lib/aarch64/setjmp.S index 9060cb75..9d9eb49b 100644 --- a/lib/aarch64/setjmp.S +++ b/lib/aarch64/setjmp.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -12,10 +12,7 @@ .globl longjmp /* - * int setjmp(struct jmpbuf *buf); - * - * Sets a jump point in the buffer specified in x0. Returns 0 to the caller when - * when setting up the jump, and 1 when returning from the jump. + * int setjmp(jmp_buf env); */ func setjmp mov x7, sp @@ -34,9 +31,7 @@ endfunc setjmp /* - * void longjmp(struct jmpbuf *buf); - * - * Return to a jump point setup by setjmp() + * void longjmp(jmp_buf env, int val); */ func longjmp ldp x7, xzr, [x0, #JMP_CTX_SP] @@ -60,6 +55,7 @@ func longjmp mov sp, x7 - mov x0, #1 + ands x0, x1, x1 /* Move val to x0 and set flags */ + cinc x0, x0, eq /* If val is 0, return 1 */ ret endfunc longjmp |