From: Giacomo Travaglini Date: Tue, 19 Dec 2017 18:15:32 +0000 (+0000) Subject: arch-arm: Fix StaticInst encoding() method X-Git-Tag: v19.0.0.0~2418 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9d6cf7eff123724a31e95195abcabc560481dda;p=gem5.git arch-arm: Fix StaticInst encoding() method The previously introduced method was missing the machInst value to be masked. Change-Id: Ic722f7cc2abc680da1a1f19c08299338b5c859a6 Signed-off-by: Giacomo Travaglini Reviewed-by: Chuan Zhu Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/6881 Maintainer: Andreas Sandberg --- diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh index 4595646cb..7ca1a84b6 100644 --- a/src/arch/arm/insts/static_inst.hh +++ b/src/arch/arm/insts/static_inst.hh @@ -440,7 +440,7 @@ class ArmStaticInst : public StaticInst MachInst encoding() const { - return static_cast(mask(instSize() * 8)); + return static_cast(machInst & (mask(instSize() * 8))); } }; }