diff options
author | Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> | 1998-10-14 02:07:47 +0200 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-13 18:07:47 -0600 |
commit | 506b012c6f386a67d095f475d8885dd8e276f8cd (patch) | |
tree | 9790b3e94277f8d0301445c7055cadba3be74c92 /gcc | |
parent | 2fdc44405fe0750303f45f8cb26ee755d79a679d (diff) | |
download | gcc-506b012c6f386a67d095f475d8885dd8e276f8cd.zip gcc-506b012c6f386a67d095f475d8885dd8e276f8cd.tar.gz gcc-506b012c6f386a67d095f475d8885dd8e276f8cd.tar.bz2 |
real.c (emdnorm and etoasc): Disable round to even for c4x target to be compatible with TI compiler.
* real.c (emdnorm and etoasc): Disable round to even for c4x target
to be compatible with TI compiler.
From-SVN: r23072
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/real.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 088d782..d62c789 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -11,6 +11,9 @@ Wed Oct 14 00:38:40 1998 Jeffrey A Law (law@cygnus.com) 1998-10-13 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> + * real.c (emdnorm and etoasc): Disable round to even for c4x target + to be compatible with TI compiler. + * Makefile.in (USER_H): Add va-c4x.h to definition. Tue Oct 13 23:03:37 1998 Richard Henderson <rth@cygnus.com> @@ -79,7 +79,10 @@ netlib.att.com: netlib/cephes. */ `C4X' refers specifically to the floating point format used on Texas Instruments TMS320C3x and TMS320C4x digital signal processors. This supports QFmode (32-bit float, double) and HFmode - (40-bit long double) where BITS_PER_BYTE is 32. + (40-bit long double) where BITS_PER_BYTE is 32. Unlike IEEE + floats, C4x floats are not rounded to be even. The C4x conversions + were contributed by m.hayes@elec.canterbury.ac.nz (Michael Hayes) and + Haj.Ten.Brugge@net.HCC.nl (Herman ten Brugge). If LONG_DOUBLE_TYPE_SIZE = 64 (the default, unless tm.h defines it) then `long double' and `double' are both implemented, but they @@ -2594,6 +2597,7 @@ emdnorm (s, lost, subflg, exp, rcntrl) s[rw] &= ~rmsk; if ((r & rmbit) != 0) { +#ifndef C4X if (r == rmbit) { if (lost == 0) @@ -2607,6 +2611,7 @@ emdnorm (s, lost, subflg, exp, rcntrl) goto mddone; } } +#endif eaddm (rbit, s); } mddone: @@ -4932,8 +4937,10 @@ etoasc (x, string, ndigs) emovo (y, t); if (ecmp (t, ezero) != 0) goto roun; /* round to nearest */ +#ifndef C4X if ((*(s - 1) & 1) == 0) goto doexp; /* round to even */ +#endif } /* Round up and propagate carry-outs */ roun: |