[Bug inline-asm/87733] local register variable not honored with earlyclobber

bugdal at aerifal dot cx gcc-bugzilla@gcc.gnu.org
Sat Mar 14 20:18:09 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87733

--- Comment #24 from Rich Felker <bugdal at aerifal dot cx> ---
The reasons I was hesitant to force n to a particular register through an extra
register __asm__ temp var was that I was unsure how it would interact with the
"i" constraint (maybe prevent it from being used?) and that this is code that
needs to be inlined all over the place, and adding more specific-register
constraints usually hurts register allocation in all functions where it's used.

If the "0"(r2) input constraint seems unsafe to rely on with r2 being
uninitialized (is this a real concern I should have?) just writing 0 or n to r2
before the asm would only waste one instruction and shouldn't really hurt.


More information about the Gcc-bugs mailing list