Incorrect asm constraints or GCC bug?
Florian Weimer
fweimer@redhat.com
Mon Nov 19 11:56:00 GMT 2012
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
More information about the Gcc-help
mailing list