intrinsics: add lsx/lasx intrinsic headers when not disabled
__attribute__((target(xx))) is not supported by LoongArch64. The following warning is emitted: target attribute is not supported on this machine [-Wattributes]
This commit is contained in:
@@ -966,7 +966,6 @@ if(SDL_ASSEMBLY)
|
|||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
|
|
||||||
if(COMPILER_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
|
if(COMPILER_SUPPORTS_LSX AND HAVE_LSXINTRIN_H)
|
||||||
target_compile_options(sdl-build-options INTERFACE "-mlsx")
|
|
||||||
set(HAVE_LSX TRUE)
|
set(HAVE_LSX TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -982,7 +981,6 @@ if(SDL_ASSEMBLY)
|
|||||||
check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
|
check_include_file("lasxintrin.h" HAVE_LASXINTRIN_H)
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
if(COMPILER_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
|
if(COMPILER_SUPPORTS_LASX AND HAVE_LASXINTRIN_H)
|
||||||
target_compile_options(sdl-build-options INTERFACE "-mlasx")
|
|
||||||
set(HAVE_LASX TRUE)
|
set(HAVE_LASX TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -99,14 +99,15 @@ _m_prefetch(void *__P)
|
|||||||
# define SDL_TARGETING(x)
|
# define SDL_TARGETING(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX)
|
#if defined(__loongarch64)
|
||||||
# define SDL_LSX_INTRINSICS 1
|
# ifndef SDL_DISABLE_LSX
|
||||||
# include <lsxintrin.h>
|
# define SDL_LSX_INTRINSICS 1
|
||||||
#endif
|
# include <lsxintrin.h>
|
||||||
|
# endif
|
||||||
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX)
|
# ifndef SDL_DISABLE_LASX
|
||||||
# define SDL_LASX_INTRINSICS 1
|
# define SDL_LASX_INTRINSICS 1
|
||||||
# include <lasxintrin.h>
|
# include <lasxintrin.h>
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86)
|
||||||
|
|||||||
Reference in New Issue
Block a user