mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
[AArch64] Add missing "+i8mm" feature when building SME
FEAT_I8MM is not unconditionally enabled with -march=armv9-a since it only becomes mandatory from Armv9.1-A, so explicitly specify it in both BUILD.gn and CMakeLists.txt. Also flip the order of +sve2+i8mm => +i8mm+sve2 to match occurrences elsewhere. Change-Id: I8c37580d3718f380b772cdb726d8c30bcd5b9e2c Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6656718 Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
parent
6f729fbe65
commit
1724c4be72
4
BUILD.gn
4
BUILD.gn
@ -254,7 +254,7 @@ if (libyuv_use_sve) {
|
|||||||
public_configs = [ ":libyuv_config" ]
|
public_configs = [ ":libyuv_config" ]
|
||||||
|
|
||||||
# SVE2 is an Armv9-A feature.
|
# SVE2 is an Armv9-A feature.
|
||||||
cflags = [ "-march=armv9-a+sve2+i8mm" ]
|
cflags = [ "-march=armv9-a+i8mm+sve2" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ if (libyuv_use_sme) {
|
|||||||
public_configs = [ ":libyuv_config" ]
|
public_configs = [ ":libyuv_config" ]
|
||||||
|
|
||||||
# SME is an Armv9-A feature.
|
# SME is an Armv9-A feature.
|
||||||
cflags = [ "-march=armv9-a+sme" ]
|
cflags = [ "-march=armv9-a+i8mm+sme" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@ if(NOT MSVC)
|
|||||||
|
|
||||||
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||||
set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})
|
set(OLD_CMAKE_TRY_COMPILE_TARGET_TYPE ${CMAKE_TRY_COMPILE_TARGET_TYPE})
|
||||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+sme")
|
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -march=armv9-a+i8mm+sme")
|
||||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
# Check whether the compiler can compile SME functions; this fails
|
# Check whether the compiler can compile SME functions; this fails
|
||||||
# with Clang for Windows.
|
# with Clang for Windows.
|
||||||
@ -140,7 +140,7 @@ int main(void) { return 0; }
|
|||||||
${ly_src_dir}/rotate_sme.cc
|
${ly_src_dir}/rotate_sme.cc
|
||||||
${ly_src_dir}/row_sme.cc
|
${ly_src_dir}/row_sme.cc
|
||||||
${ly_src_dir}/scale_sme.cc)
|
${ly_src_dir}/scale_sme.cc)
|
||||||
target_compile_options(${ly_lib_name}_sme PRIVATE -march=armv9-a+sme)
|
target_compile_options(${ly_lib_name}_sme PRIVATE -march=armv9-a+i8mm+sme)
|
||||||
list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_sme>)
|
list(APPEND ly_lib_parts $<TARGET_OBJECTS:${ly_lib_name}_sme>)
|
||||||
else()
|
else()
|
||||||
add_definitions(-DLIBYUV_DISABLE_SME)
|
add_definitions(-DLIBYUV_DISABLE_SME)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user