x87 register clobber returns "unknown register name" error

Hadrien Grasland hadrien.grasland@gmail.com
Mon Jan 4 20:55:00 GMT 2016

Hi Bernd,

Thanks for the tip, and sorry for my late reply. I have been moving and 
lost internet connectivity for a while.

If the "st" clobber provides no details regarding which stack registers 
will be used, does it mean that the GCC register allocator has no way to 
know how many stack registers are needed and must invalidate all x87 
registers in order to take the safe route ?

In any case, if this is the proper syntax, the GCC manual should perhaps 
be modified, as in the last example of its section "x86 
Floating-Point asm Operands" (bottom of 
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html ) it suggests that 
st(x) can be used as a clobber.


Le 11/12/2015 09:07, Bernd Edlinger a écrit :
> Hi Hadrien,
>>     asm volatile ("fstps (%1)" :
>>                   : // No output
>>                   "t" (input), "r" (output) :
>>                   "memory", "st(0)");
> st(0) may work in assembler, but in the clobber section you must write "st".
> Regards
> Bernd.

More information about the Gcc-help mailing list