Re: inlined functions and ABI guarantees

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

 



Maurizio Vitale wrote:

My question is, given:

    __asm__ __volatile__ (
"some sequence of opaque insn that (potentially destroy all registers"
        :  /* outputs */
        :  /* inputs */
        :  /* clobbers */);

which GPRs can be placed in the clobber list?

It's extremely hard to say.  I know you must not clobber the stack pointer, you
probably must not clobber the frame pointer, and you probably must not clobber
the PIC register.  In practice, it is a good idea to leave the compiler at least
one general-purpose register.  Sorry to be so vague, but it depends on the exact
details the internal workings of reload, and that can change.  In practice, it
is better to give the compiler a few registers to make its lif easier.

Andrew.

[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