arch-riscv: Fix compressed branch op offset
authorAlec Roelke <ar4jc@virginia.edu>
Mon, 19 Feb 2018 17:21:33 +0000 (12:21 -0500)
committerAlec Roelke <ar4jc@virginia.edu>
Mon, 19 Feb 2018 20:31:33 +0000 (20:31 +0000)
commit7352324d4dda31ffb6fb5997e0fe2378c27e96b9
tree09842cbeb5d3455fac31fa8c9297b37979fd6de3
parent72f15d3b8926432bed4740403d85a76549abb8bb
arch-riscv: Fix compressed branch op offset

There is a bug in RISC-V's compressed branch instructions where the
offsets are not stored in ImmOp's immediate field, causing incorrect
branchTarget() return values.  This patch adds a new compressed branch
op format, CBOp, which correctly stores the offset.

Change-Id: Iac6e9b091d63f3dce4717ee5a9ec31a7cbd6c377
Reviewed-on: https://gem5-review.googlesource.com/8441
Reviewed-by: Tuan Ta <qtt2@cornell.edu>
Maintainer: Alec Roelke <ar4jc@virginia.edu>
src/arch/riscv/isa/decoder.isa
src/arch/riscv/isa/formats/compressed.isa