i386-c.c (ix86_target_macros): Define _SOFT_FLOAT for !TARGET_80387.

gcc/

	* config/i386/i386-c.c (ix86_target_macros): Define _SOFT_FLOAT
	for !TARGET_80387.
	* config/i386/rtemself.h (TARGET_OS_CPP_BUILTINS): Do not define
	_SOFT_FLOAT here.
	(LONG_DOUBLE_TYPE_SIZE): New define.
	(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Ditto.

libgcc/

	* config/i386/32/sfp-machine.h (_FP_MUL_MEAT_S): Define.
	(_FP_MUL_MEAT_D): Ditto.
	(_FP_DIV_MEAT_S): Ditto.
	(_FP_DIV_MEAT_D): Ditto.
	* config.host (i[34567]86-*-rtems*): Remove i386/t-softfp, add
	t-softfp-sfdf and t-softfp to tmake_file.

M    gcc/config/i386/i386-c.c
M    gcc/config/i386/rtemself.h
M    gcc/ChangeLog
M    libgcc/ChangeLog
M    libgcc/config.host
M    libgcc/config/i386/32/sfp-machine.h

From-SVN: r204404
This commit is contained in:
Uros Bizjak 2013-11-05 17:08:30 +01:00
parent b1705a6388
commit 02ac9503fd
6 changed files with 45 additions and 14 deletions

View File

@ -1,3 +1,12 @@
2013-11-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386-c.c (ix86_target_macros): Define _SOFT_FLOAT
for !TARGET_80387.
* config/i386/rtemself.h (TARGET_OS_CPP_BUILTINS): Do not define
_SOFT_FLOAT here.
(LONG_DOUBLE_TYPE_SIZE): New define.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Ditto.
2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58724
@ -123,7 +132,8 @@
(asan_add_global): Ditto.
* asan.h (asan_function_start): New prototype.
* final.c (final_start_function): Call asan_function_start.
* sanitizer.def (BUILT_IN_ASAN_INIT): Rename __asan_init_v1 to __asan_init_v3.
* sanitizer.def (BUILT_IN_ASAN_INIT): Rename __asan_init_v1
to __asan_init_v3.
2013-11-04 Wei Mi <wmi@google.com>
@ -162,10 +172,8 @@
* builtins.def (ATTR_NOTHROWCALL_LEAF_LIST): Define.
* sync-builtins.def: Use ATTR_NOTHROWCALL_LEAF_LIST for all sync
builtins that take pointers.
* lto-opts.c (lto_write_options): Write -fnon-call-exceptions
if set.
* lto-wrapper.c (merge_and_complain): Collect
OPT_fnon_call_exceptions.
* lto-opts.c (lto_write_options): Write -fnon-call-exceptions if set.
* lto-wrapper.c (merge_and_complain): Collect OPT_fnon_call_exceptions.
(run_gcc): Pass -fnon-call-exceptions.
2013-11-04 Jakub Jelinek <jakub@redhat.com>
@ -186,13 +194,11 @@
2013-11-04 Joseph Myers <joseph@codesourcery.com>
* doc/cpp.texi (__GCC_IEC_559, __GCC_IEC_559_COMPLEX): Document
macros.
* doc/cpp.texi (__GCC_IEC_559, __GCC_IEC_559_COMPLEX): Document macros.
* target.def (float_exceptions_rounding_supported_p): New hook.
* targhooks.c (default_float_exceptions_rounding_supported_p): New
function.
* targhooks.h (default_float_exceptions_rounding_supported_p):
Declare.
* targhooks.h (default_float_exceptions_rounding_supported_p): Declare.
* doc/tm.texi.in (TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P):
New @hook.
* doc/tm.texi: Regenerate.
@ -245,8 +251,7 @@
Implement -fsanitize=vla-bound.
* opts.c (common_handle_option): Handle vla-bound.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE):
Define.
* sanitizer.def (BUILT_IN_UBSAN_HANDLE_VLA_BOUND_NOT_POSITIVE): Define.
* flag-types.h (enum sanitize_code): Add SANITIZE_VLA.
* asan.c (initialize_sanitizer_builtins): Build BT_FN_VOID_PTR_PTR.

View File

@ -474,6 +474,9 @@ ix86_target_macros (void)
builtin_define_std ("i386");
}
if (!TARGET_80387)
cpp_define (parse_in, "_SOFT_FLOAT");
if (TARGET_LONG_DOUBLE_64)
cpp_define (parse_in, "__LONG_DOUBLE_64__");

View File

@ -26,7 +26,15 @@ along with GCC; see the file COPYING3. If not see
builtin_define ("__rtems__"); \
builtin_define ("__USE_INIT_FINI__"); \
builtin_assert ("system=rtems"); \
if (!TARGET_80387) \
builtin_define ("_SOFT_FLOAT"); \
} \
while (0)
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 80 : 64)
#undef LIBGCC2_LONG_DOUBLE_TYPE_SIZE
#ifdef _SOFT_FLOAT
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64
#else
#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80
#endif

View File

@ -1,3 +1,12 @@
2013-11-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/32/sfp-machine.h (_FP_MUL_MEAT_S): Define.
(_FP_MUL_MEAT_D): Ditto.
(_FP_DIV_MEAT_S): Ditto.
(_FP_DIV_MEAT_D): Ditto.
* config.host (i[34567]86-*-rtems*): Remove i386/t-softfp, add
t-softfp-sfdf and t-softfp to tmake_file.
2013-11-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/crtfastmath.c: Compile only for !_SOFT_FLOAT.

View File

@ -564,7 +564,7 @@ i[34567]86-*-nto-qnx*)
extra_parts=crtbegin.o
;;
i[34567]86-*-rtems*)
tmake_file="$tmake_file i386/t-softfp i386/t-crtstuff"
tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdf t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)

View File

@ -65,9 +65,15 @@
"g" ((USItype) (y0)))
#define _FP_MUL_MEAT_S(R,X,Y) \
_FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_D(R,X,Y) \
_FP_MUL_MEAT_2_wide(_FP_WFRACBITS_D,R,X,Y,umul_ppmm)
#define _FP_MUL_MEAT_Q(R,X,Y) \
_FP_MUL_MEAT_4_wide(_FP_WFRACBITS_Q,R,X,Y,umul_ppmm)
#define _FP_DIV_MEAT_S(R,X,Y) _FP_DIV_MEAT_1_loop(S,R,X,Y)
#define _FP_DIV_MEAT_D(R,X,Y) _FP_DIV_MEAT_2_udiv(D,R,X,Y)
#define _FP_DIV_MEAT_Q(R,X,Y) _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
#define _FP_NANFRAC_S _FP_QNANBIT_S