From e1f959ee7380e9fc89aeb98d9e4d8ccf1c99ea26 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek <jakub@redhat.com> Date: Fri, 1 Dec 2023 16:57:30 +0100 Subject: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type In https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005ffloor I've noticed that while e.g. __builtin_stdc_bit_floor builtin is properly rendered in bold and bigger size, for the __builtin_stdc_bit_width builtin it is not the builtin name which is marked like that, but the keyword int before it. Also, seems such builtins are missing from the index. I've read the texinfo docs and they seem to suggest in https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Line-Macros.html that return types of functions with spaces in the return type should be wrapped with {}s and we already use that e.g. in @defbuiltin{{void *} __builtin_thread_pointer (void)} The following patch adjusts builtins I found which contained one or two spaces in the return type name (plus two spots which used 2 spaces after single keyword return type instead of 1 which triggered my search regex as well). 2023-12-01 Jakub Jelinek <jakub@redhat.com> * doc/extend.texi (__builtin_darn, __builtin_darn_raw, __builtin_ia32_vec_ext_v2di, __builtin_ia32_crc32qi, __builtin_ia32_crc32hi, __builtin_ia32_crc32si, __builtin_ia32_crc32di): Put {}s around return type with spaces in it. (__builtin_rx_mvfachi, __builtin_rx_mvfacmi): Remove superfluous whitespace. (cherry picked from commit ff99671ac3ea583a9d65c8c3cd3ff4aad1d68592) --- gcc/doc/extend.texi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 12c5ca507ed5..d0e09046d914 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -18415,8 +18415,8 @@ round to odd as the rounding mode. The following additional built-in functions are also available for the PowerPC family of processors, starting with ISA 3.0 or later: -@defbuiltin{long long __builtin_darn (void)} -@defbuiltinx{long long __builtin_darn_raw (void)} +@defbuiltin{{long long} __builtin_darn (void)} +@defbuiltinx{{long long} __builtin_darn_raw (void)} @defbuiltinx{int __builtin_darn_32 (void)} The @code{__builtin_darn} and @code{__builtin_darn_raw} functions require a @@ -21306,12 +21306,12 @@ multiplying the bottom 16 bits of the two arguments into the accumulator. @enddefbuiltin -@defbuiltin{int __builtin_rx_mvfachi (void)} +@defbuiltin{int __builtin_rx_mvfachi (void)} Generates the @code{mvfachi} machine instruction to read the top 32 bits of the accumulator. @enddefbuiltin -@defbuiltin{int __builtin_rx_mvfacmi (void)} +@defbuiltin{int __builtin_rx_mvfacmi (void)} Generates the @code{mvfacmi} machine instruction to read the middle 32 bits of the accumulator. @enddefbuiltin @@ -22665,7 +22665,7 @@ Generates the @code{extractps} machine instruction. Generates the @code{pextrd} machine instruction. @enddefbuiltin -@defbuiltin{long long __builtin_ia32_vec_ext_v2di (v2di, const int)} +@defbuiltin{{long long} __builtin_ia32_vec_ext_v2di (v2di, const int)} Generates the @code{pextrq} machine instruction in 64bit mode. @enddefbuiltin @@ -22694,19 +22694,19 @@ v2di __builtin_ia32_pcmpgtq (v2di, v2di); The following built-in functions are available when @option{-msse4.2} is used. -@defbuiltin{unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char)} +@defbuiltin{{unsigned int} __builtin_ia32_crc32qi (unsigned int, unsigned char)} Generates the @code{crc32b} machine instruction. @enddefbuiltin -@defbuiltin{unsigned int __builtin_ia32_crc32hi (unsigned int, unsigned short)} +@defbuiltin{{unsigned int} __builtin_ia32_crc32hi (unsigned int, unsigned short)} Generates the @code{crc32w} machine instruction. @enddefbuiltin -@defbuiltin{unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int)} +@defbuiltin{{unsigned int} __builtin_ia32_crc32si (unsigned int, unsigned int)} Generates the @code{crc32l} machine instruction. @enddefbuiltin -@defbuiltin{unsigned long long __builtin_ia32_crc32di (unsigned long long, unsigned long long)} +@defbuiltin{{unsigned long long} __builtin_ia32_crc32di (unsigned long long, unsigned long long)} Generates the @code{crc32q} machine instruction. @enddefbuiltin -- GitLab