Alec Roelke has submitted this change and it was merged. (
https://gem5-review.googlesource.com/4040 )
Change subject: riscv: Add unused attribute to some registers.hh constants
......................................................................
riscv: Add unused attribute to some registers.hh constants
Three of the constants defined in arch/riscv/registers.hh
(ReturnValueReg, SyscallNumReg, and SyscallPseudoReturnReg) may cause
the compiler to warn that they are unused, which results in an error.
This patch adds M5_VAR_USED attributes to them to stop this.
Change-Id: Ie6389a55e8ffb3d003a47d02e76bdf9fb5219457
Reviewed-on: https://gem5-review.googlesource.com/4040
Reviewed-by: Jason Lowe-Power <ja...@lowepower.com>
Maintainer: Alec Roelke <ar...@virginia.edu>
---
M src/arch/riscv/registers.hh
1 file changed, 3 insertions(+), 3 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Alec Roelke: Looks good to me, approved
diff --git a/src/arch/riscv/registers.hh b/src/arch/riscv/registers.hh
index e2b04ab..114d7e9 100644
--- a/src/arch/riscv/registers.hh
+++ b/src/arch/riscv/registers.hh
@@ -93,7 +93,7 @@
const int ThreadPointerReg = 4;
const int FramePointerReg = 8;
const std::vector<int> ReturnValueRegs = {10, 11};
-const int ReturnValueReg = ReturnValueRegs[0];
+const int ReturnValueReg M5_VAR_USED = ReturnValueRegs[0];
const std::vector<int> ArgumentRegs = {10, 11, 12, 13, 14, 15, 16, 17};
const int AMOTempReg = 32;
@@ -118,10 +118,10 @@
"ft8", "ft9", "ft10", "ft11"
};
-const int SyscallNumReg = ArgumentRegs[7];
+const int SyscallNumReg M5_VAR_USED = ArgumentRegs[7];
const std::vector<int> SyscallArgumentRegs = {ArgumentRegs[0],
ArgumentRegs[1],
ArgumentRegs[2], ArgumentRegs[3]};
-const int SyscallPseudoReturnReg = ReturnValueRegs[0];
+const int SyscallPseudoReturnReg M5_VAR_USED = ReturnValueRegs[0];
enum MiscRegIndex {
MISCREG_USTATUS = 0x000,
--
To view, visit https://gem5-review.googlesource.com/4040
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6389a55e8ffb3d003a47d02e76bdf9fb5219457
Gerrit-Change-Number: 4040
Gerrit-PatchSet: 2
Gerrit-Owner: Alec Roelke <ar...@virginia.edu>
Gerrit-Reviewer: Alec Roelke <ar...@virginia.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev