summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts/static_inst.hh
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2017-12-14 17:38:38 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2018-02-07 15:13:49 +0000
commit633fdd5841d8e7798e1b1158261612a6ad84c812 (patch)
treea572e3d8be8e82d2be24e3d1d6da54818e3e4f41 /src/arch/arm/insts/static_inst.hh
parent78024e6b026fecc780e503aa246beeb10dcc26d9 (diff)
downloadgem5-633fdd5841d8e7798e1b1158261612a6ad84c812.tar.xz
arch-arm: Fix AArch32 SETEND Instruction
This patch fixes AArch32 SETEND instruction, which was previously executed unconditionally without checking (H)SCTLR.SED field. This bit enables/disables the trapping of the instruction. Change-Id: Ib3d2194c8d16c34ec2a9ab3e8090081900c1e42e Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/7981 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r--src/arch/arm/insts/static_inst.hh39
1 files changed, 37 insertions, 2 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh
index 9aed77c21..c68880c97 100644
--- a/src/arch/arm/insts/static_inst.hh
+++ b/src/arch/arm/insts/static_inst.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013,2016-2017 ARM Limited
+ * Copyright (c) 2010-2013,2016-2018 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -434,14 +434,49 @@ class ArmStaticInst : public StaticInst
Fault trapWFx(ThreadContext *tc, CPSR cpsr, SCR scr, bool isWfe) const;
/**
+ * Check if SETEND instruction execution in aarch32 should be trapped.
+ *
+ * See aarch32/exceptions/traps/AArch32.CheckSETENDEnabled in the
+ * ARM ARM pseudocode library.
+ */
+ Fault checkSETENDEnabled(ThreadContext *tc, CPSR cpsr) const;
+
+ /**
+ * UNDEFINED behaviour in AArch32
+ *
+ * See aarch32/exceptions/traps/AArch32.UndefinedFault in the
+ * ARM ARM pseudocode library.
+ */
+ Fault undefinedFault32(ThreadContext *tc, ExceptionLevel el) const;
+
+ /**
+ * UNDEFINED behaviour in AArch64
+ *
+ * See aarch64/exceptions/traps/AArch64.UndefinedFault in the
+ * ARM ARM pseudocode library.
+ */
+ Fault undefinedFault64(ThreadContext *tc, ExceptionLevel el) const;
+
+ /**
* Get the new PSTATE from a SPSR register in preparation for an
* exception return.
*
* See shared/functions/system/SetPSTATEFromPSR in the ARM ARM
- * psueodcode library.
+ * pseudocode library.
*/
CPSR getPSTATEFromPSR(ThreadContext *tc, CPSR cpsr, CPSR spsr) const;
+ /**
+ * Return true if exceptions normally routed to EL1 are being handled
+ * at an Exception level using AArch64, because either EL1 is using
+ * AArch64 or TGE is in force and EL2 is using AArch64.
+ *
+ * See aarch32/exceptions/exceptions/AArch32.GeneralExceptionsToAArch64
+ * in the ARM ARM pseudocode library.
+ */
+ bool generalExceptionsToAArch64(ThreadContext *tc,
+ ExceptionLevel pstateEL) const;
+
public:
virtual void
annotateFault(ArmFault *fault) {}