Re: [cxx-mem-model] __sync_mem_load

2011-06-29 Thread Richard Henderson
On 06/23/2011 03:50 PM, Andrew MacLeod wrote: * doc/extend.texi (__sync_mem_load): Document. * c-family/c-common.c (resolve_overloaded_builtin): Add BUILT_IN_SYNC_MEM_LOAD_N. * optabs.c (expand_sync_mem_load): New. * optabs.h (enum direct_optab_index): Add

Re: [cxx-mem-model] __sync_mem_load

2011-06-29 Thread Richard Henderson
On 06/23/2011 03:50 PM, Andrew MacLeod wrote: + (define_expand sync_mem_loadmode + [(match_operand:SWI 0 register_operand ) ;; output +(match_operand:SWI 1 memory_operand );; memory +(match_operand:SI 2 const_int_operand )];; memory model + + { +

[cxx-mem-model] __sync_mem_load

2011-06-23 Thread Andrew MacLeod
Here's the patch for __sync_mem_load, complete with tests. I'll change and correct the actual implementation of the load pattern later ( I think I have the x86 fence wrong). It occurs to me that if I implement the __sync_mem_thread_fence (model) routine, then the appropriate fences can be