Alec Roelke has submitted this change and it was merged. (
https://gem5-review.googlesource.com/4080 )
Change subject: riscv: Define register index constants using literals
......................................................................
riscv: Define register index constants using literals
To make it clearer what the register indices are for the semantically
meaningful registers defined by src/arch/riscv/registers.hh, the
constants that were defined using other constants were changed to use
the literal values of those constants. This also removes the need to
use the M5_VAR_USED attribute.
Change-Id: I7cccbe45d3d820deb5149a5925415735f6ae2e61
Reviewed-on: https://gem5-review.googlesource.com/4080
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Alec Roelke <[email protected]>
---
M src/arch/riscv/registers.hh
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
Gabe Black: 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 114d7e9..01e3859 100644
--- a/src/arch/riscv/registers.hh
+++ b/src/arch/riscv/registers.hh
@@ -92,8 +92,8 @@
const int GlobalPointerReg = 3;
const int ThreadPointerReg = 4;
const int FramePointerReg = 8;
+const int ReturnValueReg = 10;
const std::vector<int> ReturnValueRegs = {10, 11};
-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,9 @@
"ft8", "ft9", "ft10", "ft11"
};
-const int SyscallNumReg M5_VAR_USED = ArgumentRegs[7];
-const std::vector<int> SyscallArgumentRegs = {ArgumentRegs[0],
ArgumentRegs[1],
- ArgumentRegs[2], ArgumentRegs[3]};
-const int SyscallPseudoReturnReg M5_VAR_USED = ReturnValueRegs[0];
+const int SyscallNumReg = 17;
+const std::vector<int> SyscallArgumentRegs = {10, 11, 12, 13};
+const int SyscallPseudoReturnReg = 10;
enum MiscRegIndex {
MISCREG_USTATUS = 0x000,
--
To view, visit https://gem5-review.googlesource.com/4080
To unsubscribe, visit https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I7cccbe45d3d820deb5149a5925415735f6ae2e61
Gerrit-Change-Number: 4080
Gerrit-PatchSet: 2
Gerrit-Owner: Alec Roelke <[email protected]>
Gerrit-Reviewer: Alec Roelke <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev