summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa/insts/misc64.isa
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-06-23 14:49:56 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-11-22 16:12:38 +0000
commite80899c49a758d966ae47920c296325d64fea383 (patch)
tree5521bb4501cf4ebc7b3a60f05c8db466a70f81b9 /src/arch/arm/isa/insts/misc64.isa
parenteac97c91da74acb602c580b36415ab4c6b08b582 (diff)
downloadgem5-e80899c49a758d966ae47920c296325d64fea383.tar.xz
arch-arm: Add support for the brk instruction
Add support for software breakpoints as signalled by the aarch64 brk instruction. This introduces a new SoftwareBreakpoint fault. Change-Id: I93646c3298e09d7f7b0983108ba8937c7331297a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5721 Reviewed-by: Giacomo Gabrielli <Giacomo.Gabrielli@arm.com>
Diffstat (limited to 'src/arch/arm/isa/insts/misc64.isa')
-rw-r--r--src/arch/arm/isa/insts/misc64.isa14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/arch/arm/isa/insts/misc64.isa b/src/arch/arm/isa/insts/misc64.isa
index 00724c095..dd6711e62 100644
--- a/src/arch/arm/isa/insts/misc64.isa
+++ b/src/arch/arm/isa/insts/misc64.isa
@@ -1,6 +1,6 @@
// -*- mode:c++ -*-
-// Copyright (c) 2011-2013, 2016 ARM Limited
+// Copyright (c) 2011-2013, 2016-2017 ARM Limited
// All rights reserved
//
// The license below extends only to copyright in the software and shall
@@ -162,4 +162,16 @@ let {{
header_output += BasicDeclare.subst(clrexIop)
decoder_output += BasicConstructor64.subst(clrexIop)
exec_output += BasicExecute.subst(clrexIop)
+
+
+ brkCode = '''
+ fault = std::make_shared<SoftwareBreakpoint>(machInst,
+ bits(machInst, 20, 5));
+ '''
+
+ brkIop = InstObjParams("brk", "Brk64", "ArmStaticInst",
+ brkCode, ["IsSerializeAfter"])
+ header_output += BasicDeclare.subst(brkIop)
+ decoder_output += BasicConstructor64.subst(brkIop)
+ exec_output += BasicExecute.subst(brkIop)
}};