Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -30,11 +30,17 @@ #endif #ifdef OF_MACOS # include #endif -#ifdef OF_MORPHOS +#if defined(OF_AMIGAOS4) +# define __USE_INLINE__ +# define __NOLIBBASE__ +# define __NOGLOBALIFACE__ +# include +# include +#elif defined(OF_MORPHOS) # include # include #endif #import "OFSystemInfo.h" @@ -94,10 +100,14 @@ #if defined(OF_X86_64) || defined(OF_X86) struct x86_regs { uint32_t eax, ebx, ecx, edx; }; #endif + +#ifdef OF_AMIGAOS4 +extern struct ExecIFace *IExec; +#endif static size_t pageSize = 4096; static size_t numberOfCPUs = 1; static OFString *operatingSystemName = nil; static OFString *operatingSystemVersion = nil; @@ -618,10 +628,16 @@ int name[2] = { CTL_HW, HW_VECTORUNIT }, value = 0; size_t length = sizeof(value); if (sysctl(name, 2, &value, &length, NULL, 0) == 0) return value; +# elif defined(OF_AMIGAOS4) + uint32_t vectorUnit; + + GetCPUInfoTags(GCIT_VectorUnit, &vectorUnit, TAG_END); + + return (vectorUnit == VECTORTYPE_ALTIVEC); # elif defined(OF_MORPHOS) uint32_t supportsAltiVec; if (NewGetSystemAttrs(&supportsAltiVec, sizeof(supportsAltiVec), SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)