diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2024-09-02 09:56:56 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2024-09-02 09:56:56 +0100 |
commit | a4b6c6ab0ba04a4fa409608a860067770317d0de (patch) | |
tree | c6f25f389d77fd8921de21f4a9a1fc4997cd00f9 /gcc/doc | |
parent | 5cbfb3a799bcded1a06897400a09f0efadc1f9e8 (diff) | |
download | gcc-a4b6c6ab0ba04a4fa409608a860067770317d0de.zip gcc-a4b6c6ab0ba04a4fa409608a860067770317d0de.tar.gz gcc-a4b6c6ab0ba04a4fa409608a860067770317d0de.tar.bz2 |
Rename ASM_INPUT_P to ASM_BASIC_P
ASM_INPUT_P is so named because it causes the eventual rtl insn
pattern to be a top-level ASM_INPUT rather than an ASM_OPERANDS.
However, this name has caused confusion, partly due to earlier
documentation. The name also sounds related to ASM_INPUTS but
is for a different piece of state.
This patch renames it to ASM_BASIC_P, with the inverse meaning
an extended asm. ("Basic asm" is the term used in extend.texi.)
gcc/
* doc/generic.texi (ASM_BASIC_P): Document.
* tree.h (ASM_INPUT_P): Rename to...
(ASM_BASIC_P): ...this.
(ASM_VOLATILE_P, ASM_INLINE_P): Reindent.
* gimplify.cc (gimplify_asm_expr): Update after above renaming.
* tree-core.h (tree_base): Likewise.
gcc/c/
* c-typeck.cc (build_asm_expr): Rename ASM_INPUT_P to ASM_BASIC_P.
gcc/cp/
* pt.cc (tsubst_stmt): Rename ASM_INPUT_P to ASM_BASIC_P.
* parser.cc (cp_parser_asm_definition): Likewise.
gcc/d/
* toir.cc (IRVisitor): Rename ASM_INPUT_P to ASM_BASIC_P.
gcc/jit/
* jit-playback.cc (playback::block::add_extended_asm): Rename
ASM_INPUT_P to ASM_BASIC_P.
gcc/m2/
* gm2-gcc/m2block.cc (flush_pending_note): Rename ASM_INPUT_P
to ASM_BASIC_P.
* gm2-gcc/m2statement.cc (m2statement_BuildAsm): Likewise.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/generic.texi | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/doc/generic.texi b/gcc/doc/generic.texi index c596b7d..3de394f 100644 --- a/gcc/doc/generic.texi +++ b/gcc/doc/generic.texi @@ -2095,11 +2095,17 @@ asm ("fsinx %1,%0" : "=f" (result) : "f" (angle)); @end smallexample The first string is the @code{ASM_STRING}, containing the instruction template. The next two strings are the output and inputs, respectively; -this statement has no clobbers. As this example indicates, ``plain'' -assembly statements are merely a special case of extended assembly -statements; they have no cv-qualifiers, outputs, inputs, or clobbers. -All of the strings will be @code{NUL}-terminated, and will contain no -embedded @code{NUL}-characters. +this statement has no clobbers. All of the strings will be +@code{NUL}-terminated, and will contain no embedded @code{NUL}-characters. + +@code{ASM_BASIC_P} indicates whether the assembly statement used the +``basic'' syntax (as for the first example above) or whether it used +the extended syntax (as for the second example above). In many cases +this information could be inferred from other accessors, but the flag +is necessary to distinguish extended statements that have no operands +from basic statements. A key difference between the two is that +@code{%} substitution is applied to @code{ASM_STRING} for extended +statements but not for basic statements. If the assembly statement is declared @code{volatile}, or if the statement was not an extended assembly statement, and is therefore |