From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id EDEEE3FD24 for ; Thu, 14 Nov 2002 01:51:52 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gAE6pqE14785 for axp-list@listman.redhat.com; Thu, 14 Nov 2002 01:51:52 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gAE6pqD14781 for ; Thu, 14 Nov 2002 01:51:52 -0500 Received: from are.twiddle.net (are.twiddle.net [64.81.246.98]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gAE6Saw27212 for ; Thu, 14 Nov 2002 01:28:36 -0500 Received: (from rth@localhost) by are.twiddle.net (8.11.6/8.11.6) id gAE6pom19609 for axp-list@redhat.com; Wed, 13 Nov 2002 22:51:50 -0800 Date: Wed, 13 Nov 2002 22:51:50 -0800 From: Richard Henderson To: axp-list@redhat.com Subject: Re: GCC inline ASM is 'evil' Message-ID: <20021113225150.D19573@twiddle.net> Mail-Followup-To: axp-list@redhat.com References: <871y5qpawp.fsf@student.uni-tuebingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <871y5qpawp.fsf@student.uni-tuebingen.de>; from falk.hueffner@student.uni-tuebingen.de on Wed, Nov 13, 2002 at 01:32:06AM +0100 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Wed, Nov 13, 2002 at 01:32:06AM +0100, Falk Hueffner wrote: > You probably want something like (untested): > > long tmp; > asm volatile( > "ldl_l %2,%1\n" > "addl %2,1,%0\n" > "stl_c %0,%1\n" > : "=r"(ret), "=m"(dest) > : "r"(tmp)); tmp needs to be an output as well, since it is modified. dest needs to be an input, since its old value isn't dead. asm volatile ( "ldl_l %2,%1\n" "addl %2,1,%0\n" "stl_c %0,%1\n" : "=r"(ret), "=m"(dest), "=r"(tmp) : "m"(dest)); r~