summaryrefslogtreecommitdiff
path: root/probe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-10 19:04:30 -0700
committerMichael Forney <mforney@mforney.org>2019-07-10 19:06:26 -0700
commite8de3964688787b9d6b14ce173a254b0fc2e38ad (patch)
tree041e6f07ad8ca50f4330865646df88650f15d7d2 /probe
parent95238ca682eadca3dd1b839b69e375d61e16af24 (diff)
pixman, nasm: Probe for __builtin_clz
Diffstat (limited to 'probe')
-rw-r--r--probe/HAVE___BUILTIN_CLZ4
-rw-r--r--probe/gen.lua1
2 files changed, 5 insertions, 0 deletions
diff --git a/probe/HAVE___BUILTIN_CLZ b/probe/HAVE___BUILTIN_CLZ
new file mode 100644
index 00000000..30a3b972
--- /dev/null
+++ b/probe/HAVE___BUILTIN_CLZ
@@ -0,0 +1,4 @@
+unsigned x = -1;
+int main(void) {
+ return __builtin_clz(x);
+}
diff --git a/probe/gen.lua b/probe/gen.lua
index 56d470ec..489f6733 100644
--- a/probe/gen.lua
+++ b/probe/gen.lua
@@ -5,6 +5,7 @@ end
probe('HAVE_IMMINTRIN_H')
probe('HAVE__MM_MOVEMASK_EPI8')
probe('HAVE__THREAD_LOCAL')
+probe('HAVE___BUILTIN_CLZ')
local function probesize(var)
build('probesize', '$outdir/'..var, {'$dir/'..var, '|', 'scripts/probe-size.sh'}, {var=var})