apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject Re: cvs commit: apr/atomic/unix apr_atomic.c
Date Tue, 16 Dec 2003 15:10:09 GMT
jorton@apache.org wrote:

>   Review of x86 asm, fixing intel_atomic_add32 with gcc 2.7.2.1 which
>   doesn't allow the '+' constraint on an output operand.

oops, thanks for catching that.  I should have read the older gcc doc.

>        asm volatile ("lock; xaddl %0,%1"
>   -                  : "+r"(val), "+m"(*mem) /* outputs and inputs */
>   -                  :
>   -                  : "memory");            /*XXX is this needed?  it knows that
>   -                                                *mem is an output */
>   +                  : "=r"(val), "=m"(*mem) /* outputs */
>   +                  : "0"(val), "m"(*mem)   /* inputs */
>   +                  : "memory", "cc");

so listing *mem as an output isn't sufficient to tell gcc that this specific 
memory variable is updated?

Greg


Mime
View raw message