arch-riscv: Fix disassembling of float register instructions
authorIan Jiang <ianjiang.ict@gmail.com>
Fri, 31 Jul 2020 08:00:05 +0000 (16:00 +0800)
committerIan Jiang <ianjiang.ict@gmail.com>
Sat, 1 Aug 2020 02:14:37 +0000 (02:14 +0000)
commitae75e7fc45850663b1c2e3e8b22b00ae4d24b168
treec756e28e7002a41b0d5bc9ddccde52f015503269
parent9f033ee6c8fff0dbfb7cd9cea3f753ba399c0d17
arch-riscv: Fix disassembling of float register instructions

In disassembling of float register instructions, Gem5 always gives 2
source registers rs1 and rs2. However, this is not correct for Mul-Add
instructions which have three rs1, rs2, and rs3, and for Move, Convert
instructions which have only rs1.

For example: (Gem5  output  vs Expected)
- fmadd.d fa0,fa0,fa4 vs  fmadd.d fa0,fa0,fa4,fa5
- fcvt.d.l fa4,a6,zero  vs  fcvt.d.l fa4,a6

This patch fixes the problem.

Change-Id: I02d840eab602ac4a9782911b3cdff2935dfe5e68
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32054
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/riscv/insts/standard.cc