1/* 2 * Copyright (C) 2009 David McPaul 3 * 4 * All rights reserved. Distributed under the terms of the MIT License. 5 */ 6#ifndef __CPU_CAPABILITIES__ 7#define __CPU_CAPABILITIES__ 8 9 10#include <SupportDefs.h> 11 12 13#define CAPABILITY_MMX 1 14#define CAPABILITY_SSE1 2 15#define CAPABILITY_SSE2 3 16#define CAPABILITY_SSE3 4 17#define CAPABILITY_SSSE3 5 18#define CAPABILITY_SSE41 6 19#define CAPABILITY_SSE42 7 20 21 22class CPUCapabilities { 23public: 24 CPUCapabilities(); 25 ~CPUCapabilities(); 26 27 bool HasMMX(); 28 bool HasSSE1(); 29 bool HasSSE2(); 30 bool HasSSE3(); 31 bool HasSSSE3(); 32 bool HasSSE41(); 33 bool HasSSE42(); 34 35 void PrintCapabilities(); 36 37private: 38#if defined(__i386__) || defined(__x86_64__) 39 void _SetIntelCapabilities(); 40#endif // __i386__ || __x86_64__ 41 42 uint32 fCapabilities; 43}; 44 45#endif //__CPU_CAPABILITIES__ 46