Re: [cxx-mem-model] Change library call for __atomic_op_fetch routines

2011-10-26 Thread Andrew MacLeod
On 10/26/2011 01:19 PM, Richard Henderson wrote: !resolved to an instriction sequence. */ instruction no no, its a mashup of restricted instruction. ok, maybe not. ! gcc_assert (TREE_OPERAND (addr, 0) == fndecl); ! TREE_OPERAND (addr, 0) = builtin_decl_explicit(ext_call); I do

Re: [cxx-mem-model] Change library call for __atomic_op_fetch routines

2011-10-26 Thread Richard Henderson
On 10/26/2011 10:25 AM, Andrew MacLeod wrote: hum. I suppose that wouldn't hurt. I don't think it should make any difference since Im not modifying whats in the table, but I can give it a shot. If it bootstraps, which I presume it will, I'll check it in with the original decl replaced. The

Re: [cxx-mem-model] Change library call for __atomic_op_fetch routines

2011-10-26 Thread Richard Henderson
On 10/25/2011 06:45 PM, Andrew MacLeod wrote: * builtins.c (expand_builtin_atomic_fetch_op): External calls for 'op_fetch' builtins need to instead call 'fetch_op' externals and issue correction code. (expand_builtin): Provide proper builtin name for external call and

[cxx-mem-model] Change library call for __atomic_op_fetch routines

2011-10-25 Thread Andrew MacLeod
The external library only provides the __atomic_fetch_{add,sub,and,or,xor,nand} routines, which fetch the value in memory before the operation is performed. It does not provide the alternate operation which fetches the value after the operation (it is trivial to calculate). If the