arch-arm: Downgrade constexpr causing build errors to const

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>
This commit is contained in:
Nikos Nikoleris
2020-04-23 17:26:02 +01:00
parent 41c88839a9
commit 91c0056481

View 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);