Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Andrew MacLeod
On 11/02/2011 12:37 PM, Richard Henderson wrote: On 11/02/2011 09:30 AM, Andrew MacLeod wrote: it did in my simply trials as I figured this out in the debugger :-) i only did basic tests. OK, Is there a simple way to get to the def? You should know. You wrote most of that stuff. HA. years ago

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Richard Henderson
On 11/02/2011 09:30 AM, Andrew MacLeod wrote: > it did in my simply trials as I figured this out in the debugger :-) > i only did basic tests. OK, Is there a simple way to get to the def? You should know. You wrote most of that stuff. > what happens to the alignment of something if its say 'char

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Andrew MacLeod
On 11/02/2011 12:28 PM, Richard Henderson wrote: On 11/02/2011 07:59 AM, Andrew MacLeod wrote: + /* Parameters at this point are usually cast to void *, so check for that +and look past the cast. */ + if (TREE_CODE (arg1) == NOP_EXPR&& POINTER_TYPE_P (ttype) + && VO

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Richard Henderson
On 11/02/2011 07:59 AM, Andrew MacLeod wrote: > + /* Parameters at this point are usually cast to void *, so check for > that > + and look past the cast. */ > + if (TREE_CODE (arg1) == NOP_EXPR && POINTER_TYPE_P (ttype) > + && VOID_TYPE_P (TREE_TYPE (ttype))) > + ar

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Richard Henderson
On 11/02/2011 07:59 AM, Andrew MacLeod wrote: > gcc > * builtins.c (fold_builtin_atomic_always_lock_free): Add object param > and check alignment if present. > (expand_builtin_atomic_always_lock_free): Expect 2nd argument. > (fold_builtin_atomic_is_lock_free): Expect 2

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Andrew MacLeod
On 11/02/2011 11:22 AM, Richard Henderson wrote: On 11/02/2011 07:59 AM, Andrew MacLeod wrote: Simply adds an optional parameter to __atomic_{is_always}_lock_free which is used to check alignment against the size parameter. NULL as the object pointer produces the same behaviour as today, lockfre

Re: [cxx-mem-model] use alignment when available to determine lock-free ness

2011-11-02 Thread Richard Henderson
On 11/02/2011 07:59 AM, Andrew MacLeod wrote: > Simply adds an optional parameter to __atomic_{is_always}_lock_free > which is used to check alignment against the size parameter. NULL as > the object pointer produces the same behaviour as today, lockfreeness > based on proper alignment for an integ