public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Victor Do Nascimento <victor.donascimento@arm.com>,
	gcc-patches@gcc.gnu.org
Cc: kyrylo.tkachov@arm.com, richard.sandiford@arm.com,
	Richard.Earnshaw@arm.com
Subject: Re: [PATCH 4/6] aarch64: Add basic target_print_operand support for CONST_STRING
Date: Thu, 5 Oct 2023 13:33:17 +0100	[thread overview]
Message-ID: <98c1b0a8-32d0-d432-4ed1-bc12d7e1cc80@foss.arm.com> (raw)
In-Reply-To: <b2664e07-27e1-301f-8b80-728eb69f110d@foss.arm.com>



On 05/10/2023 13:26, Richard Earnshaw wrote:
> 
> 
> On 03/10/2023 16:18, Victor Do Nascimento wrote:
>> 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 ("amcgcr_el0"))])
>>
>> can now be output correctly using the following output pattern when
>> composing `define_insn's:
>>
>>    "mrs\t%x0, %1"
>>
>> gcc/ChangeLog
>>
>>     * gcc/config/aarch64/aarch64.cc (aarch64_print_operand): Add
>>     support for CONST_STRING.
>> ---
>>   gcc/config/aarch64/aarch64.cc | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/gcc/config/aarch64/aarch64.cc 
>> b/gcc/config/aarch64/aarch64.cc
>> index dd5ac1cbc8d..d6dd0586ac1 100644
>> --- a/gcc/config/aarch64/aarch64.cc
>> +++ b/gcc/config/aarch64/aarch64.cc
>> @@ -12400,6 +12400,12 @@ aarch64_print_operand (FILE *f, rtx x, int code)
>>         switch (GET_CODE (x))
>>       {
>> +    case CONST_STRING:
>> +      {
>> +        const char *output_op = XSTR (x, 0);
>> +        asm_fprintf (f, "%s", output_op);
>> +        break;
>> +      }
>>       case REG:
>>         if (aarch64_sve_data_mode_p (GET_MODE (x)))
>>           {
> 
> Didn't we discuss (off list) always printing out the generic register 
> names, so that there was less dependency on having a specific assembler 
> version that knows about newer sysregs?
> 

You can ignore this.  I've just seen that the tests show that is happening.

Reviewed-by: rearnsha@arm.com

> R.

  reply	other threads:[~2023-10-05 12:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 15:18 [PATCH 0/6] aarch64: Add support for __arm_rsr and __arm_wsr ACLE function family Victor Do Nascimento
2023-10-03 15:18 ` [PATCH 1/6] aarch64: Sync system register information with Binutils Victor Do Nascimento
2023-10-05 11:42   ` Richard Earnshaw
2023-10-05 13:04     ` Victor Do Nascimento
2023-10-09  0:02       ` Ramana Radhakrishnan
2023-10-09 12:52         ` Victor Do Nascimento
2023-10-03 15:18 ` [PATCH 2/6] aarch64: Add support for aarch64-sys-regs.def Victor Do Nascimento
2023-10-05 12:03   ` Richard Earnshaw
2023-10-03 15:18 ` [PATCH 3/6] aarch64: Implement system register validation tools Victor Do Nascimento
2023-10-05 12:24   ` Richard Earnshaw
2023-10-03 15:18 ` [PATCH 4/6] aarch64: Add basic target_print_operand support for CONST_STRING Victor Do Nascimento
2023-10-05 12:26   ` Richard Earnshaw
2023-10-05 12:33     ` Richard Earnshaw [this message]
2023-10-05 12:47     ` Victor Do Nascimento
2023-10-03 15:18 ` [PATCH 5/6] aarch64: Implement system register r/w arm ACLE intrinsic functions Victor Do Nascimento
2023-10-05 12:40   ` Richard Earnshaw
2023-10-03 15:18 ` [PATCH 6/6] aarch64: Add front-end argument type checking for target builtins Victor Do Nascimento
2023-10-05 12:48   ` Richard Earnshaw
2023-10-07 11:53     ` Richard Sandiford
2023-10-09 13:12       ` Victor Do Nascimento
2023-10-10 11:20         ` Richard Earnshaw (lists)
2023-10-12 10:37           ` Richard Sandiford

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=98c1b0a8-32d0-d432-4ed1-bc12d7e1cc80@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@arm.com \
    --cc=richard.sandiford@arm.com \
    --cc=victor.donascimento@arm.com \
    /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: link
Be 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).