Merge "setjmp.h: add some historical detail about the _JBLEN values." am: 989c15197a am: 608bc534e2

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2533806

Change-Id: Ia141bc0aedd0db707913058496684a6ec450abec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Elliott Hughes 2023-04-13 15:26:14 +00:00 committed by Automerger Merge Worker
commit 45b62285ae

View file

@ -47,14 +47,33 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
#if defined(__aarch64__) #if defined(__aarch64__)
/**
* The size in words of an arm64 jmp_buf. Room for callee-saved registers,
* including floating point, stack pointer and program counter, various
* internal implementation details, and leaving some free space.
*
* Coincidentally matches OpenBSD, though they also save/restore the
* floating point status register too.
*/
#define _JBLEN 32 #define _JBLEN 32
#elif defined(__arm__) #elif defined(__arm__)
/** The size in words of an arm32 jmp_buf. Inherited from OpenBSD. */
#define _JBLEN 64 #define _JBLEN 64
#elif defined(__i386__) #elif defined(__i386__)
/** The size in words of an x86 jmp_buf. Inherited from OpenBSD. */
#define _JBLEN 10 #define _JBLEN 10
#elif defined(__riscv) #elif defined(__riscv)
/**
* The size in words of a riscv64 jmp_buf. Room for callee-saved registers,
* including floating point, stack pointer and program counter, various
* internal implementation details, and leaving some free space.
*
* Coincidentally matches OpenBSD, though they also save/restore the
* floating point status register too.
*/
#define _JBLEN 32 #define _JBLEN 32
#elif defined(__x86_64__) #elif defined(__x86_64__)
/** The size in words of an x86-64 jmp_buf. Inherited from OpenBSD. */
#define _JBLEN 11 #define _JBLEN 11
#endif #endif