aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-01-28 18:42:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-01-28 18:42:57 +0000
commita49a2839266f0bac2b6286e9f49fdc0c292938fe (patch)
treefc9198c2a440131d8d480ab4748762a9b1c7c520 /include/clang
parent9f1c49c57d8a5215c3f662b0f00e830a0b06d6de (diff)
Make the __builtin_c[lt]zs builtins target independent.
There is really no reason to have these only available on x86. It's just __builtin_c[tl]z for shorts. Modernize the test while at it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/Basic/Builtins.def2
-rw-r--r--include/clang/Basic/BuiltinsX86.def4
2 files changed, 2 insertions, 4 deletions
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index d49d611fd1..b3b3c21493 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -365,10 +365,12 @@ BUILTIN(__builtin_signbitf, "if", "nc")
BUILTIN(__builtin_signbitl, "iLd", "nc")
// Builtins for arithmetic.
+BUILTIN(__builtin_clzs , "iUs" , "nc")
BUILTIN(__builtin_clz , "iUi" , "nc")
BUILTIN(__builtin_clzl , "iULi" , "nc")
BUILTIN(__builtin_clzll, "iULLi", "nc")
// TODO: int clzimax(uintmax_t)
+BUILTIN(__builtin_ctzs , "iUs" , "nc")
BUILTIN(__builtin_ctz , "iUi" , "nc")
BUILTIN(__builtin_ctzl , "iULi" , "nc")
BUILTIN(__builtin_ctzll, "iULLi", "nc")
diff --git a/include/clang/Basic/BuiltinsX86.def b/include/clang/Basic/BuiltinsX86.def
index 2356b54d3c..50ce477bd4 100644
--- a/include/clang/Basic/BuiltinsX86.def
+++ b/include/clang/Basic/BuiltinsX86.def
@@ -593,11 +593,7 @@ BUILTIN(__builtin_ia32_psrlv4si, "V4iV4iV4i", "")
BUILTIN(__builtin_ia32_psrlv4di, "V4LLiV4LLiV4LLi", "")
BUILTIN(__builtin_ia32_psrlv2di, "V2LLiV2LLiV2LLi", "")
-// LZCNT
-BUILTIN(__builtin_clzs, "UsUs", "")
-
// BMI
-BUILTIN(__builtin_ctzs, "UsUs", "")
BUILTIN(__builtin_ia32_bextr_u32, "UiUiUi", "")
BUILTIN(__builtin_ia32_bextr_u64, "ULLiULLiULLi", "")