diff options
author | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-07-07 13:08:45 +0100 |
---|---|---|
committer | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-10-27 10:46:35 +0100 |
commit | 372e2d62bcb27287234f30908af167886611c12a (patch) | |
tree | f8981a1c0a2f4f44db14aee6a73a41ea56631c64 /gcc/config/aarch64/aarch64.cc | |
parent | 89e5d902fc55ad375f149f25a84c516ad360a606 (diff) | |
download | gcc-372e2d62bcb27287234f30908af167886611c12a.zip gcc-372e2d62bcb27287234f30908af167886611c12a.tar.gz gcc-372e2d62bcb27287234f30908af167886611c12a.tar.bz2 |
aarch64: Add basic target_print_operand support for CONST_STRING
Motivated by the need to print system register names in output
assembly, this patch adds the required logic to
`aarch64_print_operand' to accept rtxs of type CONST_STRING and
process these accordingly.
Consequently, an rtx such as:
(set (reg/i:DI 0 x0)
(unspec:DI [(const_string ("s3_3_c13_c2_2"))])
can now be output correctly using the following output pattern when
composing `define_insn's:
"mrs\t%x0, %1"
gcc/ChangeLog
* config/aarch64/aarch64.cc (aarch64_print_operand): Add
support for CONST_STRING.
Diffstat (limited to 'gcc/config/aarch64/aarch64.cc')
-rw-r--r-- | gcc/config/aarch64/aarch64.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 91e4d23..5fd7063 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -12366,6 +12366,11 @@ aarch64_print_operand (FILE *f, rtx x, int code) switch (GET_CODE (x)) { + case CONST_STRING: + { + asm_fprintf (f, "%s", XSTR (x, 0)); + break; + } case REG: if (aarch64_sve_data_mode_p (GET_MODE (x))) { |