public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-9994] Document that vector_size works with typedefs [PR92880] Date: Tue, 16 Apr 2024 15:38:39 +0000 (GMT) [thread overview] Message-ID: <20240416153839.989663858D35@sourceware.org> (raw) https://gcc.gnu.org/g:8eddd87da2dd01c841f9742f973f65ebe0a88e71 commit r14-9994-g8eddd87da2dd01c841f9742f973f65ebe0a88e71 Author: Andrew Pinski <quic_apinski@quicinc.com> Date: Mon Apr 15 17:13:36 2024 -0700 Document that vector_size works with typedefs [PR92880] This just adds a clause to make it more obvious that the vector_size attribute extension works with typedefs. Note this whole section needs a rewrite to be a similar format as other extensions. But that is for another day. gcc/ChangeLog: PR c/92880 * doc/extend.texi (Using Vector Instructions): Add that the base_types could be a typedef of them. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com> Diff: --- gcc/doc/extend.texi | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 7b54a241a7b..e290265d68d 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -12901,12 +12901,13 @@ typedef int v4si __attribute__ ((vector_size (16))); @end smallexample @noindent -The @code{int} type specifies the @dfn{base type}, while the attribute specifies -the vector size for the variable, measured in bytes. For example, the -declaration above causes the compiler to set the mode for the @code{v4si} -type to be 16 bytes wide and divided into @code{int} sized units. For -a 32-bit @code{int} this means a vector of 4 units of 4 bytes, and the -corresponding mode of @code{foo} is @acronym{V4SI}. +The @code{int} type specifies the @dfn{base type} (which can be a +@code{typedef}), while the attribute specifies the vector size for the +variable, measured in bytes. For example, the declaration above causes +the compiler to set the mode for the @code{v4si} type to be 16 bytes wide +and divided into @code{int} sized units. For a 32-bit @code{int} this +means a vector of 4 units of 4 bytes, and the corresponding mode of +@code{foo} is @acronym{V4SI}. The @code{vector_size} attribute is only applicable to integral and floating scalars, although arrays, pointers, and function return values
reply other threads:[~2024-04-16 15:38 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240416153839.989663858D35@sourceware.org \ --to=pinskia@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).