[python-win32] Still looking for a method to get CPUID info ...

Tim Roberts timr at probo.com
Fri Jan 8 19:04:39 CET 2010


Gertjan Klein wrote:
> Tim Roberts wrote
>> However, I'll bet I know what it is.  CPUID trashes ebx, and in the x86
>> calling sequence, that's supposed to be saved and restored.
>>     
>
> That's it! Now, both Python 2.5 and 2.6 (and 3.1, if I change the print
> statement) run this code successfully. Does that mean there is a
> difference in calling sequence between Python 2.5 and 2.6? Or do they
> have different expectations of which registers are left untouched?
>   

This could be something as obscure as different compilers, or even
different optimization settings.  The generated code in 2.5 happened to
store something in ebx and expected it to survive across the API call (a
reasonable expectation!).  The generated code in 2.6 did not.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list