2022-08-30 04:40:31 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2024-02-27 16:17:51 +08:00
|
|
|
index 3857b82..4c68989 100644
|
2022-08-30 04:40:31 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2024-02-27 16:17:51 +08:00
|
|
|
@@ -221,8 +221,8 @@ endif()
|
|
|
|
|
2022-11-12 04:24:53 +08:00
|
|
|
# Set definitions and sources for MIPS.
|
2024-02-27 16:17:51 +08:00
|
|
|
if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
|
2022-08-30 04:40:31 +08:00
|
|
|
- set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
|
2022-11-12 04:24:53 +08:00
|
|
|
- set(PNG_MIPS_MSA "on"
|
2022-08-30 04:40:31 +08:00
|
|
|
+ set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check)
|
2022-11-12 04:24:53 +08:00
|
|
|
+ set(PNG_MIPS_MSA "check"
|
|
|
|
CACHE STRING "Enable MIPS_MSA optimizations: on|off; on is default")
|
|
|
|
set_property(CACHE PNG_MIPS_MSA
|
|
|
|
PROPERTY STRINGS ${PNG_MIPS_MSA_POSSIBLE_VALUES})
|
2024-02-27 16:17:51 +08:00
|
|
|
@@ -254,6 +254,12 @@ if(TARGET_ARCH MATCHES "^(mipsel|mips64el)")
|
2022-11-12 04:24:53 +08:00
|
|
|
mips/filter_msa_intrinsics.c)
|
2024-02-27 16:17:51 +08:00
|
|
|
add_definitions(-DPNG_MIPS_MSA_OPT=2)
|
|
|
|
add_definitions(-DPNG_MIPS_MMI_OPT=0)
|
|
|
|
+ elseif(PNG_MIPS_MSA STREQUAL "check")
|
|
|
|
+ set(libpng_mips_sources
|
|
|
|
+ mips/mips_init.c
|
|
|
|
+ mips/filter_msa_intrinsics.c)
|
|
|
|
+ add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED)
|
|
|
|
+ add_definitions(-DPNG_MIPS_MMI_CHECK_SUPPORTED)
|
|
|
|
elseif(PNG_MIPS_MMI STREQUAL "on")
|
|
|
|
set(libpng_mips_sources
|
|
|
|
mips/mips_init.c
|