arch-arm: Rewrite MSR immediate instruction class
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 30 Jul 2019 10:34:44 +0000 (11:34 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Mon, 5 Aug 2019 08:44:51 +0000 (08:44 +0000)
commitfd1a8bed393a2ef48d584fcabeee4d98eda0e3fa
tree833b58843b355645555f8df027b085f52f946c22
parent6b94fbb3ddb6e3b75c2499e3bd3e7d7400069133
arch-arm: Rewrite MSR immediate instruction class

MSR <pstatefield>, #imm is used for setting a PSTATE field using an
immediate. Current implementation has the following flaws:

* There is no base MSR immediate definition: all the existing
PSTATE fields have a different class definition
* Those implementation make use of a generic data64 base class
which results in a wrong disassembly (pstate register is printed as an
integer register).

This patch is fixing this by defining a new base class (MiscRegImmOp64)
and new related templates. In this way, we aim to ease addition of new
PSTATE fields (in ARMv8.x)

Change-Id: I71b630ff32abe1b105bbb3ab5781c6589b67d419
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19728
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/insts/misc64.cc
src/arch/arm/insts/misc64.hh
src/arch/arm/isa/formats/aarch64.isa
src/arch/arm/isa/insts/data64.isa
src/arch/arm/isa/templates/misc64.isa