From owner-freebsd-current Thu Dec 13 16:17:40 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id DB86C37B417 for ; Thu, 13 Dec 2001 16:17:36 -0800 (PST) Received: (qmail 24809 invoked from network); 14 Dec 2001 00:17:36 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Dec 2001 00:17:36 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 13 Dec 2001 16:17:31 -0800 (PST) From: John Baldwin To: John Baldwin Subject: Re: Patch Review: i386 asm cleanups in the kernel Cc: current@FreeBSD.org, Bruce Evans Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 13-Dec-01 John Baldwin wrote: >>> static void >>> do_cpuid(u_int ax, u_int *p) >>> { >>> + >>> + p[0] = ax; >>> __asm __volatile( >>> "cpuid" >>> - : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) >>> - : "0" (ax) >>> + : "+a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) >>> ); >>> } >>> >> >> "0" here was bogus. Just replace it by "a". > > So use "a" twice and gcc will get that right? gcc30 chokes on it: ../../../i386/i386/identcpu.c: In function `do_cpuid': ../../../i386/i386/identcpu.c:119: Can't find a register in class `AREG' while reloading `asm'. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message