diff options
| author | hrydgard <hrydgard@gmail.com> | 2011-01-26 21:27:26 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2011-01-26 21:27:26 +0000 |
| commit | 48b7658c8aa49f5567dce0d4b0699761e206400c (patch) | |
| tree | 0e77ad8665b3869fbc92e9df9123e096aa2c4fd8 /Source/Core/Common/Src/CPUDetect.cpp | |
| parent | d7e877bb0badda5ad50fc2c6f54eda32d4e58ec1 (diff) | |
Detect cpu features AVX and AES, both are present on Sandy Bridge. For future use :P
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6925 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 6db24026c6..195ffba249 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -144,10 +144,12 @@ void CPUInfo::Detect() } if ((cpu_id[3] >> 25) & 1) bSSE = true; if ((cpu_id[3] >> 26) & 1) bSSE2 = true; - if (cpu_id[2] & 1) bSSE3 = true; - if ((cpu_id[2] >> 9) & 1) bSSSE3 = true; + if ((cpu_id[2]) & 1) bSSE3 = true; + if ((cpu_id[2] >> 9) & 1) bSSSE3 = true; if ((cpu_id[2] >> 19) & 1) bSSE4_1 = true; if ((cpu_id[2] >> 20) & 1) bSSE4_2 = true; + if ((cpu_id[2] >> 29) & 1) bAVX = true; + if ((cpu_id[2] >> 25) & 1) bAES = true; } if (max_ex_fn >= 0x80000004) { // Extract brand string @@ -208,6 +210,8 @@ std::string CPUInfo::Summarize() if (bSSSE3) sum += ", SSSE3"; if (bSSE4_1) sum += ", SSE4.1"; if (bSSE4_2) sum += ", SSE4.2"; + if (bAVX) sum += ", AVX"; + if (bAES) sum += ", AES"; if (bLongMode) sum += ", 64-bit support"; return sum; } |
