From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AC962385772C for ; Fri, 1 Dec 2023 10:26:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC962385772C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AC962385772C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701426455; cv=none; b=RgHvkW+2NdckSO0KsnJljUPj9Gr/oS4JDLtB33BT/D5Mz6Pv7rkAXPb5keZovSgUh/gmmSfMvDOdqx0hRkOeawNxMtuIiGoz2ri+R7DapcVXHmcUywFw1sCdzUZSAeQipYgZUsPkDzjNAF9poUhpwWC+unS1Y4oj9QL5aqSfoLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701426455; c=relaxed/simple; bh=SICRBRbtD3NYZVraZn6iJmRgQjoxMi2lGb/IWkqBirY=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=F2ipK5Btrmdgz+v1rDtc8YztWVWHBIUv+Yl5Up9esm417unhA1w6kyZ9GSXxaKVYzOxPzSo9cDGBSmMN4eg5+8IxT2PkYFfa+6Qd9OmkdKxoQiLRD2xtRKBGjwMgOHdo9wuaW/w9rVDNFF1b3/2BEUAScHhNdL8kHSqG8PY2YfQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701426394; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type; bh=JTFfPjIRFYBtm38XsJmjOKIn4xV5TdP8CRK0ZAQ11cc=; b=XRtYR9YSBLJPjbFN/+pi8xhTuAv7FeslvTu1byEyKfiK2MCHG/tbLIsclNzDBMjFVv8Es0 DmHx0RmEE2j0aZaZw591whh2Rjg8+idG4cXK6wONV984wdprGBUHrus8kjqbYKbaHNCf79 lsTHMa2hDlZGDhsF56XkwH+nzvTD66Q= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-616-KTbzf03MPwGgRkQVX8wiSA-1; Fri, 01 Dec 2023 05:26:31 -0500 X-MC-Unique: KTbzf03MPwGgRkQVX8wiSA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C05E8862CAB; Fri, 1 Dec 2023 10:26:30 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5548B10EA5; Fri, 1 Dec 2023 10:26:30 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3B1AQRQH548540 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 1 Dec 2023 11:26:27 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B1AQQbQ548539; Fri, 1 Dec 2023 11:26:26 +0100 Date: Fri, 1 Dec 2023 11:26:25 +0100 From: Jakub Jelinek To: Gerald Pfeifer , Joseph Myers , Sandra Loosemore Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] extend.texi: Fix up defbuiltin* with spaces in return type Message-ID: Reply-To: Jakub Jelinek MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! 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). Tested on x86_64-linux, ok for trunk? 2023-12-01 Jakub Jelinek * doc/extend.texi (__builtin_addc, __builtin_addcl, __builtin_addcll, __builtin_subc, __builtin_subcl, __builtin_subcll, __builtin_stdc_bit_width, __builtin_stdc_count_ones, __builtin_stdc_count_zeros, __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero, __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero, __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones, __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones, __builtin_stdc_trailing_zeros, __builtin_nvptx_brev, __builtin_nvptx_brevll, __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. --- gcc/doc/extend.texi.jj 2023-12-01 08:10:42.887322032 +0100 +++ gcc/doc/extend.texi 2023-12-01 11:08:30.968219118 +0100 @@ -13238,9 +13238,9 @@ after addition, conditional jump on carr @enddefbuiltin -@defbuiltin{unsigned int __builtin_addc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)} -@defbuiltinx{unsigned long int __builtin_addcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)} -@defbuiltinx{unsigned long long int __builtin_addcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)} +@defbuiltin{{unsigned int} __builtin_addc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)} +@defbuiltinx{{unsigned long int} __builtin_addcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)} +@defbuiltinx{{unsigned long long int} __builtin_addcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)} These built-in functions are equivalent to: @smallexample @@ -13260,9 +13260,9 @@ emitted if one of them (preferrably the @enddefbuiltin -@defbuiltin{unsigned int __builtin_subc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)} -@defbuiltinx{unsigned long int __builtin_subcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)} -@defbuiltinx{unsigned long long int __builtin_subcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)} +@defbuiltin{{unsigned int} __builtin_subc (unsigned int a, unsigned int b, unsigned int carry_in, unsigned int *carry_out)} +@defbuiltinx{{unsigned long int} __builtin_subcl (unsigned long int a, unsigned long int b, unsigned int carry_in, unsigned long int *carry_out)} +@defbuiltinx{{unsigned long long int} __builtin_subcll (unsigned long long int a, unsigned long long int b, unsigned long long int carry_in, unsigned long long int *carry_out)} These built-in functions are equivalent to: @smallexample @@ -15167,7 +15167,7 @@ where @var{prec} is bit width of @var{ty in @var{arg} are evaluated just once. @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_bit_width (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_bit_width (@var{type} @var{arg})} The @code{__builtin_stdc_bit_width} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15176,7 +15176,7 @@ performed on the argument. It is equiva where @var{prec} is bit width of @var{type}. @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_count_ones (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_count_ones (@var{type} @var{arg})} The @code{__builtin_stdc_count_ones} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15184,7 +15184,7 @@ performed on the argument. It is equiva @code{(unsigned int) __builtin_popcountg (@var{arg})} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_count_zeros (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_count_zeros (@var{type} @var{arg})} The @code{__builtin_stdc_count_zeros} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15192,7 +15192,7 @@ performed on the argument. It is equiva @code{(unsigned int) __builtin_popcountg ((@var{type}) ~@var{arg})} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_first_leading_one (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_first_leading_one (@var{type} @var{arg})} The @code{__builtin_stdc_first_leading_one} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15200,7 +15200,7 @@ performed on the argument. It is equiva @code{__builtin_clzg (@var{arg}, -1) + 1U} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_first_leading_zero (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_first_leading_zero (@var{type} @var{arg})} The @code{__builtin_stdc_first_leading_zero} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15208,7 +15208,7 @@ performed on the argument. It is equiva @code{__builtin_clzg ((@var{type}) ~@var{arg}, -1) + 1U} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_first_trailing_one (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_first_trailing_one (@var{type} @var{arg})} The @code{__builtin_stdc_first_trailing_one} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15216,7 +15216,7 @@ performed on the argument. It is equiva @code{__builtin_ctzg (@var{arg}, -1) + 1U} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_first_trailing_zero (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_first_trailing_zero (@var{type} @var{arg})} The @code{__builtin_stdc_first_trailing_zero} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15224,7 +15224,7 @@ performed on the argument. It is equiva @code{__builtin_ctzg ((@var{type}) ~@var{arg}, -1) + 1U} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_has_single_bit (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_has_single_bit (@var{type} @var{arg})} The @code{__builtin_stdc_has_single_bit} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15232,7 +15232,7 @@ performed on the argument. It is equiva @code{(_Bool) (__builtin_popcountg (@var{arg}) == 1)} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_leading_ones (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_leading_ones (@var{type} @var{arg})} The @code{__builtin_stdc_leading_ones} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15240,7 +15240,7 @@ performed on the argument. It is equiva @code{(unsigned int) __builtin_clzg ((@var{type}) ~@var{arg}, @var{prec})} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_leading_zeros (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_leading_zeros (@var{type} @var{arg})} The @code{__builtin_stdc_leading_zeros} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15248,7 +15248,7 @@ performed on the argument. It is equiva @code{(unsigned int) __builtin_clzg (@var{arg}, @var{prec})} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_trailing_ones (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_trailing_ones (@var{type} @var{arg})} The @code{__builtin_stdc_trailing_ones} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -15256,7 +15256,7 @@ performed on the argument. It is equiva @code{(unsigned int) __builtin_ctzg ((@var{type}) ~@var{arg}, @var{prec})} @enddefbuiltin -@defbuiltin{unsigned int __builtin_stdc_trailing_zeros (@var{type} @var{arg})} +@defbuiltin{{unsigned int} __builtin_stdc_trailing_zeros (@var{type} @var{arg})} The @code{__builtin_stdc_trailing_zeros} function is available only in C. It is type-generic, the argument can be any unsigned integer (standard, extended or bit-precise). No integral argument promotions are @@ -18731,11 +18731,11 @@ Disable global interrupt. These built-in functions are available for the Nvidia PTX target: -@defbuiltin{unsigned int __builtin_nvptx_brev (unsigned int @var{x})} +@defbuiltin{{unsigned int} __builtin_nvptx_brev (unsigned int @var{x})} Reverse the bit order of a 32-bit unsigned integer. @enddefbuiltin -@defbuiltin{unsigned long long __builtin_nvptx_brevll (unsigned long long @var{x})} +@defbuiltin{{unsigned long long} __builtin_nvptx_brevll (unsigned long long @var{x})} Reverse the bit order of a 64-bit unsigned integer. @enddefbuiltin @@ -19232,8 +19232,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 @@ -22317,12 +22317,12 @@ multiplying the bottom 16 bits of the tw 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 @@ -23691,7 +23691,7 @@ Generates the @code{extractps} machine i 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 @@ -23720,19 +23720,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 Jakub