arch-arm: Downgrade constexpr causing build errors to const
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 23 Apr 2020 16:26:02 +0000 (17:26 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 30 Apr 2020 09:14:42 +0000 (09:14 +0000)
Change-Id: Idf5ae62603b6181d44aaaef91b774fa7b26eb718
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28167
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/arm/aapcs32.hh

index fd63483ef426299484fd6a1efc3f98648c24a6ec..e2e5d09f5aff9b393db3d43c3e336282c595f1e6 100644 (file)
@@ -489,12 +489,12 @@ struct Argument<Aapcs32Vfp, Float, typename std::enable_if<
         if (state.variadic)
             return getArgument<Aapcs32, Float>(tc, state);
 
-        int index = state.allocate(Float{}, 1);
+        const int index = state.allocate(Float{}, 1);
 
         if (index >= 0) {
             constexpr int lane_per_reg = 16 / sizeof(Float);
-            constexpr int reg = index / lane_per_reg;
-            constexpr int lane = index % lane_per_reg;
+            const int reg = index / lane_per_reg;
+            const int lane = index % lane_per_reg;
 
             RegId id(VecRegClass, reg);
             auto val = tc->readVecReg(id);
@@ -558,14 +558,14 @@ struct Argument<Aapcs32Vfp, HA, typename std::enable_if<
         if (useBaseABI(state))
             return getArgument<Aapcs32, HA>(tc, state);
 
-        int base = state.allocate(Elem{}, Count);
+        const int base = state.allocate(Elem{}, Count);
         if (base >= 0) {
             constexpr int lane_per_reg = 16 / sizeof(Elem);
             HA ha;
             for (int i = 0; i < Count; i++) {
-                constexpr int index = base + i;
-                constexpr int reg = index / lane_per_reg;
-                constexpr int lane = index % lane_per_reg;
+                const int index = base + i;
+                const int reg = index / lane_per_reg;
+                const int lane = index % lane_per_reg;
 
                 RegId id(VecRegClass, reg);
                 auto val = tc->readVecReg(id);