From: Chris Young Date: Fri, 18 Nov 2016 19:03:28 +0000 (+0000) Subject: Detect AltiVec support on AmigaOS 4 X-Git-Tag: 1.5.2~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ad94b2963268ea57a77dcd8af8a9a6fe5db70a7;p=libjpeg-turbo Detect AltiVec support on AmigaOS 4 --- diff --git a/simd/jsimd_powerpc.c b/simd/jsimd_powerpc.c index 42dc1e0..f447bf6 100644 --- a/simd/jsimd_powerpc.c +++ b/simd/jsimd_powerpc.c @@ -14,6 +14,11 @@ * PowerPC architecture. */ +#ifdef __amigaos4__ +/* This must be defined first as it re-defines GLOBAL otherwise */ +#include +#endif + #define JPEG_INTERNALS #include "../jinclude.h" #include "../jpeglib.h" @@ -116,6 +121,11 @@ init_simd (void) if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT) break; } +#elif defined(__amigaos4__) + uint32 altivec = 0; + IExec->GetCPUInfoTags(GCIT_VectorUnit, &altivec, TAG_DONE); + if(altivec == VECTORTYPE_ALTIVEC) + simd_support |= JSIMD_ALTIVEC; #endif /* Force different settings through environment variables */