qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 10/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' i


From: Daniel Henrique Barboza
Subject: Re: [PATCH 10/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ()
Date: Mon, 15 Jan 2024 10:51:15 -0300
User-agent: Mozilla Thunderbird



On 1/12/24 19:45, Richard Henderson wrote:
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?

Yeah, I got lost in that explanation. I'll simplify it to be just a simple case 
of
adjusting the right shift to use vlenb like in patches 8 and 9.


Thanks,


Daniel





r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]