public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-4969] aarch64: Add basic target_print_operand support for CONST_STRING
@ 2023-10-27  9:57 Victor Do Nascimento
  0 siblings, 0 replies; only message in thread
From: Victor Do Nascimento @ 2023-10-27  9:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:372e2d62bcb27287234f30908af167886611c12a

commit r14-4969-g372e2d62bcb27287234f30908af167886611c12a
Author: Victor Do Nascimento <victor.donascimento@arm.com>
Date:   Fri Jul 7 13:08:45 2023 +0100

    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.

Diff:
---
 gcc/config/aarch64/aarch64.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 91e4d2358917..5fd7063663c6 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)))
 	    {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-27  9:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27  9:57 [gcc r14-4969] aarch64: Add basic target_print_operand support for CONST_STRING Victor Do Nascimento

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