Better cpuid support

Robert Lunnon bobl at optushome.com.au
Mon Jan 12 21:06:20 CST 2004


Improves CPUID instruction support in cpu.c by reorganising the existing 
FREEBSD code. Added more robust cpuid detection with built in 386 detection. 
Code should work for all i386 platforms and has been tested under solaris. 
Created subroutines for detecting number of CPUs and OS SSE support as this 
can't be done in a uniform way across different OSes. Extracted relevant code 
from each section to perform these OS specific operations (Mostly untested).

Both NetBSD and linux could could use cpuid instruction method now to permit 
considerable removal of redundant code. This hasn't been done yet since test 
facilities are only available under Solaris. I would appreciate testing of 
the code under linux and the BSDs. 

Changelog:
Support for general cpuid detection on all _i386_ platforms
Isolated OS specifics to subroutines

attached, cpuid.h cpu.c.diff


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuid.h
Type: text/x-chdr
Size: 2491 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040113/9020396d/cpuid.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpu.c.diff
Type: text/x-diff
Size: 10265 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040113/9020396d/cpu.c.bin


More information about the wine-patches mailing list