This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Add BID as a configure time option for DFP
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org, marius dot cornea at intel dot com, evandro dot menezes at amd dot com, bje at au1 dot ibm dot com
- Date: Wed, 10 Jan 2007 14:35:29 -0800
- Subject: Re: RFC: Add BID as a configure time option for DFP
- References: <20070110194045.GA22005@lucon.org> <20070110221058.GA6410@us.ibm.com>
On Wed, Jan 10, 2007 at 02:10:58PM -0800, Janis Johnson wrote:
> On Wed, Jan 10, 2007 at 11:40:46AM -0800, H. J. Lu wrote:
> > Both AMD and Intel like to have BID as a configure time option
> > for DFP. Intel is planning to contribute a complete BID runtime
> > library, which can be used by executables generate by gcc.
> >
> > As the first step, we'd like to contribute a BID<->DPD library so that
> > BID can be used with libdecnumber by executables generate by gcc
> > before the complete BID runtime library is ready.
> >
> > Any comments?
>
> libdecnumber doesn't use DPD (densely packed decimal), it uses the
> decNumber format. Functions in libgcc convert from DPD to decNumber,
> call into libdecnumber to do computations, and then convert the result
> back to DPD. It's all parameterized in dfp-bit.[ch], so replacing
> conversions between decNumber structs and DPD with conversions between
> decNumber structs and BID (binary integer decimal) should be
> straightforward; I don't think there's any need to convert between BID
> and DPD to use libdecnumber.
libdecnumber is used by both gcc and DFP executables. We only want
to use BID for DFP executables. That means we will need BID<->decNumber
for gcc to generate DFP executables which use the BID library.
Since the real BID library won't be ready for a while and in the
meantime, we like to enable BID for gcc now, that is why we
propose the BID<->DPD<->libdecnumber approach as a stopgap
measure. We can plug in the real BID library later.
>
> If all x86* targets will use BID then there's no need for a configure
> option. Initial support using DPD for x86* was a proof of concept, I
> doubt that anyone would care if you replace it with BID support.
Glad to hear that. We can make it BID only for x86.
H.J.