summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/machine/setjmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/machine/setjmp.h')
-rw-r--r--newlib/libc/include/machine/setjmp.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h
index a9e0d7141..f7e5865ab 100644
--- a/newlib/libc/include/machine/setjmp.h
+++ b/newlib/libc/include/machine/setjmp.h
@@ -61,11 +61,18 @@ _BEGIN_STD_C
#endif
#ifdef __nds32__
-/* Only 17 words are currently needed.
- Preserve one word slot if we need to expand.
- Check newlib/libc/machine/nds32/setjmp.S for more information. */
+/* 17 words for GPRs,
+ 1 word for $fpcfg.freg and 30 words for FPUs
+ Reserved 2 words for aligement-adjustment. When storeing double-precision
+ floating-point register into memory, the address has to be
+ double-word-aligned.
+ Check libc/machine/nds32/setjmp.S for more information. */
+#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
+#define _JBLEN 50
+#else
#define _JBLEN 18
#endif
+#endif
#if defined(__Z8001__) || defined(__Z8002__)
/* 16 regs + pc */