This is the mail archive of the 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]

Re: FW: wrong code generation in newlib 1.1.14 PPC ?!

Kai Ruottu wrote:

Frank Juergen-r58616 wrote:

I generate my own version of gcc and newlib for the PowerPC.

Then you should know what you are doing... And not ask anything here :-)

Neither I always know what I'm doing... Or don't always know everything. Being provocative is a good way to trigger some own thinking anyhow...

Here the goal was to start thinking what on earth could be the default CPU type
etc. for your chosen target.

Is there a specific non-default multilib version triggered with the '-mcpu=603e' option? Or should the default code ('-mcpu=common') be fully compatible with your
603e ? The GCC 3.4 manual tells about this default code :

This was bullshit, I cannot say why I thought the '-mcpu=common' always being the default... The same chapter where
the clipped text was taken, clearly told that the target name and the possibly used '-mcpu=something' option defines
the default code.... So a 'rs6000-aix5.1' target GCC generates totally different code from a GCC made for the
'powerpc-linux-gnu' which is then totally different from code produced for the 'powerpc-eabi', 'powerpc-eabispe',
'powerpc-eabialtivec' etc. targets.

For the 'powerpc-eabi' the default maybe will be defined with (in 'gcc/config/rs6000/eabi.h') the :

------------- clip -----------------------------
/* Add -meabi to target flags.  */

/* Invoke an initializer function to set up the GOT.  */
#define NAME__MAIN "__eabi"
#define INVOKE__main

#define TARGET_VERSION fprintf (stderr, " (PowerPC Embedded)");

#define TARGET_OS_CPP_BUILTINS()          \
 do                                      \
   {                                     \
     builtin_define_std ("PPC");         \
     builtin_define ("__embedded__");    \
     builtin_assert ("system=embedded"); \
     builtin_assert ("cpu=powerpc");     \
     builtin_assert ("machine=powerpc"); \
   }                                     \
------------- clip -----------------------------

So the '-mcpu=powerpc' would be (one of the) default(s) with the 'powerpc-eabi' target name...

I would guess this target name being used and the '-mcpu=powerpc' code not being suitable
if needing the '-mcpu=603e'....

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