cpu: Fix usage of setArchVecElem
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)
setArchVecElem should create a VecElemClass RegId, and not a VecRegClass.
Initializing a VecRegClass with three arguments makes it panic

Change-Id: I6c398d67305bfe7bea12cb02edd4f4c3a202e69a
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/15655
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/cpu/o3/cpu.cc

index e5b8103abaa4e90a971ceebd5d46d2cd6ad7022f..8f399e9f53594d573eca8196e680ec52dbc8d08d 100644 (file)
@@ -1466,7 +1466,7 @@ FullO3CPU<Impl>::setArchVecElem(const RegIndex& reg_idx, const ElemIndex& ldx,
                                 const VecElem& val, ThreadID tid)
 {
     PhysRegIdPtr phys_reg = commitRenameMap[tid].lookup(
-                RegId(VecRegClass, reg_idx, ldx));
+                RegId(VecElemClass, reg_idx, ldx));
     setVecElem(phys_reg, val);
 }