From: Sandipan Das Date: Sun, 14 Jun 2020 11:32:00 +0000 (+0530) Subject: arch-power: Refactor argument registers X-Git-Tag: develop-gem5-snapshot~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc72457a0784ea18801d73bfe3ab36a649f55489;p=gem5.git arch-power: Refactor argument registers This reintroduces the argument register constants that were removed in commit 7bb456f02 ("arch-power: Delete unused register related constants"), adds a definition for the sixth argument register and switches to these constants to specify the arguments used by the system call ABI. Change-Id: I5804f4d2b27a04d0e7b69132e5abce5761b239f5 Signed-off-by: Sandipan Das --- diff --git a/src/arch/power/registers.hh b/src/arch/power/registers.hh index ad1b60814..c9bdf1c8b 100644 --- a/src/arch/power/registers.hh +++ b/src/arch/power/registers.hh @@ -78,6 +78,12 @@ const int NumMiscRegs = NUM_MISCREGS; // Semantically meaningful register indices const int ReturnValueReg = 3; +const int ArgumentReg0 = 3; +const int ArgumentReg1 = 4; +const int ArgumentReg2 = 5; +const int ArgumentReg3 = 6; +const int ArgumentReg4 = 7; +const int ArgumentReg5 = 8; const int StackPointerReg = 1; // There isn't one in Power, but we need to define one somewhere diff --git a/src/arch/power/se_workload.cc b/src/arch/power/se_workload.cc index 31ff24351..40179f1ef 100644 --- a/src/arch/power/se_workload.cc +++ b/src/arch/power/se_workload.cc @@ -31,7 +31,12 @@ namespace PowerISA { const std::vector SEWorkload::SyscallABI::ArgumentRegs = { - 3, 4, 5, 6, 7, 8 + ArgumentReg0, + ArgumentReg1, + ArgumentReg2, + ArgumentReg3, + ArgumentReg4, + ArgumentReg5 }; } // namespace PowerISA