public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Document {L,R}ROTATE_EXPR
@ 2023-10-20 10:01 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-10-20 10:01 UTC (permalink / raw)
  To: gcc-patches

The following amends the {L,R}SHIFT_EXPR documentation with
documentation about the {L,R}ROTATE_EXPR case.

Build on x86_64-unknown-linux-gnu, pushed.

	* doc/generic.texi ({L,R}ROTATE_EXPR): Document.
---
 gcc/doc/generic.texi | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi
index 73492454002..de5609fc0c3 100644
--- a/gcc/doc/generic.texi
+++ b/gcc/doc/generic.texi
@@ -1315,6 +1315,8 @@ The type of the node specifies the alignment of the access.
 @tindex THROW_EXPR
 @tindex LSHIFT_EXPR
 @tindex RSHIFT_EXPR
+@tindex LROTATE_EXPR
+@tindex RROTATE_EXPR
 @tindex BIT_IOR_EXPR
 @tindex BIT_XOR_EXPR
 @tindex BIT_AND_EXPR
@@ -1481,17 +1483,19 @@ a fixed-point value to a floating-point value.
 
 @item LSHIFT_EXPR
 @itemx RSHIFT_EXPR
-These nodes represent left and right shifts, respectively.  The first
-operand is the value to shift; it will always be of integral type.  The
-second operand is an expression for the number of bits by which to
-shift.  Right shift should be treated as arithmetic, i.e., the
-high-order bits should be zero-filled when the expression has unsigned
-type and filled with the sign bit when the expression has signed type.
+@itemx LROTATE_EXPR
+@itemx RROTATE_EXPR
+These nodes represent left and right shifts and rotates, respectively.
+The first operand is the value to shift or rotate; it will always be of
+integral type.  The second operand is an expression for the number of bits
+by which to shift or rotate.  Right shift should be treated as arithmetic,
+i.e., the high-order bits should be zero-filled when the expression has
+unsigned type and filled with the sign bit when the expression has signed type.
+All other operations are logical, operating on the bit representation.
 Note that the result is undefined if the second operand is larger
 than or equal to the first operand's type size. Unlike most nodes, these
 can have a vector as first operand and a scalar as second operand.
 
-
 @item BIT_IOR_EXPR
 @itemx BIT_XOR_EXPR
 @itemx BIT_AND_EXPR
-- 
2.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-20 10:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20 10:01 [PATCH] Document {L,R}ROTATE_EXPR Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).