Re: cpuid_eax damages registers (2.4.7pre7)

Linus Torvalds (torvalds@transmeta.com)
Thu, 19 Jul 2001 16:24:09 -0700 (PDT)


On Fri, 20 Jul 2001, Julian Anastasov wrote:
>
> My understanding was that eax, ... edx are declared as
> local vars and so their values can't be used out of the current
> function scope, even when they are defined in inline func.

Yes, but notice how we return a value.

And the only way to get that value is to execute the cpuid. So obviously
gcc can't drop the cpuid. And if it cannot drop it, it cannot ignore the
fact that cpuid changes all the registers we say it changes.

Linus

-
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/