Sorry if I misunderstood, but...

On Fri, 18 Dec 2009, Mohamed Shafi wrote:

> 2009/12/18 Hans-Peter Nilsson <h...@bitrange.com>:
> > On Fri, 20 Nov 2009, Mohamed Shafi wrote:
> >> I tried implementing the suggestion given by Richard, but got into
> >> issues. The GCC frame work is written assuming that there are no modes
> >> with HOST_BITS_PER_WIDE_INT < GET_MODE_BITSIZE (mode) < 2 *
> >> HOST_BITS_PER_WIDE_INT.
> >
> > (Not seeing a reply regarding this issue, so here's mine, belated:)
> >
> > Perhaps a wart, but with a 64-bit HOST_BITS_PER_WIDE_INT, would
> > that affect your port?  It's not?  Just set need_64bit_hwint=yes
> > in config.gcc.  And send a patch for the introductory comment in
> > that file, unless your port already matches the "BITS_PER_WORD >
> > 32 bits" condition.
> >
>    Thanks Hans for yourr reply
>    I have already tried that. What you are suggesting is the first
> solution that i got from Richard Henderson.

Or rather, a prerequisite to that solution, working around the
wart you noted.

> I have mentioned the
> issues if faced with this in my mail. The GCC frame work is written
> assuming that there are no modes with HOST_BITS_PER_WIDE_INT <
> GET_MODE_BITSIZE (mode) < 2 * HOST_BITS_PER_WIDE_INT. So i had to hack
> at places to get things working. For my target the BITS_PER_WORD ==
> 32. The mode that i am using is RImode (5bytes)

You already mentioned all that in the message to which I replied
and quoted above (twice now :-)  By you mentioning that equation
I have to think you misread and missed the point (sorry if
instead it's me);

In config.gcc, for the line matching your port, set:
 need_64bit_hwint=yes

Then, GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT
for your 40-bit mode, as the equation above yields false for
64 < 40 < 64*2.

HTH, good luck and happy holidays.
brgds, H-P

Reply via email to