diff options
author | Laurent Vivier <laurent@vivier.eu> | 2018-10-30 17:55:54 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-11-01 12:12:24 +0100 |
commit | b9f8e55bf7e994e192ab7360830731580384b813 (patch) | |
tree | f11f0b9556bf80a7fe3132f5202ccab8bdf90855 /target/m68k/translate.c | |
parent | 7d51a855cd568ec3399a1834ada4023cfa12f231 (diff) |
target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED
Coldfire defines an "Unsupported instruction" exception if execution
of a valid instruction is attempted but the required hardware is not
present in the processor.
We use it with instructions that are in fact undefined or illegal,
and the exception expected in this case by the kernel is the
illegal exception, so this patch fixes that.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20181030165554.5761-1-laurent@vivier.eu>
Diffstat (limited to 'target/m68k/translate.c')
-rw-r--r-- | target/m68k/translate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c index ae3651b867..752e46ef63 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -1553,7 +1553,7 @@ DISAS_INSN(undef) but actually illegal for CPU32 or pre-68020. */ qemu_log_mask(LOG_UNIMP, "Illegal instruction: %04x @ %08x\n", insn, s->base.pc_next); - gen_exception(s, s->base.pc_next, EXCP_UNSUPPORTED); + gen_exception(s, s->base.pc_next, EXCP_ILLEGAL); } DISAS_INSN(mulw) @@ -2800,7 +2800,7 @@ DISAS_INSN(mull) if (ext & 0x400) { if (!m68k_feature(s->env, M68K_FEATURE_QUAD_MULDIV)) { - gen_exception(s, s->base.pc_next, EXCP_UNSUPPORTED); + gen_exception(s, s->base.pc_next, EXCP_ILLEGAL); return; } @@ -4510,7 +4510,7 @@ DISAS_INSN(strldsr) addr = s->pc - 2; ext = read_im16(env, s); if (ext != 0x46FC) { - gen_exception(s, addr, EXCP_UNSUPPORTED); + gen_exception(s, addr, EXCP_ILLEGAL); return; } ext = read_im16(env, s); |