This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Add BID as a configure time option for DFP


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]