Re: [AD] Two patches for test.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Evert Glebbeek wrote:
Attached are two patches for the test programme. The first for reporting
the new CPU capabilities added by AJ, the second for reporting if the
system has a hardware mouse cursor.
There's a problem with the CPU capabilities though. The detection for AMD64
and IA64 depends on the CPUID instruction. However, on AMD64 Allegro is
compiled without inline assembler code (at least in Linux), so the CPUID
instruction is never used and the processor type is in fact unknown. I
don't see an easy way around this at the moment. Any suggestions?
With hindsight, I also think the cpu_capabilities flag is probably
inappropriate for this task and it would have been better to somehow use
the cpu_family and cpu_model variables. Thoughts?
couldn't hurt to use both.
i use inline asm in MSVC7 to call the CPUID instruction.
i have a AMD64, on Win32XPsp1.
i use it to get cache info also.
eg...
CPU Cache Level 1: 128k
CPU Cache Level 2: 512k
CPU Cache Line size: 64 bytes