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 <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message