public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH] Allow targets to add USEs to asms
Date: Sat, 12 Nov 2022 18:07:08 -0700	[thread overview]
Message-ID: <607d31c4-d363-577a-6f0a-ae8e3604f10d@gmail.com> (raw)
In-Reply-To: <mpt5yfls8j1.fsf@arm.com>


On 11/11/22 10:30, Richard Sandiford via Gcc-patches wrote:
> Arm's SME has an array called ZA that for inline asm purposes
> is effectively a form of special-purpose memory.  It doesn't
> have an associated storage type and so can't be passed and
> returned in normal C/C++ objects.
>
> We'd therefore like "za" in a clobber list to mean that an inline
> asm can read from and write to ZA.  (Just reading or writing
> individually is unlikely to be useful, but we could add syntax
> for that too if necessary.)
>
> There is currently a TARGET_MD_ASM_ADJUST target hook that allows
> targets to add clobbers to an asm instruction.  This patch
> extends that to allow targets to add USEs as well.
>
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  Also tested by
> building cc1 for one target per affected CPU.  OK to install?
>
> Richard
>
>
> gcc/
> 	* target.def (md_asm_adjust): Add a uses parameter.
> 	* doc/gccint/target-macros/tm.rst.in: Regenerate.
> 	* cfgexpand.cc (expand_asm_loc): Update call to md_asm_adjust.
> 	Handle any USEs created by the target.
> 	(expand_asm_stmt): Likewise.
> 	* recog.cc (asm_noperands): Handle asms with USEs.
> 	(decode_asm_operands): Likewise.
> 	* config/arm/aarch-common-protos.h (arm_md_asm_adjust): Add uses
> 	parameter.
> 	* config/arm/aarch-common.cc (arm_md_asm_adjust): Likewise.
> 	* config/arm/arm.cc (thumb1_md_asm_adjust): Likewise.
> 	* config/avr/avr.cc (avr_md_asm_adjust): Likewise.
> 	* config/cris/cris.cc (cris_md_asm_adjust): Likewise.
> 	* config/i386/i386.cc (ix86_md_asm_adjust): Likewise.
> 	* config/mn10300/mn10300.cc (mn10300_md_asm_adjust): Likewise.
> 	* config/nds32/nds32.cc (nds32_md_asm_adjust): Likewise.
> 	* config/pdp11/pdp11.cc (pdp11_md_asm_adjust): Likewise.
> 	* config/rs6000/rs6000.cc (rs6000_md_asm_adjust): Likewise.
> 	* config/s390/s390.cc (s390_md_asm_adjust): Likewise.
> 	* config/vax/vax.cc (vax_md_asm_adjust): Likewise.
> 	* config/visium/visium.cc (visium_md_asm_adjust): Likewise.

OK

jeff



      reply	other threads:[~2022-11-13  1:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 17:30 Richard Sandiford
2022-11-13  1:07 ` Jeff Law [this message]

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=607d31c4-d363-577a-6f0a-ae8e3604f10d@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).