summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2017-12-19 18:15:32 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2017-12-21 13:23:51 +0000
commitf9d6cf7eff123724a31e95195abcabc560481dda (patch)
tree7e717276e8fe14cde5dc9bd2a44a279cb7a7fa1d
parentde437514d0bed8ebbe20fc290ee3b5924fda286b (diff)
downloadgem5-f9d6cf7eff123724a31e95195abcabc560481dda.tar.xz
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 <giacomo.travaglini@arm.com> Reviewed-by: Chuan Zhu <chuan.zhu@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/6881 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
-rw-r--r--src/arch/arm/insts/static_inst.hh2
1 files changed, 1 insertions, 1 deletions
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<MachInst>(mask(instSize() * 8));
+ return static_cast<MachInst>(machInst & (mask(instSize() * 8)));
}
};
}