[Patch] MIPS: Fix PR33479 Broken atomic memory primitives.

David Daney ddaney@avtrex.com
Tue Sep 25 08:15:00 GMT 2007


Richard Sandiford wrote:
> David Daney <ddaney@avtrex.com> writes:
>   
>>> This is fine if it's the way we decide to go.  
>>>       
>> Playing devil's advocate:  If the R10000 is the only CPU that requires 
>> Branch Likely for atomic memory primitives, *and* R10000 is currently 
>> not supported by GCC, then we could get rid of the Branch Likely 
>> handling part of this patch and just fix the missing 'sync' and 
>> early-clobber.
>>     
>
> FWIW, that's fine from my POV.  Fixing the sync and earlyclobber
> would be strict progress, and we can always revisit the branch-likely
> stuff later.
>
> Richard
>   
How about this version?

Currently testing on mipsel-linux-gnu.
2007-09-22  David Daney  <ddaney@avtrex.com>

    PR target/33479
    * config/mips/mips.md (sync_compare_and_swap<mode>, sync_old_add<mode>,
    sync_new_add<mode>, sync_old_<optab><mode>, sync_new_<optab><mode>,
    sync_old_nand<mode>, sync_new_nand<mode>,
    sync_lock_test_and_set<mode>): Fix '&' constraint modifiers.
    Update length attributes.
    (sync_add<mode>, sync_sub<mode>, sync_old_sub<mode>,
    sync_new_sub<mode>, sync_<optab><mode>, sync_nand<mode>): Update
    length attributes.
    * config/mips/mips.h (MIPS_COMPARE_AND_SWAP, MIPS_SYNC_OP,
    MIPS_SYNC_OLD_OP, MIPS_SYNC_NEW_OP, MIPS_SYNC_NAND,
    MIPS_SYNC_OLD_NAND, MIPS_SYNC_NEW_NAND, MIPS_SYNC_EXCHANGE): Rewrite.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33479.diff
Type: text/x-patch
Size: 8024 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070925/efa00677/attachment.bin>


More information about the Gcc-patches mailing list