summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/machine
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-12-15 13:32:17 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-12-15 13:32:17 +0000
commitf5ce72dffc738d43213e566d8ae082d7428f8be9 (patch)
tree62536bdf369ea8fbb6cbb59bef5348e414e8fab2 /newlib/libc/include/machine
parentd4ef8a6368e8e5b22808e3df64306418f1971ba9 (diff)
downloadcygnal-f5ce72dffc738d43213e566d8ae082d7428f8be9.tar.gz
cygnal-f5ce72dffc738d43213e566d8ae082d7428f8be9.tar.bz2
cygnal-f5ce72dffc738d43213e566d8ae082d7428f8be9.zip
* newlib/libc/include/machine/setjmp.h: Add FPU support.
* newlib/libc/machine/nds32/setjmp.S: Add FPU support.
Diffstat (limited to 'newlib/libc/include/machine')
-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 */