Date: Thu, 13 Dec 2001 16:17:31 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: current@FreeBSD.org, Bruce Evans <bde@zeta.org.au> Subject: Re: Patch Review: i386 asm cleanups in the kernel Message-ID: <XFMail.011213161731.jhb@FreeBSD.org> In-Reply-To: <XFMail.011213112756.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011213161731.jhb>