This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Following DejaGnu test fails when run using darwin's mixed mode (-mcpu=G5).
FAIL: gcc.dg/pr19402-2.c execution test


This is because word_mode is used in setting up the call to __builtin_powi.
Declaration for these functions are in libgcc2.h.


extern SFtype __powisf2 (SFtype, Wtype);
extern DFtype __powidf2 (DFtype, Wtype);

Wtype can be anything from a DItype to QItype and its size depends on setting of MIN_UNITS_PER_WORD.
There is no guarantee that word_mode's size matches MIN_UNITS_PER_WORD for all compilation
modes. For example, for apple's mixed mode (-mcpu=G5), former is 64 while latter is 32. This
patch uses a new type mode, instead of word_mode to be used in setting up 2nd argument in call
to __builtin_powi. This mode is in lock-step with Wtype. Also, this same mode has been used
in setting up the call to __builtin_ffs. Bootstrap is in progress.


OK for mainline?

- fariborz (fjahanian@apple.com)


ChangeLog:


2005-03-24 Fariborz Jahanian <fjahanian@apple.com>

        * builtins.c (expand_builtin_powi): Fix mode of
        2nd argument to match that of Wtype.

Attachment: fsf-patch-4054728.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]