[PATCH 0/3] Correct cbo and lq disassembly

frederic.petrot@univ-grenoble-alpes.fr posted 3 patches 1 week, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260715190737.1381701-1-frederic.petrot@univ-grenoble-alpes.fr
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <Alistair.Francis@wdc.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Weiwei Li <liwei1518@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>
There is a newer version of this series
disas/riscv.c              | 38 +++++++++++++++++++-------------------
target/riscv/insn32.decode |  2 ++
2 files changed, 21 insertions(+), 19 deletions(-)
[PATCH 0/3] Correct cbo and lq disassembly
Posted by frederic.petrot@univ-grenoble-alpes.fr 1 week, 2 days ago
From: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr>

The CBO instructions were, AFAIU, disassembled erroneously.
In addition, lq (load-quad, a RV128 instruction) shares the same
opcode space as the CBOs, which also led to incorrect dasm for that
instruction (understandable since RV128 is an experimental feature).
To avoid overlaps, we now require that lq is decoded only if
rd is not 0, as CBO requires the field corresponding to rd to be zero,
both in dasm and decodetree.
The last patch corrects the original indentation that was making
checkpatch unhappy.

Frédéric Pétrot (3):
  disas/riscv.c: Correct wrong shifts for cbo
  disas/riscv.c: Correct disasm of lq
  disas/riscv.c: Correct indent for checkpatch

 disas/riscv.c              | 38 +++++++++++++++++++-------------------
 target/riscv/insn32.decode |  2 ++
 2 files changed, 21 insertions(+), 19 deletions(-)

-- 
2.43.0


Re: [PATCH 0/3] Correct cbo and lq disassembly
Posted by Peter Maydell 1 week, 1 day ago
On Wed, 15 Jul 2026 at 20:08, <frederic.petrot@univ-grenoble-alpes.fr> wrote:
>
> From: Frédéric Pétrot <frederic.petrot@univ-grenoble-alpes.fr>
>
> The CBO instructions were, AFAIU, disassembled erroneously.
> In addition, lq (load-quad, a RV128 instruction) shares the same
> opcode space as the CBOs, which also led to incorrect dasm for that
> instruction (understandable since RV128 is an experimental feature).
> To avoid overlaps, we now require that lq is decoded only if
> rd is not 0, as CBO requires the field corresponding to rd to be zero,
> both in dasm and decodetree.
> The last patch corrects the original indentation that was making
> checkpatch unhappy.

Reminder: please put some disambiguator in the subject lines
of cover letter emails. "Correct cbo and lq disassembly" doesn't
say it's riscv related so you can't tell without looking into
the email body. Doing this assists people in easily scanning
through the list to find or skip over topics.

thanks
-- PMM