diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 04:24:02 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 04:24:02 +0000 |
commit | 8d5646928c677c3a139c47dfd4b00098f64ef2cd (patch) | |
tree | fd1306387b9c3baa836922299f7959de1d960916 /gcc | |
parent | 60c4d030e28c4be3b518018ba818299730217168 (diff) | |
download | gcc-8d5646928c677c3a139c47dfd4b00098f64ef2cd.tar.gz |
* real.h (struct real_format): Split the signbit field into two
two fields, signbit_ro and signbit_rw.
* real.c (ieee_single_format, mips_single_format, ieee_double_format,
mips_double_format, ieee_extended_motorola_format,
ieee_extended_intel_96_format, ieee_extended_intel_96_round_53_format,
ieee_extended_intel_128_format, ibm_extended_format,
mips_extended_format, ieee_quad_format, mips_quad_format,
vax_f_format, vax_d_format, vax_g_format, i370_single_format,
i370_double_format, c4x_single_format, c4x_extended_format,
real_internal_format): Update initializers for new field.
* builtins.c (expand_builtin_signbit): Use signbit_ro field of the
real_format structure.
* optabs.c (expand_absneg_bit, expand_copysign): Use signbit_rw
field of the real_format structure.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/builtins.c | 2 | ||||
-rw-r--r-- | gcc/optabs.c | 4 | ||||
-rw-r--r-- | gcc/real.c | 20 | ||||
-rw-r--r-- | gcc/real.h | 9 |
5 files changed, 47 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 010a9ad003b..8a3f9c6c62f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2005-03-14 Roger Sayle <roger@eyesopen.com> + + * real.h (struct real_format): Split the signbit field into two + two fields, signbit_ro and signbit_rw. + * real.c (ieee_single_format, mips_single_format, ieee_double_format, + mips_double_format, ieee_extended_motorola_format, + ieee_extended_intel_96_format, ieee_extended_intel_96_round_53_format, + ieee_extended_intel_128_format, ibm_extended_format, + mips_extended_format, ieee_quad_format, mips_quad_format, + vax_f_format, vax_d_format, vax_g_format, i370_single_format, + i370_double_format, c4x_single_format, c4x_extended_format, + real_internal_format): Update initializers for new field. + * builtins.c (expand_builtin_signbit): Use signbit_ro field of the + real_format structure. + * optabs.c (expand_absneg_bit, expand_copysign): Use signbit_rw + field of the real_format structure. + 2005-03-14 Daniel Berlin <dberlin@dberlin.org> Fix PR tree-optimization/20458 diff --git a/gcc/builtins.c b/gcc/builtins.c index c239d6ca57f..c00fe1c6357 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -4969,7 +4969,7 @@ expand_builtin_signbit (tree exp, rtx target) /* For floating point formats without a sign bit, implement signbit as "ARG < 0.0". */ - bitpos = fmt->signbit; + bitpos = fmt->signbit_ro; if (bitpos < 0) { /* But we can't do this if the format supports signed zero. */ diff --git a/gcc/optabs.c b/gcc/optabs.c index f0c336e363e..d41a234de6b 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2182,7 +2182,7 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode, if (fmt == NULL) return NULL_RTX; - bitpos = fmt->signbit; + bitpos = fmt->signbit_rw; if (bitpos < 0) return NULL_RTX; @@ -2882,7 +2882,7 @@ expand_copysign (rtx op0, rtx op1, rtx target) if (fmt == NULL || !fmt->has_signed_zero) return NULL_RTX; - bitpos = fmt->signbit; + bitpos = fmt->signbit_rw; if (bitpos < 0) return NULL_RTX; diff --git a/gcc/real.c b/gcc/real.c index 5d1a79f57af..bed2fb09301 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -2651,6 +2651,7 @@ const struct real_format ieee_single_format = -125, 128, 31, + 31, true, true, true, @@ -2669,6 +2670,7 @@ const struct real_format mips_single_format = -125, 128, 31, + 31, true, true, true, @@ -2874,6 +2876,7 @@ const struct real_format ieee_double_format = -1021, 1024, 63, + 63, true, true, true, @@ -2892,6 +2895,7 @@ const struct real_format mips_double_format = -1021, 1024, 63, + 63, true, true, true, @@ -3221,6 +3225,7 @@ const struct real_format ieee_extended_motorola_format = -16382, 16384, 95, + 95, true, true, true, @@ -3239,6 +3244,7 @@ const struct real_format ieee_extended_intel_96_format = -16381, 16384, 79, + 79, true, true, true, @@ -3257,6 +3263,7 @@ const struct real_format ieee_extended_intel_128_format = -16381, 16384, 79, + 79, true, true, true, @@ -3277,6 +3284,7 @@ const struct real_format ieee_extended_intel_96_round_53_format = -16381, 16384, 79, + 79, true, true, true, @@ -3361,6 +3369,7 @@ const struct real_format ibm_extended_format = 53, -1021 + 53, 1024, + 127, -1, true, true, @@ -3379,6 +3388,7 @@ const struct real_format mips_extended_format = 53, -1021 + 53, 1024, + 127, -1, true, true, @@ -3646,6 +3656,7 @@ const struct real_format ieee_quad_format = -16381, 16384, 127, + 127, true, true, true, @@ -3664,6 +3675,7 @@ const struct real_format mips_quad_format = -16381, 16384, 127, + 127, true, true, true, @@ -3961,6 +3973,7 @@ const struct real_format vax_f_format = -127, 127, 15, + 15, false, false, false, @@ -3979,6 +3992,7 @@ const struct real_format vax_d_format = -127, 127, 15, + 15, false, false, false, @@ -3997,6 +4011,7 @@ const struct real_format vax_g_format = -1023, 1023, 15, + 15, false, false, false, @@ -4172,6 +4187,7 @@ const struct real_format i370_single_format = -64, 63, 31, + 31, false, false, false, /* ??? The encoding does allow for "unnormals". */ @@ -4190,6 +4206,7 @@ const struct real_format i370_double_format = -64, 63, 63, + 63, false, false, false, /* ??? The encoding does allow for "unnormals". */ @@ -4398,6 +4415,7 @@ const struct real_format c4x_single_format = -126, 128, -1, + -1, false, false, false, @@ -4416,6 +4434,7 @@ const struct real_format c4x_extended_format = -126, 128, -1, + -1, false, false, false, @@ -4459,6 +4478,7 @@ const struct real_format real_internal_format = -MAX_EXP, MAX_EXP, -1, + -1, true, true, false, diff --git a/gcc/real.h b/gcc/real.h index 5c4e9c605d8..9e52c6d5b8c 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -138,8 +138,13 @@ struct real_format /* The maximum integer, x, such that b**(x-1) is representable. */ int emax; - /* The bit position of the sign bit, or -1 for a complex encoding. */ - int signbit; + /* The bit position of the sign bit, for determining whether a value + is positive/negative, or -1 for a complex encoding. */ + int signbit_ro; + + /* The bit position of the sign bit, for changing the sign of a number, + or -1 for a complex encoding. */ + int signbit_rw; /* Properties of the format. */ bool has_nans; |