Detect AltiVec support on AmigaOS 4

This commit is contained in:
Chris Young
2016-11-18 19:03:28 +00:00
committed by DRC
parent 2d4b2f14d0
commit 4ad94b2963

View File

@@ -14,6 +14,11 @@
* PowerPC architecture. * PowerPC architecture.
*/ */
#ifdef __amigaos4__
/* This must be defined first as it re-defines GLOBAL otherwise */
#include <proto/exec.h>
#endif
#define JPEG_INTERNALS #define JPEG_INTERNALS
#include "../jinclude.h" #include "../jinclude.h"
#include "../jpeglib.h" #include "../jpeglib.h"
@@ -116,6 +121,11 @@ init_simd (void)
if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT) if (bufsize > SOMEWHAT_SANE_PROC_CPUINFO_SIZE_LIMIT)
break; break;
} }
#elif defined(__amigaos4__)
uint32 altivec = 0;
IExec->GetCPUInfoTags(GCIT_VectorUnit, &altivec, TAG_DONE);
if(altivec == VECTORTYPE_ALTIVEC)
simd_support |= JSIMD_ALTIVEC;
#endif #endif
/* Force different settings through environment variables */ /* Force different settings through environment variables */