On 08/12/2011 07:05 PM, Richard Henderson wrote:
On 08/11/2011 02:42 PM, Andrew MacLeod wrote:
The names for the previous set implies the fetch is done before the
operation, so the new ones simply drop the fetch and simply use the
operation name. I found sync_mem_op_fetch slightly less clear.
Really? I guess I'm pretty used to that, and it also makes it
abundantly clear what the difference between s_m_fetch_add and
s_m_add really is.
On balance I think we're better off sticking closer to the
original __sync_{fetch_op,op_fetch} names.
Does anyone else have an opinion on this naming?
Otherwise the patch looks ok.
Actually, I think I will change the names. I discovered as i was
delving deeper that the rtl sync_ patterns are set up differently as
well. the actually builtins are more explicit, and they specify it more
clearly... To match them, I will change them to :
__sync_mem_fetch_and_add
__sync_mem_add_and_fetch
At some point in the future when everything is working and there are
less pressing issues, I will attempt to consolidate everything in some
consistent fashion.
Andrew