aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-29 04:17:35 +0000
committerlloyd <[email protected]>2009-10-29 04:17:35 +0000
commit9b35547f5862ac2d34573d7421eb8be05c6064ae (patch)
tree1d903ab2cbc0d4aff8bbc0d76c0c122ee4c0fd4f /doc/examples
parentd5412353bec03ae91d69286ee53369cd9588dcda (diff)
Add CPUID::have_altivec for AltiVec runtime detection.
Relies on mfspr emulation/trapping by the kernel, which works on (at least) Linux and NetBSD.
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/cpuid.cpp2
1 files changed, 2 insertions, 0 deletions
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());
}