Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-17 Thread Richard Sandiford
Richard Henderson writes: > On 05/08/2014 01:12 PM, Richard Sandiford wrote: >> * wide-int.cc: Only include longlong.h if W_TYPE_SIZE==32 or >> __SIZEOF_INT128__ is defined. > > FWIW, this looks pretty good to me. Thanks, belatedly applied. Richard

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-12 Thread Richard Henderson
On 05/08/2014 01:12 PM, Richard Sandiford wrote: > * wide-int.cc: Only include longlong.h if W_TYPE_SIZE==32 or > __SIZEOF_INT128__ is defined. FWIW, this looks pretty good to me. r~

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-09 Thread Richard Earnshaw
On 08/05/14 19:31, Richard Sandiford wrote: > "Joseph S. Myers" writes: >> On Thu, 8 May 2014, Ramana Radhakrishnan wrote: >> >>> Ramana Radhakrishnan >>> >>>* wide-int.cc (UTItype): Define. >>>(UDWtype): Define for appropriate W_TYPE_SIZE. >> >> This breaks builds for 32-bit h

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-09 Thread Ramana Radhakrishnan
+#if GCC_VERSION >= 3000 && (W_TYPE_SIZE == 32 || defined (__SIZEOF_INT128__)) W_TYPE_SIZE == 32 is always false and on 32-bit hosts, __SIZEOF_INT128__ won't be defined. Right, but we won't try to use TImode if in future we do revert to using 32-bit types for 32-bit hosts. For now, I've re

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, May 8, 2014 at 1:12 PM, Richard Sandiford > wrote: >> "H.J. Lu" writes: >>> On Thu, May 8, 2014 at 12:42 PM, Jakub Jelinek wrote: On Thu, May 08, 2014 at 12:34:28PM -0700, H.J. Lu wrote: > On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford > wrote:

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread H.J. Lu
On Thu, May 8, 2014 at 1:12 PM, Richard Sandiford wrote: > "H.J. Lu" writes: >> On Thu, May 8, 2014 at 12:42 PM, Jakub Jelinek wrote: >>> On Thu, May 08, 2014 at 12:34:28PM -0700, H.J. Lu wrote: On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford wrote: > Kenneth Zadeck writes: >

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, May 8, 2014 at 12:42 PM, Jakub Jelinek wrote: >> On Thu, May 08, 2014 at 12:34:28PM -0700, H.J. Lu wrote: >>> On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford >>> wrote: >>> > Kenneth Zadeck writes: >>> >> everyone who has a private port will hate you forever. no

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread H.J. Lu
On Thu, May 8, 2014 at 12:42 PM, Jakub Jelinek wrote: > On Thu, May 08, 2014 at 12:34:28PM -0700, H.J. Lu wrote: >> On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford >> wrote: >> > Kenneth Zadeck writes: >> >> everyone who has a private port will hate you forever. note that i >> >> have 2 of

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Jakub Jelinek
On Thu, May 08, 2014 at 12:34:28PM -0700, H.J. Lu wrote: > On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford > wrote: > > Kenneth Zadeck writes: > >> everyone who has a private port will hate you forever. note that i > >> have 2 of them. > > > > Got any other ideas though? I suppose if we're

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread H.J. Lu
On Thu, May 8, 2014 at 12:18 PM, Richard Sandiford wrote: > Kenneth Zadeck writes: >> everyone who has a private port will hate you forever. note that i >> have 2 of them. > > Got any other ideas though? I suppose if we're prepared to break > compatibility with whatever the upstream of longlon

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Richard Sandiford
Kenneth Zadeck writes: > everyone who has a private port will hate you forever. note that i > have 2 of them. Got any other ideas though? I suppose if we're prepared to break compatibility with whatever the upstream of longlong.h is, we could make more use of intN_t and uintN_t. Having a whi

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Kenneth Zadeck
everyone who has a private port will hate you forever. note that i have 2 of them. On 05/08/2014 02:31 PM, Richard Sandiford wrote: "Joseph S. Myers" writes: On Thu, 8 May 2014, Ramana Radhakrishnan wrote: Ramana Radhakrishnan * wide-int.cc (UTItype): Define. (UDWtype)

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Richard Sandiford
"Joseph S. Myers" writes: > On Thu, 8 May 2014, Ramana Radhakrishnan wrote: > >> Ramana Radhakrishnan >> >>* wide-int.cc (UTItype): Define. >>(UDWtype): Define for appropriate W_TYPE_SIZE. > > This breaks builds for 32-bit hosts, where TImode isn't supported. You > can only

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Joseph S. Myers
On Thu, 8 May 2014, Ramana Radhakrishnan wrote: > Ramana Radhakrishnan > >* wide-int.cc (UTItype): Define. >(UDWtype): Define for appropriate W_TYPE_SIZE. This breaks builds for 32-bit hosts, where TImode isn't supported. You can only use TImode on the host if it's 64-bit.

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Richard Sandiford
Ramana Radhakrishnan writes: > diff --git a/gcc/ChangeLog b/gcc/ChangeLog > index 354cdb9..8ef9a0f 100644 > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,8 @@ > +2014-05-08 Ramana Radhakrishnan > + > + * wide-int.cc (UTItype): Define. > + (UDWtype): Define for appropriate W_TYP

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2014-05-08 Thread Ramana Radhakrishnan
On Wed, Dec 4, 2013 at 12:56 PM, Richard Sandiford wrote: > Richard Sandiford writes: >> This patch handles multiplications using a single HWIxHWI->2HWI >> multiplication >> on hosts that have one. This removes all uses of the slow (half-HWI) path >> for insn-recog.ii. The slow path is still u

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-04 Thread Kenneth Zadeck
On 12/04/2013 07:56 AM, Richard Sandiford wrote: Richard Sandiford writes: This patch handles multiplications using a single HWIxHWI->2HWI multiplication on hosts that have one. This removes all uses of the slow (half-HWI) path for insn-recog.ii. The slow path is still used 58 times for cp/pa

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-04 Thread Richard Sandiford
Richard Sandiford writes: > This patch handles multiplications using a single HWIxHWI->2HWI multiplication > on hosts that have one. This removes all uses of the slow (half-HWI) path > for insn-recog.ii. The slow path is still used 58 times for cp/parser.ii > and 168 times for fold-const.ii, but

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-03 Thread Ian Lance Taylor
On Tue, Dec 3, 2013 at 3:55 PM, Richard Sandiford wrote: > > OK, how about this, against trunk? Tested on x86_64-linux-gnu. > > Thanks, > Richard > > > include/ > * longlong.h: New file. > > libgcc/ > * longlong.h: Delete (moved to include/). > > libquadmath/ > * Makefile.

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-03 Thread Richard Sandiford
Paolo Bonzini writes: > Il 02/12/2013 20:34, Richard Sandiford ha scritto: >> I followed Joseph's suggestion and reused longlong.h. I copied it from >> libgcc rather than glibc since it seemed better for GCC to have a single >> version across both gcc/ and libgcc/. I can put it in

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-02 Thread Paolo Bonzini
Il 02/12/2013 20:34, Richard Sandiford ha scritto: >>> >> I followed Joseph's suggestion and reused longlong.h. I copied it from >>> >> libgcc rather than glibc since it seemed better for GCC to have a single >>> >> version across both gcc/ and libgcc/. I can put it in include/ if that >>> >> see

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-02 Thread Richard Sandiford
Ian Lance Taylor writes: > On Sun, Dec 1, 2013 at 2:28 AM, Richard Sandiford > wrote: >> I followed Joseph's suggestion and reused longlong.h. I copied it from >> libgcc rather than glibc since it seemed better for GCC to have a single >> version across both gcc/ and libgcc/. I can put it in in

Re: [wide-int] Add fast path for hosts with HWI widening multiplication

2013-12-01 Thread Ian Lance Taylor
On Sun, Dec 1, 2013 at 2:28 AM, Richard Sandiford wrote: > > I followed Joseph's suggestion and reused longlong.h. I copied it from > libgcc rather than glibc since it seemed better for GCC to have a single > version across both gcc/ and libgcc/. I can put it in include/ if that > seems better.