public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nelson Chu <nelson@rivosinc.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>,
	 Jim Wilson <jim.wilson.gcc@gmail.com>,
	Kito Cheng <kito.cheng@sifive.com>,
	 Jeff Law <jlaw@ventanamicro.com>,
	Greg Favor <gfavor@ventanamicro.com>,
	binutils@sourceware.org
Subject: Re: [PATCH 1/1] RISC-V: Make XVentanaCondOps RV64 only
Date: Wed, 30 Aug 2023 10:45:53 +0800	[thread overview]
Message-ID: <CAPpQWtAyLmoy4aPf=w0XgO=9tbk=jh8Xc+7zGmciJ=XZeyWxNg@mail.gmail.com> (raw)
In-Reply-To: <0af2c2372b816ba128cef7165227d905e419357a.1693359513.git.research_trasio@irq.a4lg.com>

[-- Attachment #1: Type: text/plain, Size: 3033 bytes --]

OKay, thanks.

Nelson

On Wed, Aug 30, 2023 at 9:38 AM Tsukasa OI <research_trasio@irq.a4lg.com>
wrote:

> From: Tsukasa OI <research_trasio@irq.a4lg.com>
>
> Although XVentanaCondOps instructions are XLEN-agonistic, Ventana's manual
> only defines them only for RV64 (because all Ventana's processors implement
> RV64).
>
> This commit limits XVentanaCondOps instructions RV64-only to match the
> behavior of the manual and LLVM.
>
> Note that this commit alone will not make XVentanaCondOps extension with
> RV32 invalid (it just makes XVentanaCondOps on RV32 empty).
>
> opcodes/ChangeLog:
>
>         * riscv-opc.c (riscv_opcodes): Restrict "vt.maskc" and "vt.maskcn"
>         to XLEN=64.
>
> gas/ChangeLog:
>
>         * testsuite/gas/riscv/x-ventana-condops-32.d: New failure test.
>         * testsuite/gas/riscv/x-ventana-condops-32.l: Likewise.
> ---
>  gas/testsuite/gas/riscv/x-ventana-condops-32.d | 3 +++
>  gas/testsuite/gas/riscv/x-ventana-condops-32.l | 3 +++
>  opcodes/riscv-opc.c                            | 4 ++--
>  3 files changed, 8 insertions(+), 2 deletions(-)
>  create mode 100644 gas/testsuite/gas/riscv/x-ventana-condops-32.d
>  create mode 100644 gas/testsuite/gas/riscv/x-ventana-condops-32.l
>
> diff --git a/gas/testsuite/gas/riscv/x-ventana-condops-32.d
> b/gas/testsuite/gas/riscv/x-ventana-condops-32.d
> new file mode 100644
> index 000000000000..ea67515da0e3
> --- /dev/null
> +++ b/gas/testsuite/gas/riscv/x-ventana-condops-32.d
> @@ -0,0 +1,3 @@
> +#as: -march=rv32i_xventanacondops
> +#source: x-ventana-condops.s
> +#error_output: x-ventana-condops-32.l
> diff --git a/gas/testsuite/gas/riscv/x-ventana-condops-32.l
> b/gas/testsuite/gas/riscv/x-ventana-condops-32.l
> new file mode 100644
> index 000000000000..e434caf15f60
> --- /dev/null
> +++ b/gas/testsuite/gas/riscv/x-ventana-condops-32.l
> @@ -0,0 +1,3 @@
> +.*Assembler messages:
> +.*Error: unrecognized opcode `vt.maskc a0,a1,a2'
> +.*Error: unrecognized opcode `vt.maskcn a0,a3,a4'
> diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
> index 067e9fdb611f..f5416605dcc3 100644
> --- a/opcodes/riscv-opc.c
> +++ b/opcodes/riscv-opc.c
> @@ -2174,8 +2174,8 @@ const struct riscv_opcode riscv_opcodes[] =
>  {"th.sync.s",        0, INSN_CLASS_XTHEADSYNC,  "",   MATCH_TH_SYNC_S,
>     MASK_TH_SYNC_S,        match_opcode, 0},
>
>  /* Vendor-specific (Ventana Microsystems) XVentanaCondOps instructions */
> -{"vt.maskc",    0, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKC,
> MASK_VT_MASKC, match_opcode, 0 },
> -{"vt.maskcn",   0, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKCN,
> MASK_VT_MASKCN, match_opcode, 0 },
> +{"vt.maskc",   64, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKC,
> MASK_VT_MASKC, match_opcode, 0 },
> +{"vt.maskcn",  64, INSN_CLASS_XVENTANACONDOPS, "d,s,t", MATCH_VT_MASKCN,
> MASK_VT_MASKCN, match_opcode, 0 },
>
>  /* Terminate the list.  */
>  {0, 0, INSN_CLASS_NONE, 0, 0, 0, 0, 0}
> --
> 2.42.0
>
>

  reply	other threads:[~2023-08-30  2:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30  1:38 [PATCH 0/1] " Tsukasa OI
2023-08-30  1:38 ` [PATCH 1/1] " Tsukasa OI
2023-08-30  2:45   ` Nelson Chu [this message]
2023-08-30  2:48     ` Tsukasa OI
2023-08-30  3:21 ` [PATCH 0/1] " Greg Favor
2023-08-30  3:59   ` Tsukasa OI

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='CAPpQWtAyLmoy4aPf=w0XgO=9tbk=jh8Xc+7zGmciJ=XZeyWxNg@mail.gmail.com' \
    --to=nelson@rivosinc.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=gfavor@ventanamicro.com \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=jlaw@ventanamicro.com \
    --cc=kito.cheng@sifive.com \
    --cc=palmer@dabbelt.com \
    --cc=research_trasio@irq.a4lg.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).