From: Vasilis Liaskovitis <vliaskovitis@suse.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
ajones@ventanamicro.com, alistair.francis@wdc.com,
philmd@linaro.org
Subject: Re: [PATCH] target/riscv: Add a property to set vill bit on reserved usage of vsetvli instruction
Date: Wed, 18 Jun 2025 23:36:07 +0200 [thread overview]
Message-ID: <CAPnFoxfp1B4nBCLyFjf1RnEH5memnWoW5X-4xN3PpG4Ss_n0xQ@mail.gmail.com> (raw)
In-Reply-To: <9812c3c3-c9e4-4b29-968b-9da99891489a@ventanamicro.com>
Hi,
On Wed, Jun 18, 2025 at 4:22 PM Daniel Henrique Barboza
<dbarboza@ventanamicro.com> wrote:
> > + if ((sew > cpu->cfg.elen) || vill || (ediv != 0) || (reserved != 0) ||
> > + (cpu->cfg.rvv_vsetvl_x0_vill && x0 && (env->vl != vl))) {
>
> In this particular case I don't mind replicating code. The first existing check can be
> left untouched, exiting early before spending time calculating vlmax and vl.
>
> We can then add the new check that depends on vl here, even if we end up copying those
> few "env->something =" lines again. If you really want to avoid code duplication I
> wouldn't oppose adding a 'vill' label and using 'goto' as an alternative of duplicating
> those 6 lines.
thank you for the review. I sent a v2 simply duplicating the code.
thanks,
- Vasilis
>
>
> Patch LGTM otherwise. Thanks,
>
>
> Daniel
>
> > + /* only set vill bit. */
> > + env->vill = 1;
> > + env->vtype = 0;
> > + env->vl = 0;
> > + env->vstart = 0;
> > + return 0;
> > + }
> > +
> > env->vl = vl;
> > env->vtype = s2;
> > env->vstart = 0;
>
prev parent reply other threads:[~2025-06-18 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 7:25 [PATCH] target/riscv: Add a property to set vill bit on reserved usage of vsetvli instruction Vasilis Liaskovitis
2025-06-18 14:22 ` Daniel Henrique Barboza
2025-06-18 21:36 ` Vasilis Liaskovitis [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=CAPnFoxfp1B4nBCLyFjf1RnEH5memnWoW5X-4xN3PpG4Ss_n0xQ@mail.gmail.com \
--to=vliaskovitis@suse.com \
--cc=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=dbarboza@ventanamicro.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
/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 NNTP newsgroup(s).