[NDS32] Fix incorrect settings in sfp-machine.h and t-nds32-newlib for hard fp.

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
This commit is contained in:
Chung-Ju Wu 2018-04-25 12:08:14 +00:00 committed by Chung-Ju Wu
parent bfeb66850f
commit ba169b7424
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -76,6 +76,25 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
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

View File

@ -19,7 +19,7 @@
# <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