[patch committed SH] Add atomic patterns

Kaz Kojima kkojima@rr.iij4u.or.jp
Sun Dec 18 22:18:00 GMT 2011


Oleg Endo <oleg.endo@t-online.de> wrote:
> I know.  That's what I was actually doing.  Maybe I should have
> commented it, as it is not so obvious.  The aligns are placed in such a
> way, that label 1 will always end up being 4-byte aligned.

You are right.  I've misunderstood your changes.
Sorry for my mess.

> Having this in sync.md:
> 
> (define_code_attr fetchop_name
>   [(plus "add") (minus "sub") (ior "ior") (xor "xor") (and "and")])
> 
> 
> the following happens:
> 
> 
> int test (std::atomic<int>& val, int x)
> {
>   return val |= x;
> }
[snip]
> Changing "ior" to "or" in fetchop_name fixed that.

Ugh, I've read the middle end code wrongly.  Then we can remove
fetchop_insn which now becomes to be the same one with fetchop_name.
Could you propose the patch with that change and the backslash
changes rth suggested?  It's pre-approved with those changes.

Regards,
	kaz



More information about the Gcc-patches mailing list