libgcc/
* config/nds32/sfp-machine.h: Fix settings for NDS32_ABI_2FP_PLUS.
* config/nds32/t-nds32-newlib (HOST_LIBGCC2_CFLAGS): Use -fwrapv.
From-SVN: r259645
+2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * config/nds32/sfp-machine.h: Fix settings for NDS32_ABI_2FP_PLUS.
+ * config/nds32/t-nds32-newlib (HOST_LIBGCC2_CFLAGS): Use -fwrapv.
+
2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/linux-unwind.h: Add (__CET__ & 2) != 0 check
R##_c = FP_CLS_NAN; \
} while (0)
+#ifdef NDS32_ABI_2FP_PLUS
+#define FP_RND_NEAREST 0x0
+#define FP_RND_PINF 0x1
+#define FP_RND_MINF 0x2
+#define FP_RND_ZERO 0x3
+#define FP_RND_MASK 0x3
+
+#define _FP_DECL_EX \
+ unsigned long int _fcsr __attribute__ ((unused)) = FP_RND_NEAREST
+
+#define FP_INIT_ROUNDMODE \
+ do { \
+ _fcsr = __builtin_nds32_fmfcsr (); \
+ } while (0)
+
+#define FP_ROUNDMODE (_fcsr & FP_RND_MASK)
+
+#endif
+
/* Not checked. */
#define _FP_TININESS_AFTER_ROUNDING 0
# <http://www.gnu.org/licenses/>.
# Compiler flags to use when compiling 'libgcc2.c'
-HOST_LIBGCC2_CFLAGS = -O2
+HOST_LIBGCC2_CFLAGS = -O2 -fwrapv
#LIB1ASMSRC = nds32/lib1asmsrc-newlib.S