[PATCH] fix profiling
Tue Aug 5 14:04:00 GMT 2008
Brian Dessent wrote on 05 August 2008 06:28:
> Brian Dessent wrote:
>> Since this code is lifted from the BSDs I did check that this change was
>> made there as well, e.g.
Adding 'volatile' to asms that didn't need it could never do any harm,
anyway, apart from the minor missed-optimisation opportunities it implies,
but correctness is more important here!
> Actually, I also missed that the above version uses +r instead of =r for
> the second constraint. I guess we should make that change too.
I think that change is wrong. The register is written, not read; the
input value is not used. (The fact it is used as a source operand in the
second instruction doesn't matter, because it's not the input value being
used there but the previously-written value that just clobbered the input
value). It looks like a misunderstanding of what read-write means in terms
of gcc constraints.
Can't think of a witty .sigline today....
More information about the Cygwin-patches