apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject cvs commit: apr/atomic/unix apr_atomic.c
Date Fri, 05 Dec 2003 20:15:33 GMT
gregames    2003/12/05 12:15:33

  Modified:    atomic/unix apr_atomic.c
  Log:
  intel_atomic_add32: re-specify asm inputs and outputs, after RTFMing and
  Googling
  
  Revision  Changes    Path
  1.33      +5 -4      apr/atomic/unix/apr_atomic.c
  
  Index: apr_atomic.c
  ===================================================================
  RCS file: /home/cvs/apr/atomic/unix/apr_atomic.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -d -b -u -r1.32 -r1.33
  --- apr_atomic.c	5 Dec 2003 18:57:21 -0000	1.32
  +++ apr_atomic.c	5 Dec 2003 20:15:32 -0000	1.33
  @@ -108,10 +108,11 @@
   static apr_uint32_t inline intel_atomic_add32(volatile apr_uint32_t *mem, 
                                                 apr_uint32_t val)
   {
  -    asm volatile ("lock; xaddl %1, (%2)"                              
  -                  : "=r"(val)          /* output, same as 1st input */
  -                  : "0"(val), "r"(mem) /* inputs */
  -                  : "%1","memory");    /* tell gcc they are clobbered */
  +    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 */
       return val;
   }
   
  
  
  

Mime
View raw message