#include "cpu/reg_class.hh"
+using namespace ArmISA;
+
std::string
MrsOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
{
#include "arch/arm/insts/pred_inst.hh"
-class MrsOp : public PredOp
+class MrsOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
- MrsOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest) :
- PredOp(mnem, _machInst, __opClass), dest(_dest)
+ MrsOp(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
+ ArmISA::IntRegIndex _dest) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), dest(_dest)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class MsrBase : public PredOp
+class MsrBase : public ArmISA::PredOp
{
protected:
uint8_t byteMask;
- MsrBase(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ MsrBase(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
uint8_t _byteMask) :
- PredOp(mnem, _machInst, __opClass), byteMask(_byteMask)
+ ArmISA::PredOp(mnem, _machInst, __opClass), byteMask(_byteMask)
{}
void printMsrBase(std::ostream &os) const;
protected:
uint32_t imm;
- MsrImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- uint32_t _imm, uint8_t _byteMask) :
+ MsrImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, uint32_t _imm, uint8_t _byteMask) :
MsrBase(mnem, _machInst, __opClass, _byteMask), imm(_imm)
{}
class MsrRegOp : public MsrBase
{
protected:
- IntRegIndex op1;
+ ArmISA::IntRegIndex op1;
- MsrRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _op1, uint8_t _byteMask) :
+ MsrRegOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _op1, uint8_t _byteMask) :
MsrBase(mnem, _machInst, __opClass, _byteMask), op1(_op1)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class MrrcOp : public PredOp
+class MrrcOp : public ArmISA::PredOp
{
protected:
- MiscRegIndex op1;
- IntRegIndex dest;
- IntRegIndex dest2;
- uint32_t imm;
+ ArmISA::MiscRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex dest2;
+ uint32_t imm;
- MrrcOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- MiscRegIndex _op1, IntRegIndex _dest, IntRegIndex _dest2,
- uint32_t _imm) :
- PredOp(mnem, _machInst, __opClass), op1(_op1), dest(_dest),
+ MrrcOp(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
+ ArmISA::MiscRegIndex _op1, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _dest2, uint32_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), op1(_op1), dest(_dest),
dest2(_dest2), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class McrrOp : public PredOp
+class McrrOp : public ArmISA::PredOp
{
protected:
- IntRegIndex op1;
- IntRegIndex op2;
- MiscRegIndex dest;
+ ArmISA::IntRegIndex op1;
+ ArmISA::IntRegIndex op2;
+ ArmISA::MiscRegIndex dest;
uint32_t imm;
- McrrOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _op1, IntRegIndex _op2, MiscRegIndex _dest,
- uint32_t _imm) :
- PredOp(mnem, _machInst, __opClass), op1(_op1), op2(_op2),
+ McrrOp(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
+ ArmISA::IntRegIndex _op1, ArmISA::IntRegIndex _op2,
+ ArmISA::MiscRegIndex _dest, uint32_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), op1(_op1), op2(_op2),
dest(_dest), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class ImmOp : public PredOp
+class ImmOp : public ArmISA::PredOp
{
protected:
uint64_t imm;
- ImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ ImmOp(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass), imm(_imm)
+ ArmISA::PredOp(mnem, _machInst, __opClass), imm(_imm)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegImmOp : public PredOp
+class RegImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
uint64_t imm;
- RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass), dest(_dest), imm(_imm)
+ RegImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest, uint64_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), dest(_dest), imm(_imm)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegOp : public PredOp
+class RegRegOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
- RegRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1) :
- PredOp(mnem, _machInst, __opClass), dest(_dest), op1(_op1)
+ RegRegOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), dest(_dest), op1(_op1)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegOp : public PredOp
+class RegOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
- RegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest) :
- PredOp(mnem, _machInst, __opClass), dest(_dest)
+ RegOp(const char *mnem, ArmISA::ExtMachInst _machInst, OpClass __opClass,
+ ArmISA::IntRegIndex _dest) :
+ ArmISA::PredOp(mnem, _machInst, __opClass), dest(_dest)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegImmRegOp : public PredOp
+class RegImmRegOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
uint64_t imm;
- IntRegIndex op1;
+ ArmISA::IntRegIndex op1;
- RegImmRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1) :
- PredOp(mnem, _machInst, __opClass),
+ RegImmRegOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest, uint64_t _imm,
+ ArmISA::IntRegIndex _op1) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), imm(_imm), op1(_op1)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegRegImmOp : public PredOp
+class RegRegRegImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
- IntRegIndex op2;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
+ ArmISA::IntRegIndex op2;
uint64_t imm;
- RegRegRegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2,
+ RegRegRegImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, ArmISA::IntRegIndex _op2,
uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass),
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), op2(_op2), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegRegRegOp : public PredOp
+class RegRegRegRegOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
- IntRegIndex op2;
- IntRegIndex op3;
-
- RegRegRegRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1,
- IntRegIndex _op2, IntRegIndex _op3) :
- PredOp(mnem, _machInst, __opClass),
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
+ ArmISA::IntRegIndex op2;
+ ArmISA::IntRegIndex op3;
+
+ RegRegRegRegOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, ArmISA::IntRegIndex _op2,
+ ArmISA::IntRegIndex _op3) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), op2(_op2), op3(_op3)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegRegOp : public PredOp
+class RegRegRegOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
- IntRegIndex op2;
-
- RegRegRegOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1, IntRegIndex _op2) :
- PredOp(mnem, _machInst, __opClass),
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
+ ArmISA::IntRegIndex op2;
+
+ RegRegRegOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, ArmISA::IntRegIndex _op2) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), op2(_op2)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegImmOp : public PredOp
+class RegRegImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
uint64_t imm;
- RegRegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass),
+ RegRegImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, uint64_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class MiscRegRegImmOp : public PredOp
+class MiscRegRegImmOp : public ArmISA::PredOp
{
protected:
- MiscRegIndex dest;
- IntRegIndex op1;
+ ArmISA::MiscRegIndex dest;
+ ArmISA::IntRegIndex op1;
uint64_t imm;
- MiscRegRegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- MiscRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass),
+ MiscRegRegImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::MiscRegIndex _dest,
+ ArmISA::IntRegIndex _op1, uint64_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegMiscRegImmOp : public PredOp
+class RegMiscRegImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- MiscRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::MiscRegIndex op1;
uint64_t imm;
- RegMiscRegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, MiscRegIndex _op1,
- uint64_t _imm) :
- PredOp(mnem, _machInst, __opClass),
+ RegMiscRegImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::MiscRegIndex _op1, uint64_t _imm) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegImmImmOp : public PredOp
+class RegImmImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
uint64_t imm1;
uint64_t imm2;
- RegImmImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, uint64_t _imm1, uint64_t _imm2) :
- PredOp(mnem, _machInst, __opClass),
+ RegImmImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ uint64_t _imm1, uint64_t _imm2) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), imm1(_imm1), imm2(_imm2)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegImmImmOp : public PredOp
+class RegRegImmImmOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
uint64_t imm1;
uint64_t imm2;
- RegRegImmImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm1, uint64_t _imm2) :
- PredOp(mnem, _machInst, __opClass),
+ RegRegImmImmOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, uint64_t _imm1, uint64_t _imm2) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), imm1(_imm1), imm2(_imm2)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegImmRegShiftOp : public PredOp
+class RegImmRegShiftOp : public ArmISA::PredOp
{
protected:
- IntRegIndex dest;
+ ArmISA::IntRegIndex dest;
uint64_t imm;
- IntRegIndex op1;
+ ArmISA::IntRegIndex op1;
int32_t shiftAmt;
- ArmShiftType shiftType;
+ ArmISA::ArmShiftType shiftType;
- RegImmRegShiftOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
- IntRegIndex _dest, uint64_t _imm, IntRegIndex _op1,
- int32_t _shiftAmt, ArmShiftType _shiftType) :
- PredOp(mnem, _machInst, __opClass),
+ RegImmRegShiftOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ uint64_t _imm, ArmISA::IntRegIndex _op1,
+ int32_t _shiftAmt, ArmISA::ArmShiftType _shiftType) :
+ ArmISA::PredOp(mnem, _machInst, __opClass),
dest(_dest), imm(_imm), op1(_op1),
shiftAmt(_shiftAmt), shiftType(_shiftType)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class UnknownOp : public PredOp
+class UnknownOp : public ArmISA::PredOp
{
protected:
- UnknownOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass) :
- PredOp(mnem, _machInst, __opClass)
+ UnknownOp(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass) :
+ ArmISA::PredOp(mnem, _machInst, __opClass)
{}
std::string generateDisassembly(
* we can still check for hyp traps, as the normal nop instruction
* does not.
*/
-class McrMrcMiscInst : public ArmStaticInst
+class McrMrcMiscInst : public ArmISA::ArmStaticInst
{
protected:
uint64_t iss;
- MiscRegIndex miscReg;
+ ArmISA::MiscRegIndex miscReg;
public:
- McrMrcMiscInst(const char *_mnemonic, ExtMachInst _machInst,
- uint64_t _iss, MiscRegIndex _miscReg);
+ McrMrcMiscInst(const char *_mnemonic, ArmISA::ExtMachInst _machInst,
+ uint64_t _iss, ArmISA::MiscRegIndex _miscReg);
Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const override;
class McrMrcImplDefined : public McrMrcMiscInst
{
public:
- McrMrcImplDefined(const char *_mnemonic, ExtMachInst _machInst,
- uint64_t _iss, MiscRegIndex _miscReg);
+ McrMrcImplDefined(const char *_mnemonic, ArmISA::ExtMachInst _machInst,
+ uint64_t _iss, ArmISA::MiscRegIndex _miscReg);
Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const override;
#include "arch/arm/insts/misc64.hh"
#include "arch/arm/isa.hh"
+using namespace ArmISA;
+
std::string
ImmOp64::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const
{
#include "arch/arm/insts/static_inst.hh"
-class ImmOp64 : public ArmStaticInst
+class ImmOp64 : public ArmISA::ArmStaticInst
{
protected:
uint64_t imm;
- ImmOp64(const char *mnem, ExtMachInst _machInst,
+ ImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
OpClass __opClass, uint64_t _imm) :
- ArmStaticInst(mnem, _machInst, __opClass), imm(_imm)
+ ArmISA::ArmStaticInst(mnem, _machInst, __opClass), imm(_imm)
{}
std::string generateDisassembly(
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegImmImmOp64 : public ArmStaticInst
+class RegRegImmImmOp64 : public ArmISA::ArmStaticInst
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
uint64_t imm1;
uint64_t imm2;
- RegRegImmImmOp64(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1,
- uint64_t _imm1, uint64_t _imm2) :
- ArmStaticInst(mnem, _machInst, __opClass),
+ RegRegImmImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, uint64_t _imm1,
+ int64_t _imm2) :
+ ArmISA::ArmStaticInst(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), imm1(_imm1), imm2(_imm2)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class RegRegRegImmOp64 : public ArmStaticInst
+class RegRegRegImmOp64 : public ArmISA::ArmStaticInst
{
protected:
- IntRegIndex dest;
- IntRegIndex op1;
- IntRegIndex op2;
+ ArmISA::IntRegIndex dest;
+ ArmISA::IntRegIndex op1;
+ ArmISA::IntRegIndex op2;
uint64_t imm;
- RegRegRegImmOp64(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest, IntRegIndex _op1,
- IntRegIndex _op2, uint64_t _imm) :
- ArmStaticInst(mnem, _machInst, __opClass),
+ RegRegRegImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::IntRegIndex _op1, ArmISA::IntRegIndex _op2,
+ uint64_t _imm) :
+ ArmISA::ArmStaticInst(mnem, _machInst, __opClass),
dest(_dest), op1(_op1), op2(_op2), imm(_imm)
{}
Addr pc, const Loader::SymbolTable *symtab) const override;
};
-class UnknownOp64 : public ArmStaticInst
+class UnknownOp64 : public ArmISA::ArmStaticInst
{
protected:
- UnknownOp64(const char *mnem, ExtMachInst _machInst, OpClass __opClass) :
- ArmStaticInst(mnem, _machInst, __opClass)
+ UnknownOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass) :
+ ArmISA::ArmStaticInst(mnem, _machInst, __opClass)
{}
std::string generateDisassembly(
* functionalities even if there is no data movement between GPRs and
* system register.
*/
-class MiscRegOp64 : public ArmStaticInst
+class MiscRegOp64 : public ArmISA::ArmStaticInst
{
protected:
bool miscRead;
- MiscRegOp64(const char *mnem, ExtMachInst _machInst,
+ MiscRegOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
OpClass __opClass, bool misc_read) :
- ArmStaticInst(mnem, _machInst, __opClass),
+ ArmISA::ArmStaticInst(mnem, _machInst, __opClass),
miscRead(misc_read)
{}
- Fault trap(ThreadContext *tc, MiscRegIndex misc_reg,
- ExceptionLevel el, uint32_t immediate) const;
+ Fault trap(ThreadContext *tc, ArmISA::MiscRegIndex misc_reg,
+ ArmISA::ExceptionLevel el, uint32_t immediate) const;
private:
- bool checkEL1Trap(ThreadContext *tc, const MiscRegIndex misc_reg,
- ExceptionLevel el, ExceptionClass &ec,
+ bool checkEL1Trap(ThreadContext *tc, const ArmISA::MiscRegIndex misc_reg,
+ ArmISA::ExceptionLevel el, ArmISA::ExceptionClass &ec,
uint32_t &immediate) const;
- bool checkEL2Trap(ThreadContext *tc, const MiscRegIndex misc_reg,
- ExceptionLevel el, ExceptionClass &ec,
+ bool checkEL2Trap(ThreadContext *tc, const ArmISA::MiscRegIndex misc_reg,
+ ArmISA::ExceptionLevel el, ArmISA::ExceptionClass &ec,
uint32_t &immediate) const;
- bool checkEL3Trap(ThreadContext *tc, const MiscRegIndex misc_reg,
- ExceptionLevel el, ExceptionClass &ec,
+ bool checkEL3Trap(ThreadContext *tc, const ArmISA::MiscRegIndex misc_reg,
+ ArmISA::ExceptionLevel el, ArmISA::ExceptionClass &ec,
uint32_t &immediate) const;
};
class MiscRegImmOp64 : public MiscRegOp64
{
protected:
- MiscRegIndex dest;
+ ArmISA::MiscRegIndex dest;
uint32_t imm;
- MiscRegImmOp64(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, MiscRegIndex _dest,
+ MiscRegImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::MiscRegIndex _dest,
uint32_t _imm) :
MiscRegOp64(mnem, _machInst, __opClass, false),
dest(_dest), imm(_imm)
class MiscRegRegImmOp64 : public MiscRegOp64
{
protected:
- MiscRegIndex dest;
- IntRegIndex op1;
+ ArmISA::MiscRegIndex dest;
+ ArmISA::IntRegIndex op1;
uint32_t imm;
- MiscRegRegImmOp64(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, MiscRegIndex _dest,
- IntRegIndex _op1, uint32_t _imm) :
+ MiscRegRegImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::MiscRegIndex _dest,
+ ArmISA::IntRegIndex _op1, uint32_t _imm) :
MiscRegOp64(mnem, _machInst, __opClass, false),
dest(_dest), op1(_op1), imm(_imm)
{}
class RegMiscRegImmOp64 : public MiscRegOp64
{
protected:
- IntRegIndex dest;
- MiscRegIndex op1;
+ ArmISA::IntRegIndex dest;
+ ArmISA::MiscRegIndex op1;
uint32_t imm;
- RegMiscRegImmOp64(const char *mnem, ExtMachInst _machInst,
- OpClass __opClass, IntRegIndex _dest,
- MiscRegIndex _op1, uint32_t _imm) :
+ RegMiscRegImmOp64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ OpClass __opClass, ArmISA::IntRegIndex _dest,
+ ArmISA::MiscRegIndex _op1, uint32_t _imm) :
MiscRegOp64(mnem, _machInst, __opClass, true),
dest(_dest), op1(_op1), imm(_imm)
{}
{
protected:
const std::string fullMnemonic;
- const MiscRegIndex miscReg;
+ const ArmISA::MiscRegIndex miscReg;
const uint32_t imm;
const bool warning;
public:
- MiscRegImplDefined64(const char *mnem, ExtMachInst _machInst,
- MiscRegIndex misc_reg, bool misc_read,
+ MiscRegImplDefined64(const char *mnem, ArmISA::ExtMachInst _machInst,
+ ArmISA::MiscRegIndex misc_reg, bool misc_read,
uint32_t _imm, const std::string full_mnem,
bool _warning) :
MiscRegOp64(mnem, _machInst, No_OpClass, misc_read),
fullMnemonic(full_mnem), miscReg(misc_reg), imm(_imm),
warning(_warning)
{
- assert(miscReg == MISCREG_IMPDEF_UNIMPL);
+ assert(miscReg == ArmISA::MISCREG_IMPDEF_UNIMPL);
}
protected:
#include "cpu/exec_context.hh"
+using namespace ArmISA;
+
DecoderFaultInst::DecoderFaultInst(ExtMachInst _machInst)
: ArmStaticInst("gem5decoderFault", _machInst, No_OpClass),
faultId(static_cast<DecoderFault>(
#include "arch/arm/insts/static_inst.hh"
-class DecoderFaultInst : public ArmStaticInst
+class DecoderFaultInst : public ArmISA::ArmStaticInst
{
protected:
- DecoderFault faultId;
+ ArmISA::DecoderFault faultId;
const char *faultName() const;
public:
- DecoderFaultInst(ExtMachInst _machInst);
+ DecoderFaultInst(ArmISA::ExtMachInst _machInst);
Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const override;
* 'Unknown' class is used for unrecognized/illegal instructions.
* This is a leaf class.
*/
-class FailUnimplemented : public ArmStaticInst
+class FailUnimplemented : public ArmISA::ArmStaticInst
{
private:
/// Full mnemonic for MRC and MCR instructions including the
std::string fullMnemonic;
public:
- FailUnimplemented(const char *_mnemonic, ExtMachInst _machInst);
- FailUnimplemented(const char *_mnemonic, ExtMachInst _machInst,
+ FailUnimplemented(const char *_mnemonic, ArmISA::ExtMachInst _machInst);
+ FailUnimplemented(const char *_mnemonic, ArmISA::ExtMachInst _machInst,
const std::string& _fullMnemonic);
Fault execute(ExecContext *xc,
* probably make the 'warned' flag a static member of the derived
* class.
*/
-class WarnUnimplemented : public ArmStaticInst
+class WarnUnimplemented : public ArmISA::ArmStaticInst
{
private:
/// Have we warned on this instruction yet?
std::string fullMnemonic;
public:
- WarnUnimplemented(const char *_mnemonic, ExtMachInst _machInst);
- WarnUnimplemented(const char *_mnemonic, ExtMachInst _machInst,
+ WarnUnimplemented(const char *_mnemonic, ArmISA::ExtMachInst _machInst);
+ WarnUnimplemented(const char *_mnemonic, ArmISA::ExtMachInst _machInst,
const std::string& _fullMnemonic);
Fault execute(ExecContext *xc,
* The sole purpose of this instruction is to generate an appropriate
* fault when executed.
*/
-class IllegalExecInst : public ArmStaticInst
+class IllegalExecInst : public ArmISA::ArmStaticInst
{
public:
- IllegalExecInst(ExtMachInst _machInst);
+ IllegalExecInst(ArmISA::ExtMachInst _machInst);
Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const override;
};
-class DebugStep : public ArmStaticInst
+class DebugStep : public ArmISA::ArmStaticInst
{
public:
- DebugStep(ExtMachInst _machInst);
+ DebugStep(ArmISA::ExtMachInst _machInst);
Fault execute(ExecContext *xc,
Trace::InstRecord *traceData) const override;
#include "arch/arm/insts/vfp.hh"
+using namespace ArmISA;
+
/*
* The asm statements below are to keep gcc from reordering code. Otherwise
* the rounding mode might be set after the operation it was intended for, the
#include "mem/packet.hh"
#include "sim/faults.hh"
+namespace ArmISAInst
+{
+using namespace ArmISA;
+}
+
}};
output decoder {{
fa_code = '''
- fault->annotate(ArmFault::SAS, %s);
- fault->annotate(ArmFault::SSE, %s);
- fault->annotate(ArmFault::SRT, dest);
- fault->annotate(ArmFault::SF, %s);
- fault->annotate(ArmFault::AR, %s);
+ fault->annotate(ArmISA::ArmFault::SAS, %s);
+ fault->annotate(ArmISA::ArmFault::SSE, %s);
+ fault->annotate(ArmISA::ArmFault::SRT, dest);
+ fault->annotate(ArmISA::ArmFault::SF, %s);
+ fault->annotate(ArmISA::ArmFault::AR, %s);
''' % (sas_code,
"true" if not self.unsign else "false",
"true" if self.size == 8 else "false",
# The DC ZVA instruction is not classified as a cache maintenance
# instruction, and therefore we shouldn't annotate it.
cachem_fa = '''
- fault->annotate(ArmFault::CM, 1);
- fault->annotate(ArmFault::OFA, faultAddr);
+ fault->annotate(ArmISA::ArmFault::CM, 1);
+ fault->annotate(ArmISA::ArmFault::OFA, faultAddr);
'''
msrdccvau_ea_code = msr_check_code
fa_code = None
if not self.micro and self.flavor in ("normal", "widen", "acquire"):
fa_code = '''
- fault->annotate(ArmFault::SAS, %s);
- fault->annotate(ArmFault::SSE, %s);
- fault->annotate(ArmFault::SRT, dest);
- fault->annotate(ArmFault::SF, %s);
- fault->annotate(ArmFault::AR, %s);
+ fault->annotate(ArmISA::ArmFault::SAS, %s);
+ fault->annotate(ArmISA::ArmFault::SSE, %s);
+ fault->annotate(ArmISA::ArmFault::SRT, dest);
+ fault->annotate(ArmISA::ArmFault::SF, %s);
+ fault->annotate(ArmISA::ArmFault::AR, %s);
''' % ("0" if self.size == 1 else
"1" if self.size == 2 else
"2" if self.size == 4 else "3",
elif wbDecl == None:
codeBlobs["fa_code"] = '''
if (dest != INTREG_PC) {
- fault->annotate(ArmFault::SAS, %s);
- fault->annotate(ArmFault::SSE, %s);
- fault->annotate(ArmFault::SRT, dest);
+ fault->annotate(ArmISA::ArmFault::SAS, %s);
+ fault->annotate(ArmISA::ArmFault::SSE, %s);
+ fault->annotate(ArmISA::ArmFault::SRT, dest);
}
''' %("0" if size == 1 else
"1" if size == 2 else "2",
fa_code = None
if not self.micro and self.flavor in ("normal", "release"):
fa_code = '''
- fault->annotate(ArmFault::SAS, %s);
- fault->annotate(ArmFault::SSE, false);
- fault->annotate(ArmFault::SRT, dest);
- fault->annotate(ArmFault::SF, %s);
- fault->annotate(ArmFault::AR, %s);
+ fault->annotate(ArmISA::ArmFault::SAS, %s);
+ fault->annotate(ArmISA::ArmFault::SSE, false);
+ fault->annotate(ArmISA::ArmFault::SRT, dest);
+ fault->annotate(ArmISA::ArmFault::SF, %s);
+ fault->annotate(ArmISA::ArmFault::AR, %s);
''' % ("0" if self.size == 1 else
"1" if self.size == 2 else
"2" if self.size == 4 else "3",
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override {
+ annotateFault(ArmISA::ArmFault *fault) override {
%(fa_code)s
}
};
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override {
+ annotateFault(ArmISA::ArmFault *fault) override {
%(fa_code)s
}
};
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
Trace::InstRecord *) const override;
virtual void
- annotateFault(ArmFault *fault) override
+ annotateFault(ArmISA::ArmFault *fault) override
{
%(fa_code)s
}
const Addr PageBytes = ULL(1) << PageShift;
} // namespace ArmISA
-using namespace ArmISA;
-
#endif // __ARCH_ARM_ISA_TRAITS_HH__
} // namespace ArmISA
-FsLinux *
+ArmISA::FsLinux *
ArmFsLinuxParams::create()
{
- return new FsLinux(this);
+ return new ArmISA::FsLinux(this);
}
#include "params/ArmNativeTrace.hh"
#include "sim/byteswap.hh"
+using namespace ArmISA;
+
namespace Trace {
#if TRACING_ON
using namespace std;
using namespace Linux;
+using namespace ArmISA;
ArmSystem::ArmSystem(Params *p)
: System(p),
bool highestELIs64() const { return _highestELIs64; }
/** Returns the highest implemented exception level */
- ExceptionLevel
+ ArmISA::ExceptionLevel
highestEL() const
{
if (_haveSecurity)
- return EL3;
+ return ArmISA::EL3;
if (_haveVirtualization)
- return EL2;
- return EL1;
+ return ArmISA::EL2;
+ return ArmISA::EL1;
}
/** Returns the reset address if the highest implemented exception level is
/** Returns the highest implemented exception level for the system of a
* specific thread context
*/
- static ExceptionLevel highestEL(ThreadContext *tc);
+ static ArmISA::ExceptionLevel highestEL(ThreadContext *tc);
/** Return true if the system implements a specific exception level */
- static bool haveEL(ThreadContext *tc, ExceptionLevel el);
+ static bool haveEL(ThreadContext *tc, ArmISA::ExceptionLevel el);
/** Returns true if the system of a specific thread context implements the
* transactional memory extension (TME)
#include "arch/arm/insts/static_inst.hh"
#include "tarmac_tracer.hh"
+using namespace ArmISA;
+
namespace Trace {
// TARMAC Instruction Record static variables
#include "arch/arm/tlb.hh"
#include "arch/arm/tracers/tarmac_tracer.hh"
+using namespace ArmISA;
+
namespace Trace {
TarmacTracerRecordV8::TraceInstEntryV8::TraceInstEntryV8(
clearWakeRequest(tc);
// InitCPU
- Reset().invoke(tc);
+ ArmISA::Reset().invoke(tc);
tc->activate();
}
#include "params/GenericTimerMem.hh"
#include "params/SystemCounter.hh"
+using namespace ArmISA;
+
SystemCounter::SystemCounter(SystemCounterParams *const p)
: SimObject(p),
_enabled(true),
uint32_t cntfrq;
/// Kernel control register
- CNTKCTL cntkctl;
+ ArmISA::CNTKCTL cntkctl;
/// Hypervisor control register
- CNTHCTL cnthctl;
+ ArmISA::CNTHCTL cnthctl;
/// Thread (HW) context associated to this PE implementation
ThreadContext *threadContext;
#include "dev/arm/gic_v3_distributor.hh"
#include "dev/arm/gic_v3_redistributor.hh"
+using namespace ArmISA;
+
const uint8_t Gicv3CPUInterface::GIC_MIN_BPR;
const uint8_t Gicv3CPUInterface::GIC_MIN_BPR_NS;
}
if (hppiCanPreempt()) {
- ArmISA::InterruptTypes int_type = intSignalType(hppi.group);
+ InterruptTypes int_type = intSignalType(hppi.group);
DPRINTF(GIC, "Gicv3CPUInterface::update(): "
"posting int as %d!\n", int_type);
- int_type == ArmISA::INT_IRQ ? signal_IRQ = true : signal_FIQ = true;
+ int_type == INT_IRQ ? signal_IRQ = true : signal_FIQ = true;
}
if (signal_IRQ) {
- gic->postInt(cpuId, ArmISA::INT_IRQ);
+ gic->postInt(cpuId, INT_IRQ);
} else {
- gic->deassertInt(cpuId, ArmISA::INT_IRQ);
+ gic->deassertInt(cpuId, INT_IRQ);
}
if (signal_FIQ) {
- gic->postInt(cpuId, ArmISA::INT_FIQ);
+ gic->postInt(cpuId, INT_FIQ);
} else {
- gic->deassertInt(cpuId, ArmISA::INT_FIQ);
+ gic->deassertInt(cpuId, INT_FIQ);
}
}
if (signal_IRQ) {
DPRINTF(GIC, "Gicv3CPUInterface::virtualUpdate(): "
- "posting int as %d!\n", ArmISA::INT_VIRT_IRQ);
- gic->postInt(cpuId, ArmISA::INT_VIRT_IRQ);
+ "posting int as %d!\n", INT_VIRT_IRQ);
+ gic->postInt(cpuId, INT_VIRT_IRQ);
} else {
- gic->deassertInt(cpuId, ArmISA::INT_VIRT_IRQ);
+ gic->deassertInt(cpuId, INT_VIRT_IRQ);
}
if (signal_FIQ) {
DPRINTF(GIC, "Gicv3CPUInterface::virtualUpdate(): "
- "posting int as %d!\n", ArmISA::INT_VIRT_FIQ);
- gic->postInt(cpuId, ArmISA::INT_VIRT_FIQ);
+ "posting int as %d!\n", INT_VIRT_FIQ);
+ gic->postInt(cpuId, INT_VIRT_FIQ);
} else {
- gic->deassertInt(cpuId, ArmISA::INT_VIRT_FIQ);
+ gic->deassertInt(cpuId, INT_VIRT_FIQ);
}
}
}
// spec section 4.6.2
-ArmISA::InterruptTypes
+InterruptTypes
Gicv3CPUInterface::intSignalType(Gicv3::GroupId group) const
{
bool is_fiq = false;
}
if (is_fiq) {
- return ArmISA::INT_FIQ;
+ return INT_FIQ;
} else {
- return ArmISA::INT_IRQ;
+ return INT_IRQ;
}
}
CPSR cpsr = isa->readMiscRegNoEffect(MISCREG_CPSR);
SCR scr = isa->readMiscRegNoEffect(MISCREG_SCR);
- return ArmISA::inSecureState(scr, cpsr);
+ return ::inSecureState(scr, cpsr);
}
int
void assertWakeRequest(void);
void deassertWakeRequest(void);
- RegVal readBankedMiscReg(MiscRegIndex misc_reg) const;
- void setBankedMiscReg(MiscRegIndex misc_reg, RegVal val) const;
+ RegVal readBankedMiscReg(ArmISA::MiscRegIndex misc_reg) const;
+ void setBankedMiscReg(ArmISA::MiscRegIndex misc_reg, RegVal val) const;
public:
Gicv3CPUInterface(Gicv3 * gic, uint32_t cpu_id);
#include "dev/arm/gic_v3_cpu_interface.hh"
#include "dev/arm/gic_v3_distributor.hh"
+using namespace ArmISA;
+
const AddrRange Gicv3Redistributor::GICR_IPRIORITYR(SGI_base + 0x0400,
SGI_base + 0x0420);