[Patch] 2/2 MIPS atomic memory operations.
Richard Sandiford
richard@codesourcery.com
Mon Sep 3 15:35:00 GMT 2007
Maxim Kuvyrkov <maxim@codesourcery.com> writes:
> David Daney wrote:
>> This patch adds atomic memory operation for MIPS. It depends on part 1
>> of the patch which is a change to the generic expanders.
>>
>> In:
>> http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01128.html
>>
>> Richard essentially pre-approved this, but I wanted to post it again
>> because of how it interacts with the changes I want to make to
>> expand_sync_operation() and expand_sync_fetch_operation().
>>
>> Tested on mips64-linux.
>>
>> OK to commit if the first part is approved?
>>
>> gcc/
>>
>> 2007-08-20 David Daney <ddaney@avtrex.com>
>>
>> * config/mips/mips.md (UNSPEC_COMPARE_AND_SWAP, UNSPEC_SYNC_OLD_OP,
>> UNSPEC_SYNC_NEW_OP, UNSPEC_SYNC_EXCHANGE): New define_constants.
>> (optab, insn): Add more attributes.
>> (fetchop_bit): New code macro.
>
> Hi David,
>
> Recently define_{mode, code}_macro were ranamed to define_{mode,
> code}_iterator. Hence your patch broke mips on the trunk. Can you
> please fix it?
Thanks for the heads-up. I've committed this fix on David's behalf.
For future reference, it's perfectly OK (indeed quite helpful ;))
for the first person who finds something like this to commit
the fix as obvious.
Richard
gcc/
* config/mips/mips.md (fetchop_bit): Use define_code_iterator
rather than define_code_macro.
Index: gcc/config/mips/mips.md
===================================================================
--- gcc/config/mips/mips.md (revision 128038)
+++ gcc/config/mips/mips.md (working copy)
@@ -609,7 +609,7 @@ (define_code_attr swapped_fcond [(ge "le
(ungt "ult")])
;; Atomic fetch bitwise operations.
-(define_code_macro fetchop_bit [ior xor and])
+(define_code_iterator fetchop_bit [ior xor and])
;; <immediate_insn> expands to the name of the insn that implements
;; a particular code to operate in immediate values.
More information about the Gcc-patches
mailing list