Re: cpuid_eax damages registers (2.4.7pre7)

Linus Torvalds
2001-07-19T23:25:47Z

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