From 657d4054ea36e6af8959f2fa7bcfd79b7c887cfd Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 14 Feb 2018 18:42:19 +0000 Subject: 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 Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/8369 Maintainer: Andreas Sandberg --- src/arch/arm/isa/insts/misc64.isa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3