From c99cffd412a041586e8a475bbb75212f3746ca1d Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Sun, 11 Aug 2019 02:31:34 +0000 Subject: strace: Probe for __builtin_popcount --- probe/HAVE___BUILTIN_POPCOUNT | 4 ++++ probe/gen.lua | 1 + 2 files changed, 5 insertions(+) create mode 100644 probe/HAVE___BUILTIN_POPCOUNT (limited to 'probe') 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}) -- cgit v1.2.3