[Patch 6/17] Migrate excess precision logic to use TARGET_EXCESS_PRECISION
authorJames Greenhalgh <james.greenhalgh@arm.com>
Wed, 23 Nov 2016 17:23:12 +0000 (17:23 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Wed, 23 Nov 2016 17:23:12 +0000 (17:23 +0000)
commit56d8ffc170912cb1dee5900799acaf5d4857fde9
treeb2e05c11d31890a7a8ef669c3474d40a7843da1c
parent04f0fcf7bdfa1b4d153ca37df8843c44ed8c4d93
[Patch 6/17] Migrate excess precision logic to use TARGET_EXCESS_PRECISION

gcc/

* toplev.c (init_excess_precision): Delete most logic.
* tree.c (excess_precision_type): Rewrite to use
TARGET_EXCESS_PRECISION.
* doc/invoke.texi (-fexcess-precision): Document behaviour in a
more generic fashion.
* ginclude/float.h: Wrap definition of FLT_EVAL_METHOD in
__STDC_WANT_IEC_60559_TYPES_EXT__.

gcc/c-family/

* c-common.c (excess_precision_mode_join): New.
(c_ts18661_flt_eval_method): New.
(c_c11_flt_eval_method): Likewise.
(c_flt_eval_method): Likewise.
* c-common.h (excess_precision_mode_join): New.
(c_flt_eval_method): Likewise.
* c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
(cpp_iec_559_value): Call it.
(c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
__FLT_EVAL_METHOD_TS_18661_3__.

gcc/testsuite/

* gcc.dg/fpermitted-flt-eval-methods_3.c: New.
* gcc.dg/fpermitted-flt-eval-methods_4.c: Likewise.

From-SVN: r242776
12 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c-family/c-cppbuiltin.c
gcc/doc/invoke.texi
gcc/ginclude/float.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fpermitted-flt-eval-methods_4.c [new file with mode: 0644]
gcc/toplev.c
gcc/tree.c