# HG changeset patch # User michael # Date 1097001375 0 # Node ID 0f937b191cc3a3f24b15e5e3c3f952affe6cc1f2 # Parent 9891c6a212ca294f49f2c792802e903b30969b9e Altivec test on AmigaOS4 patch by (Chip ) diff -r 9891c6a212ca -r 0f937b191cc3 ppc/dsputil_altivec.c --- a/ppc/dsputil_altivec.c Tue Oct 05 17:43:10 2004 +0000 +++ b/ppc/dsputil_altivec.c Tue Oct 05 18:36:15 2004 +0000 @@ -27,6 +27,11 @@ #ifdef CONFIG_DARWIN #include #else /* CONFIG_DARWIN */ +#ifdef __AMIGAOS4__ +#include +#include +#include +#else /* __AMIGAOS4__ */ #include #include @@ -44,6 +49,7 @@ siglongjmp (jmpbuf, 1); } #endif /* CONFIG_DARWIN */ +#endif /* __AMIGAOS4__ */ int sad16_x2_altivec(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) { @@ -1616,6 +1622,15 @@ int has_altivec(void) { +#ifdef __AMIGAOS4__ + ULONG result = 0; + extern struct ExecIFace *IExec; + + IExec->GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE); + if (result == VECTORTYPE_ALTIVEC) return 1; + return 0; +#else /* __AMIGAOS4__ */ + #ifdef CONFIG_DARWIN int sels[2] = {CTL_HW, HW_VECTORUNIT}; int has_vu = 0; @@ -1646,6 +1661,7 @@ } #endif /* CONFIG_DARWIN */ return 0; +#endif /* __AMIGAOS4__ */ } /* next one assumes that ((line_size % 8) == 0) */