util: skip AltiVec detection if built with -maltivec

Helps platforms where runtime detection isn't implemented.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jan Beich <jbeich@FreeBSD.org>
This commit is contained in:
Jan Beich
2019-09-16 11:26:24 +00:00
committed by Matt Turner
parent 601a098338
commit 8d2dd1f4f3
+9 -1
View File
@@ -117,7 +117,15 @@ sigill_handler(int sig)
static void
check_os_altivec_support(void)
{
#if defined(PIPE_OS_APPLE)
#if defined(__ALTIVEC__)
util_cpu_caps.has_altivec = 1;
#endif
#if defined(__VSX__)
util_cpu_caps.has_vsx = 1;
#endif
#if defined(__ALTIVEC__) && defined(__VSX__)
/* Do nothing */
#elif defined(PIPE_OS_APPLE)
int sels[2] = {CTL_HW, HW_VECTORUNIT};
int has_vu = 0;
int len = sizeof (has_vu);