power: Get rid of some ISA specific register types.

Change-Id: If63acb10705a9f442255680917d16630748ca8e1
Reviewed-on: https://gem5-review.googlesource.com/c/14465
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2018-11-19 19:12:28 -08:00
parent 6ba2888955
commit b6a124d4d7
6 changed files with 14 additions and 20 deletions

View File

@@ -50,8 +50,8 @@ namespace PowerISA
class ISA : public SimObject
{
protected:
MiscReg dummy;
MiscReg miscRegs[NumMiscRegs];
RegVal dummy;
RegVal miscRegs[NumMiscRegs];
public:
typedef PowerISAParams Params;
@@ -61,14 +61,14 @@ class ISA : public SimObject
{
}
MiscReg
RegVal
readMiscRegNoEffect(int misc_reg) const
{
fatal("Power does not currently have any misc regs defined\n");
return dummy;
}
MiscReg
RegVal
readMiscReg(int misc_reg, ThreadContext *tc)
{
fatal("Power does not currently have any misc regs defined\n");
@@ -76,13 +76,13 @@ class ISA : public SimObject
}
void
setMiscRegNoEffect(int misc_reg, MiscReg val)
setMiscRegNoEffect(int misc_reg, RegVal val)
{
fatal("Power does not currently have any misc regs defined\n");
}
void
setMiscReg(int misc_reg, MiscReg val, ThreadContext *tc)
setMiscReg(int misc_reg, RegVal val, ThreadContext *tc)
{
fatal("Power does not currently have any misc regs defined\n");
}

View File

@@ -437,7 +437,7 @@ PowerLinuxProcess::initState()
PowerProcess::initState();
}
PowerISA::IntReg
RegVal
PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int &i)
{
// Linux apparently allows more parameter than the ABI says it should.
@@ -447,7 +447,7 @@ PowerLinuxProcess::getSyscallArg(ThreadContext *tc, int &i)
}
void
PowerLinuxProcess::setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val)
PowerLinuxProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
{
// Linux apparently allows more parameter than the ABI says it should.
// This limit may need to be increased even further.

View File

@@ -45,10 +45,10 @@ class PowerLinuxProcess : public PowerProcess
void initState();
PowerISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
void setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val);
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];

View File

@@ -277,7 +277,7 @@ PowerProcess::argsInit(int intSize, int pageSize)
memState->setStackMin(roundDown(stack_min, pageSize));
}
PowerISA::IntReg
RegVal
PowerProcess::getSyscallArg(ThreadContext *tc, int &i)
{
assert(i < 5);
@@ -285,7 +285,7 @@ PowerProcess::getSyscallArg(ThreadContext *tc, int &i)
}
void
PowerProcess::setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val)
PowerProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
{
assert(i < 5);
tc->setIntReg(ArgumentReg0 + i, val);

View File

@@ -50,10 +50,10 @@ class PowerProcess : public Process
public:
void argsInit(int intSize, int pageSize);
PowerISA::IntReg getSyscallArg(ThreadContext *tc, int &i);
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
void setSyscallArg(ThreadContext *tc, int i, PowerISA::IntReg val);
void setSyscallArg(ThreadContext *tc, int i, RegVal val);
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
};

View File

@@ -46,12 +46,6 @@ using PowerISAInst::MaxInstDestRegs;
// be detected by it. Manually add it here.
const int MaxMiscDestRegs = PowerISAInst::MaxMiscDestRegs + 1;
typedef RegVal IntReg;
// Floating point register file entry type
typedef RegVal FloatReg;
typedef RegVal MiscReg;
// dummy typedef since we don't have CC regs
typedef uint8_t CCReg;