power: Get rid of some ISA specific register types.
authorGabe Black <gabeblack@google.com>
Tue, 20 Nov 2018 03:12:28 +0000 (19:12 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 31 Jan 2019 11:06:34 +0000 (11:06 +0000)
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>

src/arch/power/isa.hh
src/arch/power/linux/process.cc
src/arch/power/linux/process.hh
src/arch/power/process.cc
src/arch/power/process.hh
src/arch/power/registers.hh

index 3f26f57dedeabb818cf47bb867063b8ae6a2c869..16850d1475f591c3dd625479cb4d3bace04eb718 100644 (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");
     }
index f219852f827a974ade876095dcdcac68b0246cb4..664b93bde78f49f6f0c3f11f88d559064f4bb72e 100644 (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.
index 9874123dc71c80c9b6b7e847544fcb16ca49a5fa..aad4c5f0d7fa69db0efcc52d2591aa34bcd032e1 100644 (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[];
index cf2153a1d5c7221619d2e7f2a9bcab97af1d7b64..ee72ba71ae29cc6ebebd5d44848d0d934b96b2a9 100644 (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);
index 348e3750f30805b4a4fd6dcc43cf4532d4fe442b..186bc8745e934e2a44701409e999ed04d7864f25 100644 (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);
 };
 
index 909c24e9632e8866ce2ce018dd3bd04e4dcbffd1..9d793d390f8a29e61421b71d275aa0d28d669b37 100644 (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;