From: Giacomo Travaglini Date: Wed, 14 Feb 2018 18:42:19 +0000 (+0000) Subject: arch-arm: HLT using immediate when checking for semihosting X-Git-Tag: v19.0.0.0~2280 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=657d4054ea36e6af8959f2fa7bcfd79b7c887cfd;p=gem5.git 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 --- 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