diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-12-22 11:06:35 +0100 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-12-22 11:06:35 +0100 |
commit | f531d386db7051761bd31f2740a893ff97ce65aa (patch) | |
tree | 0e0d535d0e36927500441de21ac727dc1677ac4b /ia32/CBuiltins.ml | |
parent | 12b5eaf144285de569be7123913ee78f17dd9b03 (diff) | |
download | compcert-f531d386db7051761bd31f2740a893ff97ce65aa.tar.gz compcert-f531d386db7051761bd31f2740a893ff97ce65aa.zip |
Add CLZ builtins for ARM and IA32
ARM: add __builtin_clzl, __builtin_clzll
IA32: add __builtin_clzl, __builtin_clzll,
__builtin_ctzl, __builtin_ctzll
Add corresponding tests in tests/regression/
Diffstat (limited to 'ia32/CBuiltins.ml')
-rw-r--r-- | ia32/CBuiltins.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ia32/CBuiltins.ml b/ia32/CBuiltins.ml index 802588d4..79a839f3 100644 --- a/ia32/CBuiltins.ml +++ b/ia32/CBuiltins.ml @@ -31,8 +31,16 @@ let builtins = { (TInt(IUShort, []), [TInt(IUShort, [])], false); "__builtin_clz", (TInt(IInt, []), [TInt(IUInt, [])], false); + "__builtin_clzl", + (TInt(IInt, []), [TInt(IULong, [])], false); + "__builtin_clzll", + (TInt(IInt, []), [TInt(IULongLong, [])], false); "__builtin_ctz", (TInt(IInt, []), [TInt(IUInt, [])], false); + "__builtin_ctzl", + (TInt(IInt, []), [TInt(IULong, [])], false); + "__builtin_ctzll", + (TInt(IInt, []), [TInt(IULongLong, [])], false); (* Float arithmetic *) "__builtin_fsqrt", (TFloat(FDouble, []), [TFloat(FDouble, [])], false); |