summaryrefslogtreecommitdiffstats
path: root/target/arm/m_helper.c
diff options
context:
space:
mode:
authorAlex Bennée2019-09-19 15:18:40 +0200
committerPeter Maydell2019-09-27 12:41:29 +0200
commit376214e4f499f82900e699c225f18f045f8a3c20 (patch)
tree37a037a9381838341744a9378fb1437f382523e7 /target/arm/m_helper.c
parenttests/tcg: clean-up some comments after the de-tangling (diff)
downloadqemu-376214e4f499f82900e699c225f18f045f8a3c20.tar.gz
qemu-376214e4f499f82900e699c225f18f045f8a3c20.tar.xz
qemu-376214e4f499f82900e699c225f18f045f8a3c20.zip
target/arm: handle M-profile semihosting at translate time
We do this for other semihosting calls so we might as well do it for M-profile as well. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20190913151845.12582-3-alex.bennee@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/m_helper.c')
-rw-r--r--target/arm/m_helper.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c
index 884d35d2b0..27cd2f3f96 100644
--- a/target/arm/m_helper.c
+++ b/target/arm/m_helper.c
@@ -2114,19 +2114,13 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs)
break;
}
break;
+ case EXCP_SEMIHOST:
+ qemu_log_mask(CPU_LOG_INT,
+ "...handling as semihosting call 0x%x\n",
+ env->regs[0]);
+ env->regs[0] = do_arm_semihosting(env);
+ return;
case EXCP_BKPT:
- if (semihosting_enabled()) {
- int nr;
- nr = arm_lduw_code(env, env->regs[15], arm_sctlr_b(env)) & 0xff;
- if (nr == 0xab) {
- env->regs[15] += 2;
- qemu_log_mask(CPU_LOG_INT,
- "...handling as semihosting call 0x%x\n",
- env->regs[0]);
- env->regs[0] = do_arm_semihosting(env);
- return;
- }
- }
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_DEBUG, false);
break;
case EXCP_IRQ: