Re: PowerPC: Add __float128 conversions to/from Decimal

2020-11-12 Thread Michael Meissner via Gcc-patches
On Thu, Oct 29, 2020 at 10:05:38PM +, Joseph Myers wrote: > On Thu, 29 Oct 2020, Segher Boessenkool wrote: > > > > Doing these conversions accurately is nontrivial. Converting via strings > > > is the simple approach (i.e. the one that moves the complexity somewhere > > > else). There are

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-11-03 Thread Segher Boessenkool
On Tue, Nov 03, 2020 at 01:12:29AM +, Joseph Myers wrote: > On Mon, 2 Nov 2020, Segher Boessenkool wrote: > > > > Also note that if you want to use printf as opposed to strfromf128 for > > > IEEE binary128 you'll need to use __printfieee128 (the version that > > > expects long double to be

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-11-02 Thread Joseph Myers
On Mon, 2 Nov 2020, Segher Boessenkool wrote: > > Also note that if you want to use printf as opposed to strfromf128 for > > IEEE binary128 you'll need to use __printfieee128 (the version that > > expects long double to be IEEE binary128) which was introduced in glibc > > 2.32, so that doesn't

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-11-02 Thread Segher Boessenkool
Hi Joseph, On Thu, Oct 29, 2020 at 10:05:38PM +, Joseph Myers wrote: > On Thu, 29 Oct 2020, Segher Boessenkool wrote: > > > Doing these conversions accurately is nontrivial. Converting via strings > > > is the simple approach (i.e. the one that moves the complexity somewhere > > > else).

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-29 Thread Joseph Myers
On Thu, 29 Oct 2020, Segher Boessenkool wrote: > > Doing these conversions accurately is nontrivial. Converting via strings > > is the simple approach (i.e. the one that moves the complexity somewhere > > else). There are more complicated but more efficient approaches that can > > achieve

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-29 Thread Segher Boessenkool
On Thu, Oct 29, 2020 at 06:31:54PM +, Joseph Myers wrote: > On Thu, 29 Oct 2020, Segher Boessenkool wrote: > > On Thu, Oct 29, 2020 at 12:45:15PM -0400, Michael Meissner wrote: > > > On Wed, Oct 28, 2020 at 07:04:31PM -0500, Segher Boessenkool wrote: > > > > > +#if HAVE_KF_MODE > > > > > +

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-29 Thread Joseph Myers
On Thu, 29 Oct 2020, Segher Boessenkool wrote: > Hi! > > On Thu, Oct 29, 2020 at 12:45:15PM -0400, Michael Meissner wrote: > > On Wed, Oct 28, 2020 at 07:04:31PM -0500, Segher Boessenkool wrote: > > > > +#if HAVE_KF_MODE > > > > + strfromf128 (buf, BUFMAX, BFP_FMT, (BFP_VIA_TYPE) x); > > > >

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-29 Thread Segher Boessenkool
Hi! On Thu, Oct 29, 2020 at 12:45:15PM -0400, Michael Meissner wrote: > On Wed, Oct 28, 2020 at 07:04:31PM -0500, Segher Boessenkool wrote: > > > +#if HAVE_KF_MODE > > > + strfromf128 (buf, BUFMAX, BFP_FMT, (BFP_VIA_TYPE) x); > > > +#else > > >sprintf (buf, BFP_FMT, (BFP_VIA_TYPE) x); > > >

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-29 Thread Michael Meissner via Gcc-patches
On Wed, Oct 28, 2020 at 07:04:31PM -0500, Segher Boessenkool wrote: > On Thu, Oct 22, 2020 at 06:06:03PM -0400, Michael Meissner wrote: > > This patch adds the various decimal to/from IEEE 128-bit conversions. I > > had to make some changes to the infrastructure, since that infrastructure > >

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-28 Thread Segher Boessenkool
On Thu, Oct 22, 2020 at 06:06:03PM -0400, Michael Meissner wrote: > This patch adds the various decimal to/from IEEE 128-bit conversions. I > had to make some changes to the infrastructure, since that infrastructure > assumed that there is a sprintf/scanf format modifier to convert floating >

Re: PowerPC: Add __float128 conversions to/from Decimal

2020-10-27 Thread will schmidt via Gcc-patches
On Thu, 2020-10-22 at 18:06 -0400, Michael Meissner via Gcc-patches wrote: > PowerPC: Add __float128 conversions to/from Decimal. > > I have split all of these patches into separate patches to hopefully get them > into the tree. > > This patch adds the various decimal to

PowerPC: Add __float128 conversions to/from Decimal

2020-10-22 Thread Michael Meissner via Gcc-patches
PowerPC: Add __float128 conversions to/from Decimal. I have split all of these patches into separate patches to hopefully get them into the tree. This patch adds the various decimal to/from IEEE 128-bit conversions. I had to make some changes to the infrastructure, since that infrastructure