Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread Joseph S. Myers
On Thu, 16 May 2013, DJ Delorie wrote: > SIZE_TYPE is compared - with individual strcmp's! - against a fixed > set of C types, instead of using some sort of table lookup to support > non-power-of-two types. Joern had a patch (as of December 2010, possibly updated since then) to convert at least

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread DJ Delorie
> I thought it was the other way round - that after Bernd's fixes (July > 2011) towards support for 40-bit integers, FRACTIONAL_INT_MODE worked > better than PARTIAL_INT_MODE. Probably most accurate to say that both ways are not well supported. In general, I always have a hard time with anythin

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread Joseph S. Myers
On Thu, 16 May 2013, DJ Delorie wrote: > > What's the blocker to convert the existing 5 cases of > > PARTIAL_INT_MODE use to specify a precision? > > In general? For me, PARTIAL_INT_MODE() works, FRACTIONAL_INT_MODE() > didn't. I thought it was the other way round - that after Bernd's fixes (Ju

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread DJ Delorie
> What's the blocker to convert the existing 5 cases of > PARTIAL_INT_MODE use to specify a precision? In general? For me, PARTIAL_INT_MODE() works, FRACTIONAL_INT_MODE() didn't.

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread DJ Delorie
> Interestingly we have exactly that for AVR: > > config/avr/avr-modes.def:FRACTIONAL_INT_MODE (PSI, 24, 3); I know. I tried copying them, it didn't work for me.

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-16 Thread Richard Biener
On Wed, May 15, 2013 at 7:24 PM, Mike Stump wrote: > On May 15, 2013, at 1:27 AM, Richard Biener > wrote: >> My question is, if you end up with >> >> (truncate:PSI (reg:SI 27)) >> >> and then constant propagate 0x7fff to reg:SI 27, what does simplify-rtx.c >> do here? Truncate to _what_ pr

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-15 Thread Mike Stump
On May 15, 2013, at 1:27 AM, Richard Biener wrote: > My question is, if you end up with > > (truncate:PSI (reg:SI 27)) > > and then constant propagate 0x7fff to reg:SI 27, what does simplify-rtx.c > do here? Truncate to _what_ precision exactly? In my world, I change PSI to be P28SI, and

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-15 Thread Richard Biener
On Tue, May 14, 2013 at 6:03 PM, DJ Delorie wrote: > >> How can you then ever "truncate" from SImode to PSImode? > > If you use PARTIAL_INT_MODE(), you get a PSImode that has a "default" > bitsize (i.e. the value stored in the data structure) that's the same > as SImode, that is, 32. There is no

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-14 Thread DJ Delorie
> How can you then ever "truncate" from SImode to PSImode? If you use PARTIAL_INT_MODE(), you get a PSImode that has a "default" bitsize (i.e. the value stored in the data structure) that's the same as SImode, that is, 32. There is no way to specify the usable bitsize, so it's "undefined/unspeci

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-14 Thread Richard Biener
On Mon, May 13, 2013 at 7:23 PM, DJ Delorie wrote: > >> Can you add that (partial int modes have fewer bits than int modes) >> as verification to genmodes.c:make_partial_integer_mode? > > I could, but it would be a no-op for PARTIAL_INT_MODE() > >> I wonder if this should not use GET_MODE_PRECISIO

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-13 Thread DJ Delorie
> Can you add that (partial int modes have fewer bits than int modes) > as verification to genmodes.c:make_partial_integer_mode? I could, but it would be a no-op for PARTIAL_INT_MODE() > I wonder if this should not use GET_MODE_PRECISION - after all it is > the precision that determines whether

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-13 Thread Richard Biener
On Sat, May 11, 2013 at 1:41 AM, DJ Delorie wrote: > >> > Note that I had to make a few changes (fixes?) in the MI portions of >> > gcc to avoid problems I encountered, I don't know if these changes are >> > "correct" or if there are better ways to avoid those cases. Those >> >> In any case, the

Re: cfgexpand.c patch for [was new port: msp430-elf]

2013-05-10 Thread DJ Delorie
> > Note that I had to make a few changes (fixes?) in the MI portions of > > gcc to avoid problems I encountered, I don't know if these changes are > > "correct" or if there are better ways to avoid those cases. Those > > In any case, they should best be posted in separate messages, each one >