arch-arm: Fix usage of RegId constructor for VecElem
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 12 Dec 2018 16:56:28 +0000 (16:56 +0000)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 15 Jan 2019 17:09:53 +0000 (17:09 +0000)
RegId() constructor requires three arguments in case of a VecElem
register: the class, the vector index and the element index inside the
vector, otherwise it panics.

Change-Id: Ic842df4dcddaffa83b211aa6e1dd1953cafa4951
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/15615
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/arch/arm/isa.hh

index 1ec0f4676a77bec57dba5f31e320cf43bee16f90..2b1bdcb4a3a0057ff9ac26b2861fdbcda1d990a9 100644 (file)
@@ -444,7 +444,8 @@ namespace ArmISA
               case VecRegClass:
                 return RegId(VecRegClass, flattenVecIndex(regId.index()));
               case VecElemClass:
-                return RegId(VecElemClass, flattenVecElemIndex(regId.index()));
+                return RegId(VecElemClass, flattenVecElemIndex(regId.index()),
+                             regId.elemIndex());
               case CCRegClass:
                 return RegId(CCRegClass, flattenCCIndex(regId.index()));
               case MiscRegClass: