Re: clobber list in inline assembly for calls

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

 



Daniel Mierswa <impulze@xxxxxxxxxxx> writes:

> On 08.01.2011 05:50, Ian Lance Taylor wrote:
>> You are correct: you have to list all the caller-saved registers in the
>> clobber list.  On 32-bit x86 this is all the registers other than %ebp,
>> %ebx, %edi and %esi.
>> 
>> Ian
>
> If I'm not mistaken that should leave eax, ecx and edx. What about "cc"
> and "memory" though?

Good point, yes, you should add an explicit "memory" clobber.  You don't
need to explicitly clobber "cc".  That is a fixed register (actually gcc
calls it "flags") and as such gcc won't make any particular assumptions
about it in any case.

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