https://gcc.gnu.org/g:568e1b4823b076235497e8fc790ded7629e472a4
commit r17-510-g568e1b4823b076235497e8fc790ded7629e472a4 Author: Alex Coplan <[email protected]> Date: Tue May 12 10:22:09 2026 +0100 doc: Fix description of GET_MODE_MASK This updates the description of GET_MODE_MASK in the GCC internals manual. Currently it says that the macro can only be used for modes whose bitsize is less than or equal to HOST_BITS_PER_INT. That may have once been correct, but these days it seems to work for modes up to HOST_BITS_PER_WIDE_INT in size. The code in genmodes.cc:emit_mode_mask seems to support this. It has: print_maybe_const_decl ("%sunsigned HOST_WIDE_INT", "mode_mask_array", "NUM_MACHINE_MODES", adj_nunits); puts ("\ ((m) >= HOST_BITS_PER_WIDE_INT) \\\n\ ? HOST_WIDE_INT_M1U \\\n\ : (HOST_WIDE_INT_1U << (m)) - 1\n"); gcc/ChangeLog: * doc/rtl.texi (Machine Modes): Update description of GET_MODE_MASK to use HOST_BITS_PER_WIDE_INT instead of HOST_BITS_PER_INT as the upper limit of the input mode's bitsize. Diff: --- gcc/doc/rtl.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi index 4fa4d27506cf..7fd656b70dc3 100644 --- a/gcc/doc/rtl.texi +++ b/gcc/doc/rtl.texi @@ -1577,9 +1577,9 @@ Returns the number of fractional bits of a datum of fixed-point mode @var{m}. @findex GET_MODE_MASK @item GET_MODE_MASK (@var{m}) -Returns a bitmask containing 1 for all bits in a word that fit within -mode @var{m}. This macro can only be used for modes whose bitsize is -less than or equal to @code{HOST_BITS_PER_INT}. +Returns a bitmask containing 1 for all bits in a @code{HOST_WIDE_INT} +that fit within mode @var{m}. This macro can only be used for modes +whose bitsize is less than or equal to @code{HOST_BITS_PER_WIDE_INT}. @findex GET_MODE_ALIGNMENT @item GET_MODE_ALIGNMENT (@var{m})
