arch-riscv: Fix disassembling for atomic instructions
authorIan Jiang <ianjiang.ict@gmail.com>
Sun, 3 Nov 2019 08:25:06 +0000 (16:25 +0800)
committerIan Jiang <ianjiang.ict@gmail.com>
Mon, 25 Nov 2019 01:26:08 +0000 (01:26 +0000)
commitcd096a6e17cbfe46ff637d34d1caa01b83e4864a
tree5ed6c032bac38e95302279578a066fcc624e7a20
parentbee784dee932f66cefc702971a01a35f3436e929
arch-riscv: Fix disassembling for atomic instructions

The original Gem5 does not give correct disassembly for atomic
instructions, which are implemented with one or two micro instructions.
The correct register indices are not decoded until subsequent micro
instruction is processed. This patch fixes the problem by getting the
register indices and other properties (aq and rl) from certain bitfields
of the machine code in the disassembling function.

Change-Id: I2cdaf0b3c48ff266f19ca707a5de48c9050b3897
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22568
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Alec Roelke <alec.roelke@gmail.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
src/arch/riscv/insts/amo.cc
src/arch/riscv/insts/bitfields.hh