Re: Incorrect asm constraints or GCC bug?

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

 



On 11/19/2012 12:44 PM, Andrew Haley wrote:
On 11/19/2012 11:28 AM, Florian Weimer wrote:
Note how %0 and %3 are assigned the same register.  Changing "=r" to
"+r" fixes this.  If an output-only operand must be modified last, the
original register assignment would be correct, but the Extended Asm
documentation does not require such a thing.

It does.

"Unless an output operand has the `&' constraint modifier, GCC may
allocate it in the same register as an unrelated input operand, on the
assumption the inputs are consumed before the outputs are produced."

Oh, thanks, that settles it. I've submitted a fix for OpenSSL. (This was a recent regression on their part.)

--
Florian Weimer / Red Hat Product Security Team


[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