On 06/23/2011 03:50 PM, Andrew MacLeod wrote:
> + (define_expand "sync_mem_load"
> + [(match_operand:SWI 0 "register_operand" "") ;; output
> +(match_operand:SWI 1 "memory_operand" "");; memory
> +(match_operand:SI 2 "const_int_operand" "")];; memory model
>
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 D
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 crea