rs6000.c / PPc-EABI / VxWorks / varargs / 2.95.2 vs. 2.7.2


Wed Nov 15 07:23:00 GMT 2000


    Hi everyone,

  I was wondering if anyone could help me understand the changes that went
into the ppc/eabi calling conventions between 2.7.2 (egcs) and gcc 2.95.2,
which I *believe* may have been implemented in something called the 'newppc'
branch.

  The reason behind this is that I want to make a custom variant of 2.95.2
with those changes reverted.

  The reason behind *that* is that I work with VxWorks, and the version of
egcs that is supplied has appalling bugs in the optimizer, which basically
render our application code unreliable. 2.95.2 seems to be a *lot* better
in that department, and certainly building our code with it fixed at least
one of our known optimizer related bugs. Unfortunately VxWorks is supplied
to us as a set of .o files and an ar-chive. So the new code generated by
2.95.2 sometimes (but not always) falls down when it tries to interact with
the OS functions that use the old calling conventions. This shows itself
in varargs functions in particular, but I'm not sure if any other important
stuff has changed.

  I'm also doing this because I want to use the Altivec branch to generate
code that interoperates with the Vx OS .o files. I may need to also hack
that version to never pass vector args on the stack to avoid alignment
incompatibilities between the two.

  I've managed to grok that most of what I want to do will involve
function_arg_advance and function_arg, as well as setup_incoming_varargs
and the related varargs/builtins, but I'm doing a lot of guesswork here
and would really appreciate any advice or pointers that anyone could
give me. Ideally the URL of that well known website "How to revert ppc
eabi changes between egcs 2.7.2 and gcc 2.95.2", but if there isn't such
a site, then any warnings about other things that might have changed
and trip me up / brief summaries of what changed in stack layout / requests
to go boil my head would be gratefully received. Otherwise I guess I'm on
my own. Well, me and all the other VxWorkers who're stuck with faulty
optimizers, that is....

    cheers,
       DaveK

--
The Boulder Pledge: "Under no circumstances will I ever purchase anything
offered to me as the result of an unsolicited email message. Nor will I
forward chain letters, petitions, mass mailings, or virus warnings to large
numbers of others. This is my contribution to the survival of the online
community."



More information about the Gcc mailing list