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 <sandipan@linux.ibm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40938
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Sandipan Das
2020-06-14 17:02:00 +05:30
committed by Boris Shingarov
parent 01c9f90e6f
commit a947b45fcf
2 changed files with 12 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ const int NumIntRegs = NumIntArchRegs + NumIntSpecialRegs;
// 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;
enum MiscIntRegNums

View File

@@ -31,7 +31,12 @@ namespace PowerISA
{
const std::vector<int> SEWorkload::SyscallABI::ArgumentRegs = {
3, 4, 5, 6, 7, 8
ArgumentReg0,
ArgumentReg1,
ArgumentReg2,
ArgumentReg3,
ArgumentReg4,
ArgumentReg5
};
} // namespace PowerISA