Re: causing function not to clobber

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dima Sorkin <dmitri.sorkin@xxxxxxxxx> writes:

>   Consider a function
> void f();
>
> Is there a way to specify that this function should not clobber any register (i.e. save every register it uses on the stack), even if ABI permits to clobber certain registers ?

gcc has that feature for certain targets but not for all, via a function
attribute.  You didn't mention which target you are using.  The feature
is not available on x86.

> If a way exists, is it in standard C (for example C99), or GCC extension ?

The feature, when supported, is a GCC extension.  There is no way to
request this in standard C.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux