Commit bc20d7c0 authored by Xavier Leroy's avatar Xavier Leroy Committed by Xavier Leroy
Browse files

Move declarations of __builtin_clz* and __builtin_ctz* to C2C.ml

These functions are now available on all targets.
parent a56e0c65
......@@ -32,14 +32,6 @@ let builtins = {
"__builtin_fence",
(TVoid [], [], false);
(* Integer arithmetic *)
"__builtin_bswap64",
(TInt(IULongLong, []), [TInt(IULongLong, [])], false);
"__builtin_clz",
(TInt(IInt, []), [TInt(IUInt, [])], false);
"__builtin_clzl",
(TInt(IInt, []), [TInt(IULong, [])], false);
"__builtin_clzll",
(TInt(IInt, []), [TInt(IULongLong, [])], false);
"__builtin_cls",
(TInt(IInt, []), [TInt(IInt, [])], false);
"__builtin_clsl",
......
......@@ -22,19 +22,6 @@ let builtins = {
"__builtin_va_list", TPtr(TVoid [], [])
];
builtin_functions = [
(* Integer arithmetic *)
"__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);
(* Memory accesses *)
"__builtin_read16_reversed",
(TInt(IUShort, []), [TPtr(TInt(IUShort, [AConst]), [])], false);
......
......@@ -180,6 +180,18 @@ let builtins_generic = {
(TInt(IUInt, []), [TInt(IUInt, [])], false);
"__builtin_bswap16",
(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);
(* Floating-point absolute value *)
"__builtin_fabs",
(TFloat(FDouble, []), [TFloat(FDouble, [])], false);
......
......@@ -28,18 +28,6 @@ let builtins = {
(TInt(IInt, []), [TInt(IInt, []); TInt(IInt, [])], false);
"__builtin_mulhwu",
(TInt(IUInt, []), [TInt(IUInt, []); TInt(IUInt, [])], 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);
"__builtin_cmpb",
(TInt (IUInt, []), [TInt(IUInt, []);TInt(IUInt, [])], false);
(* Integer arithmetic in 32/64-bit hybrid mode *)
......
......@@ -30,19 +30,6 @@ let builtins = {
"__builtin_va_list", va_list_type;
];
builtin_functions = [
(* Integer arithmetic *)
"__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_fmax",
(TFloat(FDouble, []), [TFloat(FDouble, []); TFloat(FDouble, [])], false);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment