public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] doc: Document AArch64-specific asm operand modifiers
@ 2023-12-14 16:34 Alex Coplan
  2023-12-14 16:45 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Coplan @ 2023-12-14 16:34 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Earnshaw, Richard Sandiford, Kyrylo Tkachov

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Hi,

As it stands, GCC doesn't document any public AArch64-specific operand
modifiers for use in inline asm.  This patch fixes that by documenting
an initial set of public AArch64-specific operand modifiers.

Tested with make html and checking the output looks OK in a browser.

OK for trunk?

Thanks,
Alex

gcc/ChangeLog:

	* doc/extend.texi: Document AArch64 Operand Modifiers.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1485 bytes --]

diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index e8b5e771f7a..6ade36759ee 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -11723,6 +11723,31 @@ operand as if it were a memory reference.
 @tab @code{%l0}
 @end multitable
 
+@anchor{aarch64Operandmodifiers}
+@subsubsection AArch64 Operand Modifiers
+
+The following table shows the modifiers supported by AArch64 and their effects:
+
+@multitable @columnfractions .10 .90
+@headitem Modifier @tab Description
+@item @code{w} @tab Print a 32-bit general-purpose register name or, given a
+constant zero operand, the 32-bit zero register (@code{wzr}).
+@item @code{x} @tab Print a 64-bit general-purpose register name or, given a
+constant zero operand, the 64-bit zero register (@code{xzr}).
+@item @code{b} @tab Print an FP/SIMD register name with a @code{b} (byte, 8-bit)
+prefix.
+@item @code{h} @tab Print an FP/SIMD register name with an @code{h} (halfword,
+16-bit) prefix.
+@item @code{s} @tab Print an FP/SIMD register name with an @code{s} (single
+word, 32-bit) prefix.
+@item @code{d} @tab Print an FP/SIMD register name with a @code{d} (doubleword,
+64-bit) prefix.
+@item @code{q} @tab Print an FP/SIMD register name with a @code{q} (quadword,
+128-bit) prefix.
+@item @code{Z} @tab Print an FP/SIMD register name as an SVE register (i.e. with
+a @code{z} prefix).  This is a no-op for SVE register operands.
+@end multitable
+
 @anchor{x86Operandmodifiers}
 @subsubsection x86 Operand Modifiers
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] doc: Document AArch64-specific asm operand modifiers
  2023-12-14 16:34 [PATCH] doc: Document AArch64-specific asm operand modifiers Alex Coplan
@ 2023-12-14 16:45 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2023-12-14 16:45 UTC (permalink / raw)
  To: Alex Coplan; +Cc: gcc-patches, Richard Earnshaw, Kyrylo Tkachov

Alex Coplan <alex.coplan@arm.com> writes:
> Hi,
>
> As it stands, GCC doesn't document any public AArch64-specific operand
> modifiers for use in inline asm.  This patch fixes that by documenting
> an initial set of public AArch64-specific operand modifiers.
>
> Tested with make html and checking the output looks OK in a browser.
>
> OK for trunk?
>
> Thanks,
> Alex
>
> gcc/ChangeLog:
>
> 	* doc/extend.texi: Document AArch64 Operand Modifiers.

OK.  And thanks for doing this.  The previous line of "only documented
AArch64 modifiers are supported in asms" and "no AArch64 modifiers
are documented" just wasn't defensible, especially given that many of
the modifiers in the patch are necessary for even basic usage.

Richard

> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
> index e8b5e771f7a..6ade36759ee 100644
> --- a/gcc/doc/extend.texi
> +++ b/gcc/doc/extend.texi
> @@ -11723,6 +11723,31 @@ operand as if it were a memory reference.
>  @tab @code{%l0}
>  @end multitable
>  
> +@anchor{aarch64Operandmodifiers}
> +@subsubsection AArch64 Operand Modifiers
> +
> +The following table shows the modifiers supported by AArch64 and their effects:
> +
> +@multitable @columnfractions .10 .90
> +@headitem Modifier @tab Description
> +@item @code{w} @tab Print a 32-bit general-purpose register name or, given a
> +constant zero operand, the 32-bit zero register (@code{wzr}).
> +@item @code{x} @tab Print a 64-bit general-purpose register name or, given a
> +constant zero operand, the 64-bit zero register (@code{xzr}).
> +@item @code{b} @tab Print an FP/SIMD register name with a @code{b} (byte, 8-bit)
> +prefix.
> +@item @code{h} @tab Print an FP/SIMD register name with an @code{h} (halfword,
> +16-bit) prefix.
> +@item @code{s} @tab Print an FP/SIMD register name with an @code{s} (single
> +word, 32-bit) prefix.
> +@item @code{d} @tab Print an FP/SIMD register name with a @code{d} (doubleword,
> +64-bit) prefix.
> +@item @code{q} @tab Print an FP/SIMD register name with a @code{q} (quadword,
> +128-bit) prefix.
> +@item @code{Z} @tab Print an FP/SIMD register name as an SVE register (i.e. with
> +a @code{z} prefix).  This is a no-op for SVE register operands.
> +@end multitable
> +
>  @anchor{x86Operandmodifiers}
>  @subsubsection x86 Operand Modifiers
>  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-14 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 16:34 [PATCH] doc: Document AArch64-specific asm operand modifiers Alex Coplan
2023-12-14 16:45 ` Richard Sandiford

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).