use sse2neon for aarch64 performance improvements
This commit is contained in:
@@ -107,7 +107,12 @@ set(SCALE_DUMMY_SOURCES
|
||||
scale_dummy.cxx)
|
||||
|
||||
if(COMPILER_SUPPORTS_SSE2)
|
||||
set_source_files_properties(${SSE2_SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -msse2)
|
||||
if(COMPILER_ARM)
|
||||
# This is for Graviton2, adjust for other CPUs: -march=armv8-a+crc+crypto
|
||||
set_source_files_properties(${SSE2_SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -march=armv8.2-a+fp16+rcpc+dotprod+crypto)
|
||||
else()
|
||||
set_source_files_properties(${SSE2_SOURCES} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -msse2)
|
||||
endif()
|
||||
set(RFB_SOURCES
|
||||
${RFB_SOURCES}
|
||||
${SSE2_SOURCES}
|
||||
|
||||
@@ -51,7 +51,9 @@ namespace rfb {
|
||||
|
||||
bool supportsSSE2() {
|
||||
getcpuid();
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
#if defined(__aarch64__)
|
||||
return true;
|
||||
#elif defined(__x86_64__) || defined(__i386__)
|
||||
#define bit_SSE2 (1 << 26)
|
||||
return cpuid[3] & bit_SSE2;
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,11 @@
|
||||
* USA.
|
||||
*/
|
||||
|
||||
#ifdef __aarch64__
|
||||
#include "sse2neon.h"
|
||||
#else
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
#include <rfb/scale_sse2.h>
|
||||
|
||||
|
||||
8776
common/rfb/sse2neon.h
Normal file
8776
common/rfb/sse2neon.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user