patch to fix __builtin_powi failure on apple-ppc-darwin (revised)

Paul Schlie schlie@comcast.net
Tue Mar 29 05:05:00 GMT 2005


> Richard Henderson <rth at gcc dot gnu dot org>
>> On Thu, Mar 24, 2005 at 09:38:25AM -0800, Fariborz Jahanian wrote:
>> +   /* mode of the 2nd argument must match Wtype. */
>> +   mode2 = mode_for_size (INT_TYPE_SIZE, MODE_INT, 0);
>
> Why do you believe Wtype == int?
>
> This is *not* ok.

If it's of any help, if these definitions are supposed to correlate to
those defined in libgcc2.h; I can say with great confidence that after
weeding through libgcc2.h and proposing a patch to logically clean it up
to enable the correct conditional definition of types sizes for targets
which have less than 4 UNITS_PER_WORD; that Wtype is always equivalent to
the target's long type size, as by definition DWtype is defined to be the
target's long long type size.

The only functions which are truly defined to use a target's "word-type"
are a few DWord (aka long long) shift and compare instructions which use
the targets native __word__ size attributes.

(although it may appear otherwise, libgcc2.h only supports targets which
have 8 bit units, and provides target support for it's long data type size,
which need to be defined as being SI mode or larger; all implication's to
the contrary is only an illusion.)

For reference if helpful, my proposed patch attempting to clean it up a bit,
can be found indirectly here:

  http://gcc.gnu.org/ml/gcc-patches/2005-03/msg02553.html





More information about the Gcc-patches mailing list