summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-11-18 18:46:20 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2016-11-18 18:46:20 (GMT)
commit51ba0d354c750b4bb22e2d368e3893da566ea171 (patch)
tree6dd5690d48e4a2e2fb88608a21d22e4fda89d718
parent6312bef92f2f68c8d058334afb0012c48422bcdc (diff)
downloadtoolchains-51ba0d354c750b4bb22e2d368e3893da566ea171.tar.gz
toolchains-51ba0d354c750b4bb22e2d368e3893da566ea171.tar.bz2
Move detection of Altivec into libjpeg-turbo
This has also been submitted as a patch upstream: https://github.com/libjpeg-turbo/libjpeg-turbo/pull/118
-rw-r--r--sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p26
1 files changed, 26 insertions, 0 deletions
diff --git a/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p b/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p
new file mode 100644
index 0000000..4220c5d
--- a/dev/null
+++ b/sdk/recipes/patches/libjpegturbo/ppc-amigaos/simd.jsimd_powerpc.c.p
@@ -0,0 +1,26 @@
+--- simd/jsimd_powerpc.c
++++ simd/jsimd_powerpc.c
+@@ -14,6 +14,10 @@
+ * PowerPC architecture.
+ */
+
++#ifdef __amigaos4__
++#include <proto/exec.h>
++#endif
++
+ #define JPEG_INTERNALS
+ #include "../jinclude.h"
+ #include "../jpeglib.h"
+@@ -116,6 +120,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 */
+