]> granicus.if.org Git - libjpeg-turbo/commitdiff
Enable DSPr2 SIMD extensions if CPU type is mipsel
authorRosen Penev <rosenp@gmail.com>
Wed, 5 Sep 2018 02:17:58 +0000 (19:17 -0700)
committerDRC <information@virtualgl.org>
Wed, 5 Sep 2018 02:17:58 +0000 (21:17 -0500)
The DSPr2 extensions have been verified to work with little endian MIPS.
Whether or not CMAKE_SYSTEM_PROCESSOR is set to "mips" or "mipsel" in a
little endian MIPS environment seems to be inconsistent, but our build
system needs to handle both cases.

simd/CMakeLists.txt

index 346994cbfde0a2bb9000c74265e67a6ec51c02ab..8dbd7f1ecbe459fc009c1d55c8e50357e91e5978 100755 (executable)
@@ -262,7 +262,7 @@ endif()
 # MIPS (GAS)
 ###############################################################################
 
-elseif(CPU_TYPE STREQUAL "mips")
+elseif(CPU_TYPE STREQUAL "mips" OR CPU_TYPE STREQUAL "mipsel")
 
 enable_language(ASM)
 
@@ -293,7 +293,7 @@ if(NOT HAVE_DSPR2)
   return()
 endif()
 
-add_library(simd OBJECT ${CPU_TYPE}/jsimd_dspr2.S ${CPU_TYPE}/jsimd.c)
+add_library(simd OBJECT mips/jsimd_dspr2.S mips/jsimd.c)
 
 if(CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED)
   set_target_properties(simd PROPERTIES POSITION_INDEPENDENT_CODE 1)