summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi16
-rw-r--r--gcc/doc/rtl.texi8
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 41c326b7b3a..2d9c689f98f 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -7828,6 +7828,12 @@ Returns the number of trailing 0-bits in @var{x}, starting at the least
significant bit position. If @var{x} is 0, the result is undefined.
@end deftypefn
+@deftypefn {Built-in Function} int __builtin_clrsb (int x)
+Returns the number of leading redundant sign bits in @var{x}, i.e. the
+number of bits following the most significant bit which are identical
+to it. There are no special cases for 0 or other values.
+@end deftypefn
+
@deftypefn {Built-in Function} int __builtin_popcount (unsigned int x)
Returns the number of 1-bits in @var{x}.
@end deftypefn
@@ -7852,6 +7858,11 @@ Similar to @code{__builtin_ctz}, except the argument type is
@code{unsigned long}.
@end deftypefn
+@deftypefn {Built-in Function} int __builtin_clrsbl (long)
+Similar to @code{__builtin_clrsb}, except the argument type is
+@code{long}.
+@end deftypefn
+
@deftypefn {Built-in Function} int __builtin_popcountl (unsigned long)
Similar to @code{__builtin_popcount}, except the argument type is
@code{unsigned long}.
@@ -7877,6 +7888,11 @@ Similar to @code{__builtin_ctz}, except the argument type is
@code{unsigned long long}.
@end deftypefn
+@deftypefn {Built-in Function} int __builtin_clrsbll (long long)
+Similar to @code{__builtin_clrsb}, except the argument type is
+@code{long long}.
+@end deftypefn
+
@deftypefn {Built-in Function} int __builtin_popcountll (unsigned long long)
Similar to @code{__builtin_popcount}, except the argument type is
@code{unsigned long long}.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 6995a293c6c..ea30e38032e 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -2400,6 +2400,14 @@ zero if @var{x} is zero.) The mode of @var{x} need not be @var{m};
depending on the target machine, various mode combinations may be
valid.
+@findex clrsb
+@item (clrsb:@var{m} @var{x})
+Represents the number of redundant leading sign bits in @var{x},
+represented as an integer of mode @var{m}, starting at the most
+significant bit position. This is one less than the number of leading
+sign bits (either 0 or 1), with no special cases. The mode of @var{x}
+will usually be an integer mode and may differ from @var{m}.
+
@findex clz
@item (clz:@var{m} @var{x})
Represents the number of leading 0-bits in @var{x}, represented as an