diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-07 11:37:16 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-03-07 11:37:16 +0000 |
commit | 920d0fb5731b8a6a4888e16cbf5ecc792c0ae262 (patch) | |
tree | 74f74ccd7ea753279bc20a10577c6a90a6a4ba38 /gcc/defaults.h | |
parent | b77df3304ca427a035a4a8bf14f231f1dfd170a0 (diff) | |
download | gcc-920d0fb5731b8a6a4888e16cbf5ecc792c0ae262.tar.gz |
* defaults.h (MODE_HAS_NANS, MODE_HAS_INFINITIES): New.
(MODE_HAS_SIGNED_ZEROS, MODE_HAS_SIGN_DEPENDENT_ROUNDING): New.
* flags.h (HONOR_NANS, HONOR_INFINITIES, HONOR_SIGNED_ZEROS): New.
(HONOR_SIGN_DEPENDENT_ROUNDING): New.
* builtins.c (expand_builtin_mathfn): Use HONOR_NANS.
* c-common.c (truthvalue_conversion): Reduce x - y != 0 to x != y
unless x and y could be infinite.
(expand_unordered_cmp): New, mostly split from expand_tree_builtin.
Check that the common type of both arguments is a real, even for
targets without unordered comparisons. Allow an integer argument
to be compared against a real.
(expand_tree_builtin): Use expand_unordered_cmp.
* combine.c (combine_simplify_rtx): Use the new HONOR_... macros.
* cse.c (fold_rtx): Likewise. Fix indentation.
* fold-const.c (fold_real_zero_addition_p): New.
(fold): Use it, and the new HONOR_... macros.
* ifcvt.c (noce_try_minmax): Use the new HONOR_... macros.
* jump.c (reversed_comparison_code_parts): After searching for
the true comparison mode, use HONOR_NANS to decide whether it
can be safely reversed.
(reverse_condition_maybe_unordered): Remove IEEE check.
* simplify-rtx.c (simplify_binary_operation): Use the new macros
to decide which simplifications are valid. Allow the following
simplifications for IEEE: (-a + b) to (b - a), (a + -b) to (a - b),
and (a - -b) to (a + b).
(simplify_relational_operation): Use HONOR_NANS.
* doc/tm.texi: Document the MODE_HAS_... macros.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index fe467404a68..5142ee7b471 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -465,4 +465,24 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE! #define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS #endif +#ifndef MODE_HAS_NANS +#define MODE_HAS_NANS(MODE) \ + (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) +#endif + +#ifndef MODE_HAS_INFINITIES +#define MODE_HAS_INFINITIES(MODE) \ + (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) +#endif + +#ifndef MODE_HAS_SIGNED_ZEROS +#define MODE_HAS_SIGNED_ZEROS(MODE) \ + (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) +#endif + +#ifndef MODE_HAS_SIGN_DEPENDENT_ROUNDING +#define MODE_HAS_SIGN_DEPENDENT_ROUNDING(MODE) \ + (FLOAT_MODE_P (MODE) && TARGET_FLOAT_FORMAT == IEEE_FLOAT_FORMAT) +#endif + #endif /* ! GCC_DEFAULTS_H */ |