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 22 class CPUCapabilities { 23 public: 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 37 private: 38 uint32 capabilities; 39 40 void setIntelCapabilities(); 41 }; 42 43 #endif //__CPU_CAPABILITIES__ 44