aboutsummaryrefslogtreecommitdiff
path: root/gcc/real.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-06-29 15:40:49 -0600
committerJeff Law <law@gcc.gnu.org>1998-06-29 15:40:49 -0600
commit9ec36da574f8272705a3ead59bbd289f23793429 (patch)
tree1ec056a51ca5f7af70d48889aab8bbf9c1f9d9aa /gcc/real.c
parentad2c71b764c066471608c85695392c7fb49c7bc7 (diff)
downloadgcc-9ec36da574f8272705a3ead59bbd289f23793429.zip
gcc-9ec36da574f8272705a3ead59bbd289f23793429.tar.gz
gcc-9ec36da574f8272705a3ead59bbd289f23793429.tar.bz2
* Merge from gcc2 June 9, 1998 snapshot. See ChangeLog.13 for
details. From-SVN: r20808
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/gcc/real.c b/gcc/real.c
index 37b0a88..ed854e0 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -51,7 +51,7 @@ XFmode and TFmode transcendental functions, can be obtained by ftp from
netlib.att.com: netlib/cephes. */
/* Type of computer arithmetic.
- Only one of DEC, IBM, IEEE, or UNK should get defined.
+ Only one of DEC, IBM, IEEE, C4X, or UNK should get defined.
`IEEE', when REAL_WORDS_BIG_ENDIAN is non-zero, refers generically
to big-endian IEEE floating-point data structure. This definition
@@ -76,6 +76,11 @@ netlib.att.com: netlib/cephes. */
no type wider than DFmode. The IBM conversions were contributed by
frank@atom.ansto.gov.au (Frank Crawford).
+ `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.
+
If LONG_DOUBLE_TYPE_SIZE = 64 (the default, unless tm.h defines it)
then `long double' and `double' are both implemented, but they
both mean DFmode. In this case, the software floating-point
@@ -686,7 +691,16 @@ ereal_atof (s, t)
switch (t)
{
+#ifdef C4X
+ case QFmode:
case HFmode:
+ asctoe53 (s, tem);
+ e53toe (tem, e);
+ break;
+#else
+ case HFmode:
+#endif
+
case SFmode:
asctoe24 (s, tem);
e24toe (tem, e);
@@ -1045,11 +1059,21 @@ real_value_truncate (mode, arg)
break;
case SFmode:
+#ifndef C4X
case HFmode:
+#endif
etoe24 (e, t);
e24toe (t, t);
break;
+#ifdef C4X
+ case HFmode:
+ case QFmode:
+ etoe53 (e, t);
+ e53toe (t, t);
+ break;
+#endif
+
case SImode:
r = etrunci (arg);
return (r);
@@ -3714,7 +3738,7 @@ toe53 (x, y)
#else /* it's neither DEC nor IBM */
#ifdef C4X
-/* Convert e-type X to C4X-format double E. */
+/* Convert e-type X to C4X-format long double E. */
static void
etoe53 (x, e)