arch: Make the ISA register types aliases for the global types.
The ISA specific types can thus be phased out. Change-Id: I8ea531a099fad140a4ec9c91cd972fe044111d60 Reviewed-on: https://gem5-review.googlesource.com/c/13623 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
This commit is contained in:
@@ -45,14 +45,14 @@ using AlphaISAInst::MaxInstDestRegs;
|
||||
// Locked read/write flags are can't be detected by the ISA parser
|
||||
const int MaxMiscDestRegs = AlphaISAInst::MaxMiscDestRegs + 1;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef RegVal IntReg;
|
||||
|
||||
// floating point register file entry type
|
||||
typedef double FloatReg;
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
|
||||
// control register file contents
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// dummy typedef since we don't have CC regs
|
||||
typedef uint8_t CCReg;
|
||||
|
||||
@@ -59,11 +59,11 @@ const int MaxInstSrcRegs = ArmISAInst::MaxInstDestRegs +
|
||||
using ArmISAInst::MaxInstDestRegs;
|
||||
using ArmISAInst::MaxMiscDestRegs;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef RegVal IntReg;
|
||||
|
||||
// floating point register file entry type
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef double FloatReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
|
||||
// Number of VecElem per Vector Register, computed based on the vector length
|
||||
constexpr unsigned NumVecElemPerVecReg = 4;
|
||||
@@ -73,7 +73,7 @@ using ConstVecReg = ::VecRegT<VecElem, NumVecElemPerVecReg, true>;
|
||||
using VecRegContainer = VecReg::Container;
|
||||
|
||||
// cop-0/cop-1 system control register
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// condition code register; must be at least 32 bits for FpCondCodes
|
||||
typedef uint64_t CCReg;
|
||||
|
||||
@@ -278,14 +278,14 @@ const int NumMiscRegs = MISCREG_NUMREGS;
|
||||
|
||||
const int TotalNumRegs = NumIntRegs + NumFloatRegs + NumMiscRegs;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef RegVal IntReg;
|
||||
|
||||
// floating point register file entry type
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef double FloatReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
|
||||
// cop-0/cop-1 system control register
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// dummy typedef since we don't have CC regs
|
||||
typedef uint8_t CCReg;
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
|
||||
namespace NullISA {
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef double FloatReg;
|
||||
typedef RegVal IntReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef uint8_t CCReg;
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
const RegIndex ZeroReg = 0;
|
||||
|
||||
// dummy typedefs since we don't have vector regs
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "arch/generic/vec_reg.hh"
|
||||
#include "arch/power/generated/max_inst_regs.hh"
|
||||
#include "arch/power/miscregs.hh"
|
||||
#include "base/types.hh"
|
||||
|
||||
namespace PowerISA {
|
||||
|
||||
@@ -44,12 +45,12 @@ using PowerISAInst::MaxInstDestRegs;
|
||||
// be detected by it. Manually add it here.
|
||||
const int MaxMiscDestRegs = PowerISAInst::MaxMiscDestRegs + 1;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef RegVal IntReg;
|
||||
|
||||
// Floating point register file entry type
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef double FloatReg;
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// dummy typedef since we don't have CC regs
|
||||
typedef uint8_t CCReg;
|
||||
|
||||
@@ -63,11 +63,11 @@ using RiscvISAInst::MaxInstSrcRegs;
|
||||
using RiscvISAInst::MaxInstDestRegs;
|
||||
const int MaxMiscDestRegs = 1;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef double FloatReg;
|
||||
typedef RegVal IntReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef uint8_t CCReg; // Not applicable to Riscv
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// dummy typedefs since we don't have vector regs
|
||||
const unsigned NumVecElemPerVecReg = 2;
|
||||
|
||||
@@ -45,10 +45,10 @@ using SparcISAInst::MaxInstSrcRegs;
|
||||
using SparcISAInst::MaxInstDestRegs;
|
||||
using SparcISAInst::MaxMiscDestRegs;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef uint64_t MiscReg;
|
||||
typedef double FloatReg;
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef RegVal IntReg;
|
||||
typedef RegVal MiscReg;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
|
||||
// dummy typedef since we don't have CC regs
|
||||
typedef uint8_t CCReg;
|
||||
|
||||
@@ -90,9 +90,9 @@ const int FramePointerReg = INTREG_RBP;
|
||||
// value
|
||||
const int SyscallPseudoReturnReg = INTREG_RDX;
|
||||
|
||||
typedef uint64_t IntReg;
|
||||
typedef RegVal IntReg;
|
||||
typedef uint64_t CCReg;
|
||||
typedef uint64_t MiscReg;
|
||||
typedef RegVal MiscReg;
|
||||
|
||||
// dummy typedefs since we don't have vector regs
|
||||
constexpr unsigned NumVecElemPerVecReg = 2;
|
||||
@@ -105,8 +105,8 @@ constexpr unsigned NumVecRegs = 1;
|
||||
|
||||
//These floating point types are correct for mmx, but not
|
||||
//technically for x87 (80 bits) or at all for xmm (128 bits)
|
||||
typedef double FloatReg;
|
||||
typedef uint64_t FloatRegBits;
|
||||
typedef FloatRegVal FloatReg;
|
||||
typedef RegVal FloatRegBits;
|
||||
|
||||
} // namespace X86ISA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user