Module Name: xsrc
Committed By: jmcneill
Date: Thu Jan 31 22:46:51 UTC 2013
Modified Files:
xsrc/external/mit/pixman/dist/pixman: pixman-arm.c
Log Message:
Add support for SIMD and NEON extensions.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
xsrc/external/mit/pixman/dist/pixman/pixman-arm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/pixman/dist/pixman/pixman-arm.c
diff -u xsrc/external/mit/pixman/dist/pixman/pixman-arm.c:1.1.1.1 xsrc/external/mit/pixman/dist/pixman/pixman-arm.c:1.2
--- xsrc/external/mit/pixman/dist/pixman/pixman-arm.c:1.1.1.1 Thu Jan 31 10:28:48 2013
+++ xsrc/external/mit/pixman/dist/pixman/pixman-arm.c Thu Jan 31 22:46:51 2013
@@ -176,6 +176,39 @@ detect_cpu_features (void)
return features;
}
+#elif defined (__NetBSD__) /* NetBSD */
+
+#include <sys/sysctl.h>
+
+static arm_cpu_features_t
+detect_cpu_features (void)
+{
+ arm_cpu_features_t features = 0;
+ size_t len;
+ int flag;
+
+ len = sizeof(flag);
+ if (sysctlbyname("machdep.fpu_present", &flag, &len, NULL, 0) == 0)
+ {
+ if (flag)
+ features |= ARM_VFP;
+ }
+ len = sizeof(flag);
+ if (sysctlbyname("machdep.simdex_present", &flag, &len, NULL, 0) == 0)
+ {
+ if (flag)
+ features |= ARM_V6;
+ }
+ len = sizeof(flag);
+ if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0)
+ {
+ if (flag)
+ features |= ARM_NEON;
+ }
+
+ return features;
+}
+
#else /* Unknown */
static arm_cpu_features_t