Commit b87a0206 by Roger Sayle Committed by Roger Sayle

real.h (struct real_format): Split the signbit field into two two fields,…

real.h (struct real_format): Split the signbit field into two two fields, signbit_ro and signbit_rw.


	* 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.

From-SVN: r96471
parent 223c8158
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> 2005-03-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/20458 Fix PR tree-optimization/20458
......
...@@ -4969,7 +4969,7 @@ expand_builtin_signbit (tree exp, rtx target) ...@@ -4969,7 +4969,7 @@ expand_builtin_signbit (tree exp, rtx target)
/* For floating point formats without a sign bit, implement signbit /* For floating point formats without a sign bit, implement signbit
as "ARG < 0.0". */ as "ARG < 0.0". */
bitpos = fmt->signbit; bitpos = fmt->signbit_ro;
if (bitpos < 0) if (bitpos < 0)
{ {
/* But we can't do this if the format supports signed zero. */ /* But we can't do this if the format supports signed zero. */
......
...@@ -2182,7 +2182,7 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode, ...@@ -2182,7 +2182,7 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode,
if (fmt == NULL) if (fmt == NULL)
return NULL_RTX; return NULL_RTX;
bitpos = fmt->signbit; bitpos = fmt->signbit_rw;
if (bitpos < 0) if (bitpos < 0)
return NULL_RTX; return NULL_RTX;
...@@ -2882,7 +2882,7 @@ expand_copysign (rtx op0, rtx op1, rtx target) ...@@ -2882,7 +2882,7 @@ expand_copysign (rtx op0, rtx op1, rtx target)
if (fmt == NULL || !fmt->has_signed_zero) if (fmt == NULL || !fmt->has_signed_zero)
return NULL_RTX; return NULL_RTX;
bitpos = fmt->signbit; bitpos = fmt->signbit_rw;
if (bitpos < 0) if (bitpos < 0)
return NULL_RTX; return NULL_RTX;
......
...@@ -2651,6 +2651,7 @@ const struct real_format ieee_single_format = ...@@ -2651,6 +2651,7 @@ const struct real_format ieee_single_format =
-125, -125,
128, 128,
31, 31,
31,
true, true,
true, true,
true, true,
...@@ -2669,6 +2670,7 @@ const struct real_format mips_single_format = ...@@ -2669,6 +2670,7 @@ const struct real_format mips_single_format =
-125, -125,
128, 128,
31, 31,
31,
true, true,
true, true,
true, true,
...@@ -2874,6 +2876,7 @@ const struct real_format ieee_double_format = ...@@ -2874,6 +2876,7 @@ const struct real_format ieee_double_format =
-1021, -1021,
1024, 1024,
63, 63,
63,
true, true,
true, true,
true, true,
...@@ -2892,6 +2895,7 @@ const struct real_format mips_double_format = ...@@ -2892,6 +2895,7 @@ const struct real_format mips_double_format =
-1021, -1021,
1024, 1024,
63, 63,
63,
true, true,
true, true,
true, true,
...@@ -3221,6 +3225,7 @@ const struct real_format ieee_extended_motorola_format = ...@@ -3221,6 +3225,7 @@ const struct real_format ieee_extended_motorola_format =
-16382, -16382,
16384, 16384,
95, 95,
95,
true, true,
true, true,
true, true,
...@@ -3239,6 +3244,7 @@ const struct real_format ieee_extended_intel_96_format = ...@@ -3239,6 +3244,7 @@ const struct real_format ieee_extended_intel_96_format =
-16381, -16381,
16384, 16384,
79, 79,
79,
true, true,
true, true,
true, true,
...@@ -3257,6 +3263,7 @@ const struct real_format ieee_extended_intel_128_format = ...@@ -3257,6 +3263,7 @@ const struct real_format ieee_extended_intel_128_format =
-16381, -16381,
16384, 16384,
79, 79,
79,
true, true,
true, true,
true, true,
...@@ -3277,6 +3284,7 @@ const struct real_format ieee_extended_intel_96_round_53_format = ...@@ -3277,6 +3284,7 @@ const struct real_format ieee_extended_intel_96_round_53_format =
-16381, -16381,
16384, 16384,
79, 79,
79,
true, true,
true, true,
true, true,
...@@ -3361,6 +3369,7 @@ const struct real_format ibm_extended_format = ...@@ -3361,6 +3369,7 @@ const struct real_format ibm_extended_format =
53, 53,
-1021 + 53, -1021 + 53,
1024, 1024,
127,
-1, -1,
true, true,
true, true,
...@@ -3379,6 +3388,7 @@ const struct real_format mips_extended_format = ...@@ -3379,6 +3388,7 @@ const struct real_format mips_extended_format =
53, 53,
-1021 + 53, -1021 + 53,
1024, 1024,
127,
-1, -1,
true, true,
true, true,
...@@ -3646,6 +3656,7 @@ const struct real_format ieee_quad_format = ...@@ -3646,6 +3656,7 @@ const struct real_format ieee_quad_format =
-16381, -16381,
16384, 16384,
127, 127,
127,
true, true,
true, true,
true, true,
...@@ -3664,6 +3675,7 @@ const struct real_format mips_quad_format = ...@@ -3664,6 +3675,7 @@ const struct real_format mips_quad_format =
-16381, -16381,
16384, 16384,
127, 127,
127,
true, true,
true, true,
true, true,
...@@ -3961,6 +3973,7 @@ const struct real_format vax_f_format = ...@@ -3961,6 +3973,7 @@ const struct real_format vax_f_format =
-127, -127,
127, 127,
15, 15,
15,
false, false,
false, false,
false, false,
...@@ -3979,6 +3992,7 @@ const struct real_format vax_d_format = ...@@ -3979,6 +3992,7 @@ const struct real_format vax_d_format =
-127, -127,
127, 127,
15, 15,
15,
false, false,
false, false,
false, false,
...@@ -3997,6 +4011,7 @@ const struct real_format vax_g_format = ...@@ -3997,6 +4011,7 @@ const struct real_format vax_g_format =
-1023, -1023,
1023, 1023,
15, 15,
15,
false, false,
false, false,
false, false,
...@@ -4172,6 +4187,7 @@ const struct real_format i370_single_format = ...@@ -4172,6 +4187,7 @@ const struct real_format i370_single_format =
-64, -64,
63, 63,
31, 31,
31,
false, false,
false, false,
false, /* ??? The encoding does allow for "unnormals". */ false, /* ??? The encoding does allow for "unnormals". */
...@@ -4190,6 +4206,7 @@ const struct real_format i370_double_format = ...@@ -4190,6 +4206,7 @@ const struct real_format i370_double_format =
-64, -64,
63, 63,
63, 63,
63,
false, false,
false, false,
false, /* ??? The encoding does allow for "unnormals". */ false, /* ??? The encoding does allow for "unnormals". */
...@@ -4398,6 +4415,7 @@ const struct real_format c4x_single_format = ...@@ -4398,6 +4415,7 @@ const struct real_format c4x_single_format =
-126, -126,
128, 128,
-1, -1,
-1,
false, false,
false, false,
false, false,
...@@ -4416,6 +4434,7 @@ const struct real_format c4x_extended_format = ...@@ -4416,6 +4434,7 @@ const struct real_format c4x_extended_format =
-126, -126,
128, 128,
-1, -1,
-1,
false, false,
false, false,
false, false,
...@@ -4459,6 +4478,7 @@ const struct real_format real_internal_format = ...@@ -4459,6 +4478,7 @@ const struct real_format real_internal_format =
-MAX_EXP, -MAX_EXP,
MAX_EXP, MAX_EXP,
-1, -1,
-1,
true, true,
true, true,
false, false,
......
...@@ -138,8 +138,13 @@ struct real_format ...@@ -138,8 +138,13 @@ struct real_format
/* The maximum integer, x, such that b**(x-1) is representable. */ /* The maximum integer, x, such that b**(x-1) is representable. */
int emax; int emax;
/* The bit position of the sign bit, or -1 for a complex encoding. */ /* The bit position of the sign bit, for determining whether a value
int signbit; 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. */ /* Properties of the format. */
bool has_nans; bool has_nans;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment