From owner-freebsd-current Fri Nov 27 21:59:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA07139 for freebsd-current-outgoing; Fri, 27 Nov 1998 21:59:11 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id VAA07133 for ; Fri, 27 Nov 1998 21:59:10 -0800 (PST) (envelope-from toor@y.dyson.net) Received: (qmail 26272 invoked from network); 28 Nov 1998 05:59:02 -0000 Received: from dyson.iquest.net (HELO y.dyson.net) (198.70.144.127) by iquest3.iquest.net with SMTP; 28 Nov 1998 05:59:02 -0000 Received: (from root@localhost) by y.dyson.net (8.9.1/8.9.1) id AAA04288; Sat, 28 Nov 1998 00:59:01 -0500 (EST) Message-Id: <199811280559.AAA04288@y.dyson.net> Subject: Re: Fix for incorrect clobbers in asm's In-Reply-To: <199811280526.QAA22443@godzilla.zeta.org.au> from Bruce Evans at "Nov 28, 98 04:26:35 pm" To: bde@zeta.org.au (Bruce Evans) Date: Sat, 28 Nov 1998 00:59:01 -0500 (EST) Cc: current@FreeBSD.ORG, dyson@iquest.net From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans said: > > Rewritten using constraints: > > __asm __volatile("cld; rep; insb" > : "=D" (addr), "=c" (cnt) > : "0" (addr), "1" (cnt), "d" (port) > : "memory"); > > This discards the output operands in the input variables to avoid extra > local variables. This is harmless because the input variables are dead, > and more natural because it is normal for pointers to be incremented and > counts to be decremented. > Yes, your specific approach is better. However, the incorrect clobbers do need to be fixed, or compiling kernels with egcs will be forever a pain... -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message