public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <idsandoe@googlemail.com>
To: Richard Sandiford <richard.sandiford@arm.com>
Cc: "Qian, Jianhua" <qianjh@cn.fujitsu.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] fix testcase gcc.target/aarch64/insv_1.c
Date: Thu, 27 Aug 2020 09:39:48 +0100	[thread overview]
Message-ID: <92CC8A71-D279-4D12-BCA5-3A724308E267@googlemail.com> (raw)
In-Reply-To: <mptr1rs8qku.fsf@arm.com>

Richard Sandiford <richard.sandiford@arm.com> wrote:

> "Qian, Jianhua" <qianjh@cn.fujitsu.com> writes:
>> Hi Richard
>>
>> I found that some instructions are using '#' before immediate value,
>> and others are not. For example
>> (define_insn "insv_imm<mode>"
>>  [(set (zero_extract:GPI (match_operand:GPI 0 "register_operand" "+r")
>> 			  (const_int 16)
>> 			  (match_operand:GPI 1 "const_int_operand" "n"))
>> 	(match_operand:GPI 2 "const_int_operand" "n"))]
>>  "UINTVAL (operands[1]) < GET_MODE_BITSIZE (<MODE>mode)
>>   && UINTVAL (operands[1]) % 16 == 0"
>>  "movk\\t%<w>0, %X2, lsl %1"
>>  [(set_attr "type" "mov_imm")]
>> )
>>
>> Are there any standards for this?
>
> No, it's unfortunately inconsistent.  FWIW, if we were going to change  
> this,
> personally I've a slight preference for having the “#”.

Absence of the # makes assemblers based on the LLVM backend reject GCC’s
output, as such I’ve got a strong preference for adding it (I’ve got some  
local
patches for this already).
e.g.
https://github.com/iains/gcc-darwin-arm64/commit/526ffb6b34ddb848853016cd14a438683aa0e6de

(hacking branch, please don’t shoot me, yet :) )

Iain


  reply	other threads:[~2020-08-27  8:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17  2:57 Qian Jianhua
2020-08-26 10:08 ` Richard Sandiford
2020-08-27  3:25   ` Qian, Jianhua
2020-08-27  8:01     ` Richard Sandiford
2020-08-27  8:39       ` Iain Sandoe [this message]
2020-08-28  2:53         ` Qian, Jianhua

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=92CC8A71-D279-4D12-BCA5-3A724308E267@googlemail.com \
    --to=idsandoe@googlemail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=qianjh@cn.fujitsu.com \
    --cc=richard.sandiford@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).