summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts/pseudo.hh
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2018-01-24 16:11:38 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2018-02-16 09:32:53 +0000
commit80427ea030b521779521f57b092bc6b4afc86ab2 (patch)
tree257b857eda172dde3fe86d19b1d23bffffed256e /src/arch/arm/insts/pseudo.hh
parent8e17f07c295cec854d89cbf427bbd2f8dd915eda (diff)
downloadgem5-80427ea030b521779521f57b092bc6b4afc86ab2.tar.xz
arch-arm: IMPLEMENTATION DEFINED register
A new pseudo register has been added to the Misc pool. It is the implementation defined register. This kinds of registers are covered by the architecture and must be treated differently than UNIMPLEMENTED registers: their access can be trapped to EL2 (See HCR.TIDCP bit in the arm arm). Some previously undecoded registers in c9,c10,c11 have now this register type. Change-Id: Ibfc35982470b9dea0ecf39aaa6b1012a21852f53 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/7922 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/insts/pseudo.hh')
-rw-r--r--src/arch/arm/insts/pseudo.hh21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/arch/arm/insts/pseudo.hh b/src/arch/arm/insts/pseudo.hh
index fe28789f0..5fb7499df 100644
--- a/src/arch/arm/insts/pseudo.hh
+++ b/src/arch/arm/insts/pseudo.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014,2016 ARM Limited
+ * Copyright (c) 2014,2016,2018 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -123,7 +123,7 @@ class WarnUnimplemented : public ArmStaticInst
*/
class McrMrcMiscInst : public ArmStaticInst
{
- private:
+ protected:
uint64_t iss;
MiscRegIndex miscReg;
@@ -138,4 +138,21 @@ class McrMrcMiscInst : public ArmStaticInst
};
+/**
+ * This class is also used for IMPLEMENTATION DEFINED registers, whose mcr/mrc
+ * behaviour is trappable even for unimplemented registers.
+ */
+class McrMrcImplDefined : public McrMrcMiscInst
+{
+ public:
+ McrMrcImplDefined(const char *_mnemonic, ExtMachInst _machInst,
+ uint64_t _iss, MiscRegIndex _miscReg);
+
+ Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const;
+
+ std::string
+ generateDisassembly(Addr pc, const SymbolTable *symtab) const;
+
+};
+
#endif