Re: cpuid_eax damages registers (2.4.7pre7)

H. Peter Anvin
2001-07-19T23:03:15Z

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