[PATCH] MIPS: Optimize atomic memory operations for TARGET_OCTEON.
David Daney
ddaney@caviumnetworks.com
Tue Sep 29 21:23:00 GMT 2009
Richard Sandiford wrote:
> Richard Sandiford <rdsandiford@googlemail.com> writes:
>> David Daney <ddaney@caviumnetworks.com> writes:
>>> * gcc/config/mips/mips.c (mips_process_sync_loop) Emit syncw
>>> instructions for TARGET_OCTEON.
>> OK.
>>
>> Thanks for the great comment btw.
>
> Hmm, actually, I might have been too quick off the mark.
> __sync*_compare_and_swap are documented as being full barriers even
> in the case where no SC occurs, so I think you also need to check
> "required_oldval == 0".
Yes, unfortunately I think you are correct. Although most applications
probably don't care, we are stuck with the specification as written.
I will test a new patch.
David Daney
More information about the Gcc-patches
mailing list