summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2018-02-14 18:42:19 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2018-02-20 13:30:02 +0000
commit657d4054ea36e6af8959f2fa7bcfd79b7c887cfd (patch)
tree935336ca8e5bbf1967dc8c41b671738683070daf /src
parent803a8db53aae57d42bd2465c9284df91ed5e7641 (diff)
downloadgem5-657d4054ea36e6af8959f2fa7bcfd79b7c887cfd.tar.xz
arch-arm: HLT using immediate when checking for semihosting
HLT can use the immediate field when checking for semihosting, rather than re-parsing it from the machInst variable. Change-Id: I072cb100029da34d129b90c5d17e1728f9016c88 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8369 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/isa/insts/misc64.isa2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/arm/isa/insts/misc64.isa b/src/arch/arm/isa/insts/misc64.isa
index cf82ea3e4..17d8df10d 100644
--- a/src/arch/arm/isa/insts/misc64.isa
+++ b/src/arch/arm/isa/insts/misc64.isa
@@ -177,7 +177,7 @@ let {{
hltCode = '''
ThreadContext *tc = xc->tcBase();
- if (ArmSystem::haveSemihosting(tc) && bits(machInst, 20, 5) == 0xF000) {
+ if (ArmSystem::haveSemihosting(tc) && imm == 0xF000) {
X0 = ArmSystem::callSemihosting64(tc, X0 & mask(32), X1);
} else {
// HLT instructions aren't implemented, so treat them as undefined