From 9b35547f5862ac2d34573d7421eb8be05c6064ae Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 29 Oct 2009 04:17:35 +0000 Subject: Add CPUID::have_altivec for AltiVec runtime detection. Relies on mfspr emulation/trapping by the kernel, which works on (at least) Linux and NetBSD. --- doc/examples/cpuid.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp index 59940b500..1bdee787c 100644 --- a/doc/examples/cpuid.cpp +++ b/doc/examples/cpuid.cpp @@ -12,4 +12,6 @@ int main() printf("SSSE3 %d\n", CPUID::has_ssse3()); printf("SSE41 %d\n", CPUID::has_sse41()); printf("SSE42 %d\n", CPUID::has_sse42()); + + printf("AltiVec %d\n", CPUID::has_altivec()); } -- cgit v1.2.3