[PATCH] libc: arm: setjmp jmp_buf exagerated size
Bernhard Krug
b.krug@elektronenpumpe.de
Wed Feb 15 16:05:17 GMT 2023
set correct jmp_buf size for ARMv6-M conforming to implementation in setjmp.S
---
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index 29b76ce..cdd0a6a 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -9,7 +9,9 @@ _BEGIN_STD_C
#define _JBTYPE unsigned long
#endif
-#if defined(__arm__) || defined(__thumb__)
+#ifdef __ARM_ARCH_6M__
+#define _JBLEN 10 /* r4 - r10, fp, sp, lr */
+#elif defined(__arm__) || defined(__thumb__)
/* * All callee preserved registers:
* core registers:
More information about the Newlib
mailing list