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>
diff --git a/src/arch/power/isa.hh b/src/arch/power/isa.hh
index 3f26f57..16850d1 100644
--- a/src/arch/power/isa.hh
+++ b/src/arch/power/isa.hh
@@ -50,8 +50,8 @@
class ISA : public SimObject
{
protected:
- MiscReg dummy;
- MiscReg miscRegs[NumMiscRegs];
+ RegVal dummy;
+ RegVal miscRegs[NumMiscRegs];
public:
typedef PowerISAParams Params;
@@ -61,14 +61,14 @@
{
}
- 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 @@
}
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");
}
diff --git a/src/arch/power/linux/process.cc b/src/arch/power/linux/process.cc
index f219852..664b93b 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -437,7 +437,7 @@
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 @@
}
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.
diff --git a/src/arch/power/linux/process.hh b/src/arch/power/linux/process.hh
index 9874123..aad4c5f 100644
--- a/src/arch/power/linux/process.hh
+++ b/src/arch/power/linux/process.hh
@@ -45,10 +45,10 @@
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[];
diff --git a/src/arch/power/process.cc b/src/arch/power/process.cc
index cf2153a..ee72ba7 100644
--- a/src/arch/power/process.cc
+++ b/src/arch/power/process.cc
@@ -277,7 +277,7 @@
memState->setStackMin(roundDown(stack_min, pageSize));
}
-PowerISA::IntReg
+RegVal
PowerProcess::getSyscallArg(ThreadContext *tc, int &i)
{
assert(i < 5);
@@ -285,7 +285,7 @@
}
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);
diff --git a/src/arch/power/process.hh b/src/arch/power/process.hh
index 348e375..186bc87 100644
--- a/src/arch/power/process.hh
+++ b/src/arch/power/process.hh
@@ -50,10 +50,10 @@
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);
};
diff --git a/src/arch/power/registers.hh b/src/arch/power/registers.hh
index 909c24e..9d793d3 100644
--- a/src/arch/power/registers.hh
+++ b/src/arch/power/registers.hh
@@ -46,12 +46,6 @@
// 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;