From dev-return-10781-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Tue Dec 16 15:12:17 2003 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 75099 invoked from network); 16 Dec 2003 15:12:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Dec 2003 15:12:16 -0000 Received: (qmail 59329 invoked by uid 500); 16 Dec 2003 15:12:11 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 59264 invoked by uid 500); 16 Dec 2003 15:12:11 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 59231 invoked from network); 16 Dec 2003 15:12:10 -0000 Message-ID: <3FDF2051.8010104@apache.org> Date: Tue, 16 Dec 2003 10:10:09 -0500 From: gregames@apache.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en MIME-Version: 1.0 To: dev@apr.apache.org CC: David Howells Subject: Re: cvs commit: apr/atomic/unix apr_atomic.c References: <20031216105717.45022.qmail@minotaur.apache.org> In-Reply-To: <20031216105717.45022.qmail@minotaur.apache.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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