Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: parisc-linux@parisc-linux.org
Subject: [parisc-linux] long double
Date: Fri, 18 Jan 2002 00:35:42 +0000	[thread overview]
Message-ID: <20020118003542.F9221@parcelfarce.linux.theplanet.co.uk> (raw)

I searched the mailing list for a discussion of the `long double' problem,
but I didn't find it.  So here we go...

gcc currently thinks that `long double' is 64-bits (the same size
as double).  This is perfectly legitimate, but...
glibc thinks that `long double' is 96-bits.
And HP-UX thinks `long double' is 128-bits.

So any package using long double is probably very broken.  This may
explain some of our bizarre mathematical-related failures.

Our options:
(1) Inform gcc that it's wrong, our long doubles are really 96-bits.
I don't see any way of easily implementing 96-bit floating point numbers
on top of the hardware.  I like this option the least.

(2) Inform glibc that it's wrong, our long doubles are really 64-bits.
This probably fixes most of the problems we're experiencing, but may
break an ABI somewhere?  More investigation required.  This is probably
the easiest of the three options to implement.

(3) Change both gcc and glibc to think that long double is actually
128-bits wide.  This is almost certainly going to break some packages,
and the kernel FP support may have to be enhanced to emulate some
of the opcodes.  The PA-8500 ERS says that it does NOT support `quad
precision' operations in hardware.  This is certainly going to be more
work to implement than option (2), and it may well be slower.  There's a
recommendation that the compiler arrange for a function call to handle
long double instead of issuing the instruction and trapping.

I guess I'm most in favour of option (2), though it means that there's
no 128-bit data type, which sucks a little bit, and HPUX source code is
more difficult to port, which maybe nobody cares about.

-- 
Revolutions do not require corporate support.

             reply	other threads:[~2002-01-18  0:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-18  0:35 Matthew Wilcox [this message]
2002-01-18  0:42 ` [parisc-linux] long double Ulrich Drepper
2002-01-18  1:13   ` Stan Sieler
2002-01-18  3:20 ` John David Anglin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020118003542.F9221@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=parisc-linux@parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox