[ECOS] Question about compiling consideration(GNUPro, GCC for SPARC)? Thanks
Andrew Lunn
andrew.lunn@ascom.ch
Mon Oct 7 06:08:00 GMT 2002
> Q4. In the ABI docs it says some registers are call-clobbered or
> call-preserved, what's the exact meaning of that?
clobbered is not a commonly used word in written English. The Jargon
file has a nice definition:
>From Jargon File (4.0.0/24 July 1996) [jargon]:
clobber /vt./ To overwrite, usually unintentionally: "I
walked off the end of the array and clobbered the stack." Compare
{mung}, {scribble}, {trash}, and {smash the stack}.
In the contest of the ABI, it means registers that are call-clobbered
can be overwritten inside a function call. So the caller should not
assume the register have the same value after a function call as
before.
If you want to use a Call-preserved registers inside a function, you
need to save it, and restore the value before the function exits.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list