summaryrefslogtreecommitdiff
path: root/probe
diff options
context:
space:
mode:
Diffstat (limited to 'probe')
-rw-r--r--probe/HAVE___BUILTIN_POPCOUNT4
-rw-r--r--probe/gen.lua1
2 files changed, 5 insertions, 0 deletions
diff --git a/probe/HAVE___BUILTIN_POPCOUNT b/probe/HAVE___BUILTIN_POPCOUNT
new file mode 100644
index 00000000..0ec4e656
--- /dev/null
+++ b/probe/HAVE___BUILTIN_POPCOUNT
@@ -0,0 +1,4 @@
+unsigned x = 0;
+int main(void) {
+ return __builtin_popcount(x);
+}
diff --git a/probe/gen.lua b/probe/gen.lua
index 082f697e..ab2cb3d2 100644
--- a/probe/gen.lua
+++ b/probe/gen.lua
@@ -7,6 +7,7 @@ probe('HAVE__MM_MOVEMASK_EPI8')
probe('HAVE__THREAD_LOCAL')
probe('HAVE___BUILTIN_CLZ')
probe('HAVE___BUILTIN_CTZL')
+probe('HAVE___BUILTIN_POPCOUNT')
local function probesize(var)
build('probesize', '$outdir/'..var, {'$dir/'..var, '|', 'scripts/probe-size.sh'}, {var=var})