Re: cpuid_eax damages registers (2.4.7pre7)

H. Peter Anvin (hpa@transmeta.com)
Thu, 19 Jul 2001 16:02:46 -0700


Julian Anastasov wrote:
>
> Hello,
>
> On Thu, 19 Jul 2001, H. Peter Anvin wrote:
>
> > Julian Anastasov wrote:
> > >
> > > What I want to say (I could be wrong and that can't surprise me) is
> > > that the original cpuid_eax is in fact incorrect. All cpuid_XXX funcs
> > > use only dummy output operands...
> > >
> >
> > Bullsh*t. One of the output operands is always a non-dummy (in
> > cpuid_edx() edx is not a dummy, for example.)
>
> Right, and it is may be not damaged. In my first posting I
> claim that cpuid_eax damages ebx (and may be ecx and edx).
>

Doesn't matter. gcc can't pick and choose what *effects* of an asm()
statement it wants to happen -- this should be utterly obvious to
anyone. As the old saying goes, you can't be half pregnant.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/