summaryrefslogtreecommitdiffstats
path: root/sys/arm64/include
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2015-12-23 15:22:44 +0000
committerandrew <andrew@FreeBSD.org>2015-12-23 15:22:44 +0000
commit585881df3470e38fc04c5623573993ed0ce00900 (patch)
tree09aa5f2c07c5a99c97bbeba6f92b60561c88d3ef /sys/arm64/include
parent1129b00c092d9249729e17c77955ef9c622f50e9 (diff)
downloadFreeBSD-src-585881df3470e38fc04c5623573993ed0ce00900.zip
FreeBSD-src-585881df3470e38fc04c5623573993ed0ce00900.tar.gz
Increase the size and alignment of the setjmp buffer. This will allow for
possible future CPU extentions with larger registers. jmp_buf's size and alignment are baked into the ABI of third party libraries and thus are very hard to change later so it is best to waste a small amount of space now. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D3956
Diffstat (limited to 'sys/arm64/include')
-rw-r--r--sys/arm64/include/setjmp.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/arm64/include/setjmp.h b/sys/arm64/include/setjmp.h
index 98dc0e8..c42d237 100644
--- a/sys/arm64/include/setjmp.h
+++ b/sys/arm64/include/setjmp.h
@@ -43,13 +43,12 @@
* - 11 general purpose registers
* - 8 floating point registers
* - The signal mask (128 bits)
- * i.e. 24 64-bit words, this can be rounded up to 32 to give us some
- * space to expand into without affecting the ABI.
- * XXX: Is this enough space for expansion?
+ * i.e. 24 64-bit words, round this up to 31(+1) 128-bit words to allow for
+ * CPU extensions with larger registers and stronger alignment requirements.
*
* The registers to save are: r19 to r29, and d8 to d15.
*/
-#define _JBLEN 32
+#define _JBLEN 31
#define _JB_SIGMASK 21
/* This should only be needed in libc and may change */
@@ -65,10 +64,10 @@
* internally to avoid some run-time errors for mismatches.
*/
#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE
-typedef struct _sigjmp_buf { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+typedef struct _sigjmp_buf { __int128_t _sjb[_JBLEN + 1]; } sigjmp_buf[1];
#endif
-typedef struct _jmp_buf { long _jb[_JBLEN + 1]; } jmp_buf[1];
+typedef struct _jmp_buf { __int128_t _jb[_JBLEN + 1]; } jmp_buf[1];
#endif /* __ASSEMBLER__ */
#endif /* !_MACHINE_SETJMP_H_ */
OpenPOWER on IntegriCloud