diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-01 21:45:28 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-01 21:45:28 +0000 |
commit | eee8bf1c8bb8c1d9ec480abfe3ad81ef3ac68488 (patch) | |
tree | 43a194f1d77d2dbf0fec3807a54f212259cb8abd /gcc/real.h | |
parent | fc8903b37c1014afad4c4ae946e961833bf1c6ce (diff) | |
download | gcc-eee8bf1c8bb8c1d9ec480abfe3ad81ef3ac68488.tar.gz |
* real.h (EXP_BITS): Make room for...
(struct real_value): ... added canonical bit.
(struct real_format): Added pnan.
(mips_single_format, mips_double_format, mips_extended_format,
mips_quad_format): New.
* real.c: Copy p to pnan in all formats.
(get_canonical_qnan, get_canonical_snan): Set canonical bit.
(real_nan): Use pnan to compute significand's shift.
(real_identical): Disregard significand in canonical
NaNs.
(real_hash): Likewise. Take signalling into account.
(encode_ieee_single, encode_ieee_double, encode_ieee_quad):
Disregard significand bits in canonical NaNs. Set all bits of
canonical NaN if !qnan_msb_set.
(encode_ibm_extended, decode_ibm_extended): Likewise. Use
qnan_msb_set to tell the base double format.
(ibm_extended_format): Use 53 as pnan.
(mips_single_format, mips_double_format, mips_extended_format,
mips_quad_format): Copied from the corresponding ieee/ibm
formats, with qnan_msb_set false.
* config/mips/iris6.h (MIPS_TFMODE_FORMAT): Use mips_extended_format.
* config/mips/linux64.h (MIPS_TFMODE_FORMAT): Use mips_quad_format.
* config/mips/mips.c (override_options): Use mips_single_format
and mips_double_format. Default TFmode to mips_quad_format.
* config/mips/t-linux64 (tp-bit.c): Define QUIET_NAN_NEGATED.
* config/mips/t-irix6: Likewise.
* config/mips/t-mips (fp-bit.c, dp-bit.c): Likewise.
* config/fp-bit.c (pack_d, unpack_d): Obey it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65146 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.h')
-rw-r--r-- | gcc/real.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/real.h b/gcc/real.h index 9507af2270d..0a470a512f3 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -35,7 +35,7 @@ enum real_value_class { }; #define SIGNIFICAND_BITS (128 + HOST_BITS_PER_LONG) -#define EXP_BITS (32 - 4) +#define EXP_BITS (32 - 5) #define MAX_EXP ((1 << (EXP_BITS - 1)) - 1) #define SIGSZ (SIGNIFICAND_BITS / HOST_BITS_PER_LONG) #define SIG_MSB ((unsigned long)1 << (HOST_BITS_PER_LONG - 1)) @@ -45,6 +45,7 @@ struct real_value GTY(()) ENUM_BITFIELD (real_value_class) class : 2; unsigned int sign : 1; unsigned int signalling : 1; + unsigned int canonical : 1; signed int exp : EXP_BITS; unsigned long sig[SIGSZ]; }; @@ -119,6 +120,9 @@ struct real_format /* Size of the significand in digits of radix B. */ int p; + /* Size of the significant of a NaN, in digits of radix B. */ + int pnan; + /* The minimum negative integer, x, such that b**(x-1) is normalized. */ int emin; @@ -222,12 +226,16 @@ extern unsigned int real_hash PARAMS ((const REAL_VALUE_TYPE *)); /* Target formats defined in real.c. */ extern const struct real_format ieee_single_format; +extern const struct real_format mips_single_format; extern const struct real_format ieee_double_format; +extern const struct real_format mips_double_format; extern const struct real_format ieee_extended_motorola_format; extern const struct real_format ieee_extended_intel_96_format; extern const struct real_format ieee_extended_intel_128_format; extern const struct real_format ibm_extended_format; +extern const struct real_format mips_extended_format; extern const struct real_format ieee_quad_format; +extern const struct real_format mips_quad_format; extern const struct real_format vax_f_format; extern const struct real_format vax_d_format; extern const struct real_format vax_g_format; |