source: trunk/include/cpuhlp.h@ 6552

Last change on this file since 6552 was 6242, checked in by sandervl, 24 years ago

* empty log message *

File size: 1.2 KB
Line 
1/* $Id: cpuhlp.h,v 1.6 2001-07-08 07:19:26 sandervl Exp $ */
2
3#ifndef _CPUHLP_H_
4#define _CPUHLP_H_
5
6#include <float.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#define BIT(a) (1<<a)
13
14#define CPUID_FPU_PRESENT BIT(0)
15#define CPUID_VMMODE_EXTENSIONS BIT(1)
16#define CPUID_DBG_EXTENSIONS BIT(2)
17#define CPUID_PAGE_SIZE_EXTENSIONS BIT(3)
18#define CPUID_TIME_STAMP_COUNTER BIT(4)
19#define CPUID_K86_MODEL_REGS BIT(5)
20#define CPUID_MACHINE_CHECK_EXCEPTION BIT(7)
21#define CPUID_CMPXCHG8B_INSTRUCTION BIT(8)
22#define CPUID_APIC BIT(9)
23#define CPUID_MEMORY_TYPE_RANGE_REGS BIT(12)
24#define CPUID_GLOBAL_PAGING_EXTENSIONS BIT(13)
25#define CPUID_CONDITIONAL_MOVE BIT(15)
26#define CPUID_MMX BIT(23)
27
28BOOL CDECL SupportsCPUID();
29
30void CDECL GetCPUVendorString(char *vendor);
31DWORD CDECL GetCPUFeatures();
32DWORD CDECL GetCPUSignature();
33void CDECL GetTSC(LONG *high, LONG *low);
34
35void InitSystemInfo(int nrcpus);
36
37extern DWORD CPUFeatures;
38
39#if (__IBMC__ >= 360) || (__IBMCPP__ >= 360)
40#define CONTROL87(a,b) __control87(a, b)
41#else
42#if (__IBMCPP__ == 300) || (__IBMC__ == 300)
43#define CONTROL87(a,b) _control87(a, b)
44#else
45#error CONTROL87 undefined
46#endif
47#endif
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* _CPUHLP_H_ */
54
Note: See TracBrowser for help on using the repository browser.