From: Richard Henderson <richard.henderson@linaro.org>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
qemu-devel@nongnu.org
Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com,
bmeng@tinylab.org, liwei1518@gmail.com,
zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com,
max.chou@sifive.com
Subject: Re: [PATCH 10/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ()
Date: Sat, 13 Jan 2024 09:45:22 +1100 [thread overview]
Message-ID: <fd99b822-16e5-44be-b314-ed986291e877@linaro.org> (raw)
In-Reply-To: <20240112213812.173521-11-dbarboza@ventanamicro.com>
On 1/13/24 08:38, Daniel Henrique Barboza wrote:
> MAXSZ() returns the value in bytes. Now that we have access to vlenb
> we don't need to compensate with a '-3' in the scale to use 'vlen'.
>
> MAXSZ() now works as follows:
>
> LMUL lmul=scale MAXSZ (vlenb >> -scale)
> 1 0 vlenb
> 2 1 vlenb << 1
> 4 2 vlenb << 2
> 8 3 vlenb << 3
Um, what?
> static inline uint32_t MAXSZ(DisasContext *s)
> {
> - int scale = s->lmul - 3;
> - return s->cfg_ptr->vlen >> -scale;
> + return s->cfg_ptr->vlenb >> -s->lmul;
There's no left-shift here, either before or after.
Bug?
r~
next prev parent reply other threads:[~2024-01-12 22:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 21:37 [PATCH 00/13] target/riscv: add 'cpu->cfg.vlenb', remove 'cpu->cfg.vlen' Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 01/13] target/riscv: add 'vlenb' field in cpu->cfg Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 02/13] target/riscv/csr.c: use 'vlenb' instead of 'vlen' Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 03/13] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen' Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 04/13] target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 05/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 06/13] target/riscv/insn_trans/trans_rvvk.c.inc: " Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 07/13] target/riscv/vector_helper.c: " Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 08/13] target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl) Daniel Henrique Barboza
2024-01-12 22:40 ` Richard Henderson
2024-01-12 21:38 ` [PATCH 09/13] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax() Daniel Henrique Barboza
2024-01-12 22:42 ` Richard Henderson
2024-01-12 21:38 ` [PATCH 10/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ() Daniel Henrique Barboza
2024-01-12 22:45 ` Richard Henderson [this message]
2024-01-15 13:51 ` Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 11/13] trans_rvv.c.inc: remove vlmax arg from vec_element_loadx() Daniel Henrique Barboza
2024-01-12 22:51 ` Richard Henderson
2024-01-15 17:57 ` Daniel Henrique Barboza
2024-01-15 20:16 ` Richard Henderson
2024-01-12 21:38 ` [PATCH 12/13] trans_rvv.c.inc: use cpu_vl in trans_vrgather_vi() Daniel Henrique Barboza
2024-01-12 21:38 ` [PATCH 13/13] target/riscv/cpu.c: remove cpu->cfg.vlen Daniel Henrique Barboza
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=fd99b822-16e5-44be-b314-ed986291e877@linaro.org \
--to=richard.henderson@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=bmeng@tinylab.org \
--cc=dbarboza@ventanamicro.com \
--cc=liwei1518@gmail.com \
--cc=max.chou@sifive.com \
--cc=palmer@rivosinc.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.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 NNTP newsgroup(s).