Commit b42b4d2c by Kaveh R. Ghazi Committed by Kaveh Ghazi

real.c (enan, [...]): Wrap in NANS.

        * real.c (enan, einan, eiisnan, eiisneg, make_nan): Wrap in NANS.
        (target_isinf, target_isnan, eisnan): Mark parameter with
        ATTRIBUTE_UNUSED.
        (eiisinf): Wrap in INFINITY.
        (etoe113, etoe64, etoe53, etoe24): Wrap label `nonorm' in INFINITY.
        (ibmtoe): Remove unused variable `rndsav'.

From-SVN: r31518
parent 10db12e0
2000-01-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* real.c (enan, einan, eiisnan, eiisneg, make_nan): Wrap in NANS.
(target_isinf, target_isnan, eisnan): Mark parameter with
ATTRIBUTE_UNUSED.
(eiisinf): Wrap in INFINITY.
(etoe113, etoe64, etoe53, etoe24): Wrap label `nonorm' in INFINITY.
(ibmtoe): Remove unused variable `rndsav'.
Wed Jan 19 20:23:06 2000 J"orn Rennecke <amylaar@cygnus.co.uk> Wed Jan 19 20:23:06 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.h (PASS_IN_REG_P): Remove extraneous paranthesis. * sh.h (PASS_IN_REG_P): Remove extraneous paranthesis.
......
...@@ -352,19 +352,24 @@ static int eisneg PARAMS ((unsigned EMUSHORT *)); ...@@ -352,19 +352,24 @@ static int eisneg PARAMS ((unsigned EMUSHORT *));
static int eisinf PARAMS ((unsigned EMUSHORT *)); static int eisinf PARAMS ((unsigned EMUSHORT *));
static int eisnan PARAMS ((unsigned EMUSHORT *)); static int eisnan PARAMS ((unsigned EMUSHORT *));
static void einfin PARAMS ((unsigned EMUSHORT *)); static void einfin PARAMS ((unsigned EMUSHORT *));
#ifdef NANS
static void enan PARAMS ((unsigned EMUSHORT *, int)); static void enan PARAMS ((unsigned EMUSHORT *, int));
static void einan PARAMS ((unsigned EMUSHORT *));
static int eiisnan PARAMS ((unsigned EMUSHORT *));
static int eiisneg PARAMS ((unsigned EMUSHORT *));
static void make_nan PARAMS ((unsigned EMUSHORT *, int, enum machine_mode));
#endif
static void emovi PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static void emovi PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void emovo PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static void emovo PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void ecleaz PARAMS ((unsigned EMUSHORT *)); static void ecleaz PARAMS ((unsigned EMUSHORT *));
static void ecleazs PARAMS ((unsigned EMUSHORT *)); static void ecleazs PARAMS ((unsigned EMUSHORT *));
static void emovz PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static void emovz PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void einan PARAMS ((unsigned EMUSHORT *));
static int eiisnan PARAMS ((unsigned EMUSHORT *));
static int eiisneg PARAMS ((unsigned EMUSHORT *));
#if 0 #if 0
static void eiinfin PARAMS ((unsigned EMUSHORT *)); static void eiinfin PARAMS ((unsigned EMUSHORT *));
#endif #endif
#ifdef INFINITY
static int eiisinf PARAMS ((unsigned EMUSHORT *)); static int eiisinf PARAMS ((unsigned EMUSHORT *));
#endif
static int ecmpm PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static int ecmpm PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void eshdn1 PARAMS ((unsigned EMUSHORT *)); static void eshdn1 PARAMS ((unsigned EMUSHORT *));
static void eshup1 PARAMS ((unsigned EMUSHORT *)); static void eshup1 PARAMS ((unsigned EMUSHORT *));
...@@ -459,7 +464,6 @@ static void etoc4x PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *, ...@@ -459,7 +464,6 @@ static void etoc4x PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *,
static void toc4x PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *, static void toc4x PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *,
enum machine_mode)); enum machine_mode));
#endif #endif
static void make_nan PARAMS ((unsigned EMUSHORT *, int, enum machine_mode));
#if 0 #if 0
static void uditoe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static void uditoe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
static void ditoe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *)); static void ditoe PARAMS ((unsigned EMUSHORT *, unsigned EMUSHORT *));
...@@ -999,11 +1003,11 @@ ereal_ldexp (x, n) ...@@ -999,11 +1003,11 @@ ereal_ldexp (x, n)
int int
target_isinf (x) target_isinf (x)
REAL_VALUE_TYPE x; REAL_VALUE_TYPE x ATTRIBUTE_UNUSED;
{ {
#ifdef INFINITY
unsigned EMUSHORT e[NE]; unsigned EMUSHORT e[NE];
#ifdef INFINITY
GET_REAL (&x, e); GET_REAL (&x, e);
return (eisinf (e)); return (eisinf (e));
#else #else
...@@ -1015,11 +1019,11 @@ target_isinf (x) ...@@ -1015,11 +1019,11 @@ target_isinf (x)
int int
target_isnan (x) target_isnan (x)
REAL_VALUE_TYPE x; REAL_VALUE_TYPE x ATTRIBUTE_UNUSED;
{ {
#ifdef NANS
unsigned EMUSHORT e[NE]; unsigned EMUSHORT e[NE];
#ifdef NANS
GET_REAL (&x, e); GET_REAL (&x, e);
return (eisnan (e)); return (eisnan (e));
#else #else
...@@ -1631,7 +1635,7 @@ eisinf (x) ...@@ -1631,7 +1635,7 @@ eisinf (x)
static int static int
eisnan (x) eisnan (x)
unsigned EMUSHORT x[]; unsigned EMUSHORT x[] ATTRIBUTE_UNUSED;
{ {
#ifdef NANS #ifdef NANS
int i; int i;
...@@ -1696,6 +1700,7 @@ einfin (x) ...@@ -1696,6 +1700,7 @@ einfin (x)
This generates Intel's quiet NaN pattern for extended real. This generates Intel's quiet NaN pattern for extended real.
The exponent is 7fff, the leading mantissa word is c000. */ The exponent is 7fff, the leading mantissa word is c000. */
#ifdef NANS
static void static void
enan (x, sign) enan (x, sign)
register unsigned EMUSHORT *x; register unsigned EMUSHORT *x;
...@@ -1708,6 +1713,7 @@ enan (x, sign) ...@@ -1708,6 +1713,7 @@ enan (x, sign)
*x++ = 0xc000; *x++ = 0xc000;
*x = (sign << 15) | 0x7fff; *x = (sign << 15) | 0x7fff;
} }
#endif /* NANS */
/* Move in an e-type number A, converting it to exploded e-type B. */ /* Move in an e-type number A, converting it to exploded e-type B. */
...@@ -1838,6 +1844,7 @@ emovz (a, b) ...@@ -1838,6 +1844,7 @@ emovz (a, b)
The explicit pattern for this is maximum exponent and The explicit pattern for this is maximum exponent and
top two significant bits set. */ top two significant bits set. */
#ifdef NANS
static void static void
einan (x) einan (x)
unsigned EMUSHORT x[]; unsigned EMUSHORT x[];
...@@ -1847,9 +1854,11 @@ einan (x) ...@@ -1847,9 +1854,11 @@ einan (x)
x[E] = 0x7fff; x[E] = 0x7fff;
x[M + 1] = 0xc000; x[M + 1] = 0xc000;
} }
#endif /* NANS */
/* Return nonzero if exploded e-type X is a NaN. */ /* Return nonzero if exploded e-type X is a NaN. */
#ifdef NANS
static int static int
eiisnan (x) eiisnan (x)
unsigned EMUSHORT x[]; unsigned EMUSHORT x[];
...@@ -1866,9 +1875,11 @@ eiisnan (x) ...@@ -1866,9 +1875,11 @@ eiisnan (x)
} }
return (0); return (0);
} }
#endif /* NANS */
/* Return nonzero if sign of exploded e-type X is nonzero. */ /* Return nonzero if sign of exploded e-type X is nonzero. */
#ifdef NANS
static int static int
eiisneg (x) eiisneg (x)
unsigned EMUSHORT x[]; unsigned EMUSHORT x[];
...@@ -1876,6 +1887,7 @@ eiisneg (x) ...@@ -1876,6 +1887,7 @@ eiisneg (x)
return x[0] != 0; return x[0] != 0;
} }
#endif /* NANS */
#if 0 #if 0
/* Fill exploded e-type X with infinity pattern. /* Fill exploded e-type X with infinity pattern.
...@@ -1893,6 +1905,7 @@ eiinfin (x) ...@@ -1893,6 +1905,7 @@ eiinfin (x)
/* Return nonzero if exploded e-type X is infinite. */ /* Return nonzero if exploded e-type X is infinite. */
#ifdef INFINITY
static int static int
eiisinf (x) eiisinf (x)
unsigned EMUSHORT x[]; unsigned EMUSHORT x[];
...@@ -1906,7 +1919,7 @@ eiisinf (x) ...@@ -1906,7 +1919,7 @@ eiisinf (x)
return (1); return (1);
return (0); return (0);
} }
#endif /* INFINITY */
/* Compare significands of numbers in internal exploded e-type format. /* Compare significands of numbers in internal exploded e-type format.
Guard words are included in the comparison. Guard words are included in the comparison.
...@@ -3499,7 +3512,9 @@ etoe113 (x, e) ...@@ -3499,7 +3512,9 @@ etoe113 (x, e)
rndprc = 113; rndprc = 113;
emdnorm (xi, 0, 0, exp, 64); emdnorm (xi, 0, 0, exp, 64);
rndprc = rndsav; rndprc = rndsav;
#ifdef INFINITY
nonorm: nonorm:
#endif
toe113 (xi, e); toe113 (xi, e);
} }
...@@ -3591,7 +3606,9 @@ etoe64 (x, e) ...@@ -3591,7 +3606,9 @@ etoe64 (x, e)
rndprc = 64; rndprc = 64;
emdnorm (xi, 0, 0, exp, 64); emdnorm (xi, 0, 0, exp, 64);
rndprc = rndsav; rndprc = rndsav;
#ifdef INFINITY
nonorm: nonorm:
#endif
toe64 (xi, e); toe64 (xi, e);
} }
...@@ -3804,7 +3821,9 @@ etoe53 (x, e) ...@@ -3804,7 +3821,9 @@ etoe53 (x, e)
rndprc = 53; rndprc = 53;
emdnorm (xi, 0, 0, exp, 64); emdnorm (xi, 0, 0, exp, 64);
rndprc = rndsav; rndprc = rndsav;
#ifdef INFINITY
nonorm: nonorm:
#endif
toe53 (xi, e); toe53 (xi, e);
} }
...@@ -3978,7 +3997,9 @@ etoe24 (x, e) ...@@ -3978,7 +3997,9 @@ etoe24 (x, e)
rndprc = 24; rndprc = 24;
emdnorm (xi, 0, 0, exp, 64); emdnorm (xi, 0, 0, exp, 64);
rndprc = rndsav; rndprc = rndsav;
#ifdef INFINITY
nonorm: nonorm:
#endif
toe24 (xi, e); toe24 (xi, e);
} }
...@@ -5830,7 +5851,6 @@ ibmtoe (d, e, mode) ...@@ -5830,7 +5851,6 @@ ibmtoe (d, e, mode)
{ {
unsigned EMUSHORT y[NI]; unsigned EMUSHORT y[NI];
register unsigned EMUSHORT r, *p; register unsigned EMUSHORT r, *p;
int rndsav;
ecleaz (y); /* start with a zero */ ecleaz (y); /* start with a zero */
p = y; /* point to our number */ p = y; /* point to our number */
...@@ -6229,6 +6249,7 @@ unsigned EMUSHORT SFlittlenan[2] = {0, 0xffc0}; ...@@ -6229,6 +6249,7 @@ unsigned EMUSHORT SFlittlenan[2] = {0, 0xffc0};
#endif #endif
#ifdef NANS
static void static void
make_nan (nan, sign, mode) make_nan (nan, sign, mode)
unsigned EMUSHORT *nan; unsigned EMUSHORT *nan;
...@@ -6287,6 +6308,7 @@ make_nan (nan, sign, mode) ...@@ -6287,6 +6308,7 @@ make_nan (nan, sign, mode)
if (! REAL_WORDS_BIG_ENDIAN) if (! REAL_WORDS_BIG_ENDIAN)
*nan = (sign << 15) | (*p & 0x7fff); *nan = (sign << 15) | (*p & 0x7fff);
} }
#endif /* NANS */
/* This is the inverse of the function `etarsingle' invoked by /* This is the inverse of the function `etarsingle' invoked by
REAL_VALUE_TO_TARGET_SINGLE. */ REAL_VALUE_TO_TARGET_SINGLE. */
......
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