aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog2
-rw-r--r--arm/CBuiltins.ml2
-rw-r--r--ia32/CBuiltins.ml4
-rw-r--r--powerpc/CBuiltins.ml6
4 files changed, 8 insertions, 6 deletions
diff --git a/Changelog b/Changelog
index 7710a61d..9ce8703c 100644
--- a/Changelog
+++ b/Changelog
@@ -45,6 +45,8 @@ Miscellaneous:
passing a struct/union as function argument is now rejected.
- The -fstruct-return command-line option is deprecated and
becomes a synonymous for -fstruct-passing.
+- The return type of __builtin_clz() is "int", as documented,
+ and not "unsigned int", as previously implemented.
Release 2.5, 2015-06-12
diff --git a/arm/CBuiltins.ml b/arm/CBuiltins.ml
index 00de4df7..6751074c 100644
--- a/arm/CBuiltins.ml
+++ b/arm/CBuiltins.ml
@@ -30,7 +30,7 @@ let builtins = {
"__builtin_bswap16",
(TInt(IUShort, []), [TInt(IUShort, [])], false);
"__builtin_clz",
- (TInt(IUInt, []), [TInt(IUInt, [])], false);
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
(* Float arithmetic *)
"__builtin_fsqrt",
(TFloat(FDouble, []), [TFloat(FDouble, [])], false);
diff --git a/ia32/CBuiltins.ml b/ia32/CBuiltins.ml
index 771d2786..802588d4 100644
--- a/ia32/CBuiltins.ml
+++ b/ia32/CBuiltins.ml
@@ -30,9 +30,9 @@ let builtins = {
"__builtin_bswap16",
(TInt(IUShort, []), [TInt(IUShort, [])], false);
"__builtin_clz",
- (TInt(IUInt, []), [TInt(IUInt, [])], false);
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
"__builtin_ctz",
- (TInt(IUInt, []), [TInt(IUInt, [])], false);
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
(* Float arithmetic *)
"__builtin_fsqrt",
(TFloat(FDouble, []), [TFloat(FDouble, [])], false);
diff --git a/powerpc/CBuiltins.ml b/powerpc/CBuiltins.ml
index ec3a633b..d244cba0 100644
--- a/powerpc/CBuiltins.ml
+++ b/powerpc/CBuiltins.ml
@@ -29,11 +29,11 @@ let builtins = {
"__builtin_mulhwu",
(TInt(IUInt, []), [TInt(IUInt, []); TInt(IUInt, [])], false);
"__builtin_clz",
- (TInt(IUInt, []), [TInt(IUInt, [])], false);
+ (TInt(IInt, []), [TInt(IUInt, [])], false);
"__builtin_clzl",
- (TInt(IUInt, []), [TInt(IULong, [])], false);
+ (TInt(IInt, []), [TInt(IULong, [])], false);
"__builtin_clzll",
- (TInt(IUInt, []), [TInt(IULongLong, [])], false);
+ (TInt(IInt, []), [TInt(IULongLong, [])], false);
"__builtin_bswap",
(TInt(IUInt, []), [TInt(IUInt, [])], false);
"__builtin_bswap32",