summaryrefslogtreecommitdiff
path: root/src/cpu/exec_context.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-13 00:54:32 -0700
committerGabe Black <gabeblack@google.com>2019-01-16 20:27:47 +0000
commitcf0f625b47a8e0334fc3fe8c0c2cdf5aaaf3389e (patch)
tree75505d60b69951ec0a99ca82e8621803c95d921d /src/cpu/exec_context.hh
parent0c4515ce1ff2a4e40d243df734af2a67cb8b1ad1 (diff)
downloadgem5-cf0f625b47a8e0334fc3fe8c0c2cdf5aaaf3389e.tar.xz
cpu: dev: sim: gpu-compute: Banish some ISA specific register types.
These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are some remaining types, specifically the vector registers and the CCReg. I'm less familiar with these new types of registers, and so will look at getting rid of them at some later time. Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b Reviewed-on: https://gem5-review.googlesource.com/c/13624 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/cpu/exec_context.hh')
-rw-r--r--src/cpu/exec_context.hh29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/cpu/exec_context.hh b/src/cpu/exec_context.hh
index 89efe8415..0fe4a731a 100644
--- a/src/cpu/exec_context.hh
+++ b/src/cpu/exec_context.hh
@@ -72,11 +72,7 @@
*/
class ExecContext {
public:
- typedef TheISA::IntReg IntReg;
typedef TheISA::PCState PCState;
- typedef TheISA::FloatReg FloatReg;
- typedef TheISA::FloatRegBits FloatRegBits;
- typedef TheISA::MiscReg MiscReg;
typedef TheISA::CCReg CCReg;
using VecRegContainer = TheISA::VecRegContainer;
@@ -90,11 +86,11 @@ class ExecContext {
*/
/** Reads an integer register. */
- virtual IntReg readIntRegOperand(const StaticInst *si, int idx) = 0;
+ virtual RegVal readIntRegOperand(const StaticInst *si, int idx) = 0;
/** Sets an integer register to a value. */
virtual void setIntRegOperand(const StaticInst *si,
- int idx, IntReg val) = 0;
+ int idx, RegVal val) = 0;
/** @} */
@@ -106,13 +102,12 @@ class ExecContext {
/** Reads a floating point register in its binary format, instead
* of by value. */
- virtual FloatRegBits readFloatRegOperandBits(const StaticInst *si,
- int idx) = 0;
+ virtual RegVal readFloatRegOperandBits(const StaticInst *si, int idx) = 0;
/** Sets the bits of a floating point register of single width
* to a binary value. */
virtual void setFloatRegOperandBits(const StaticInst *si,
- int idx, FloatRegBits val) = 0;
+ int idx, RegVal val) = 0;
/** @} */
@@ -185,21 +180,21 @@ class ExecContext {
* @{
* @name Misc Register Interfaces
*/
- virtual MiscReg readMiscRegOperand(const StaticInst *si, int idx) = 0;
+ virtual RegVal readMiscRegOperand(const StaticInst *si, int idx) = 0;
virtual void setMiscRegOperand(const StaticInst *si,
- int idx, const MiscReg &val) = 0;
+ int idx, const RegVal &val) = 0;
/**
* Reads a miscellaneous register, handling any architectural
* side effects due to reading that register.
*/
- virtual MiscReg readMiscReg(int misc_reg) = 0;
+ virtual RegVal readMiscReg(int misc_reg) = 0;
/**
* Sets a miscellaneous register, handling any architectural
* side effects due to writing that register.
*/
- virtual void setMiscReg(int misc_reg, const MiscReg &val) = 0;
+ virtual void setMiscReg(int misc_reg, const RegVal &val) = 0;
/** @} */
@@ -326,10 +321,10 @@ class ExecContext {
*/
#if THE_ISA == MIPS_ISA
- virtual MiscReg readRegOtherThread(const RegId& reg,
- ThreadID tid = InvalidThreadID) = 0;
- virtual void setRegOtherThread(const RegId& reg, MiscReg val,
- ThreadID tid = InvalidThreadID) = 0;
+ virtual RegVal readRegOtherThread(const RegId &reg,
+ ThreadID tid=InvalidThreadID) = 0;
+ virtual void setRegOtherThread(const RegId& reg, RegVal val,
+ ThreadID tid=InvalidThreadID) = 0;
#endif
/** @} */