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>
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