57 lines
2.9 KiB
Diff
57 lines
2.9 KiB
Diff
|
--- a/CMakeLists.txt 2018-05-21 19:40:43.000000000 +0300
|
||
|
+++ b/CMakeLists.txt 2019-12-06 13:19:08.176033778 +0300
|
||
|
@@ -5,7 +5,7 @@
|
||
|
|
||
|
project(simplescreenrecorder VERSION 0.3.11)
|
||
|
|
||
|
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686")
|
||
|
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|i386|i686|e2k")
|
||
|
set(PROCESSOR_IS_X86 TRUE)
|
||
|
else()
|
||
|
set(PROCESSOR_IS_X86 FALSE)
|
||
|
--- a/src/common/CPUFeatures.cpp 2018-05-21 19:40:43.000000000 +0300
|
||
|
+++ b/src/common/CPUFeatures.cpp 2019-12-06 13:17:11.421400566 +0300
|
||
|
@@ -22,7 +22,7 @@
|
||
|
#include "Logger.h"
|
||
|
|
||
|
#if SSR_USE_X86_ASM
|
||
|
-
|
||
|
+#ifndef __e2k__
|
||
|
#include <cpuid.h>
|
||
|
|
||
|
//#define __cpuid(level, eax, ebx, ecx, edx) __asm__ __volatile__ ("cpuid" : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) : "a" (level))
|
||
|
@@ -72,5 +72,32 @@
|
||
|
|
||
|
Logger::LogInfo(str);
|
||
|
}
|
||
|
-
|
||
|
+#else //__e2k__
|
||
|
+bool CPUFeatures::s_mmx = false;
|
||
|
+bool CPUFeatures::s_sse = false;
|
||
|
+bool CPUFeatures::s_sse2 = false;
|
||
|
+bool CPUFeatures::s_sse3 = false;
|
||
|
+bool CPUFeatures::s_ssse3 = false;
|
||
|
+bool CPUFeatures::s_sse41 = false;
|
||
|
+bool CPUFeatures::s_sse42 = false;
|
||
|
+bool CPUFeatures::s_avx = false;
|
||
|
+bool CPUFeatures::s_avx2 = false;
|
||
|
+bool CPUFeatures::s_bmi1 = false;
|
||
|
+bool CPUFeatures::s_bmi2 = false;
|
||
|
+
|
||
|
+void CPUFeatures::Detect() {
|
||
|
+
|
||
|
+ QString str = "[CPUFeatures::Detect] " + Logger::tr("CPU features") + ":";
|
||
|
+ s_mmx = true; str += " mmx";
|
||
|
+ s_sse = true; str += " sse";
|
||
|
+ s_sse2 = true; str += " sse2";
|
||
|
+ s_sse3 = true; str += " sse3";
|
||
|
+ s_ssse3 = true; str += " ssse3";
|
||
|
+ s_sse41 = true; str += " sse4_1";
|
||
|
+ s_sse42 = true; str += " sse4_2";
|
||
|
+ s_avx = true; str += " avx";
|
||
|
+ s_bmi1 = true; str += " bmi1";
|
||
|
+ Logger::LogInfo(str);
|
||
|
+}
|
||
|
+#endif //__e2k__
|
||
|
#endif // SSR_USE_X86_ASM
|