This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] MIPS: Optimize atomic memory operations for TARGET_OCTEON.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: David Daney <ddaney at caviumnetworks dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 01 Oct 2009 06:39:57 +0100
- Subject: Re: [PATCH] MIPS: Optimize atomic memory operations for TARGET_OCTEON.
- References: <4AC24048.4070706@caviumnetworks.com> <877hvh34y8.fsf@firetop.home> <873a6534j1.fsf@firetop.home> <4AC3D046.6060203@caviumnetworks.com>
David Daney <ddaney@caviumnetworks.com> writes:
> 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".
>>
>
> OK, what do you think of this version then?
>
> Tested on mips64-unknown-linux-gnu --with-float=soft --with-arch=octeon
> all default languages and
> RUNTESTFLAGS="--target_board=unix/\{,-mabi=64\}" with no regressions.
>
> OK to commit?
Yeah, looks good, thanks.
Richard