]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED
authorLaurent Vivier <laurent@vivier.eu>
Tue, 30 Oct 2018 16:55:54 +0000 (17:55 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 1 Nov 2018 11:12:24 +0000 (12:12 +0100)
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>

linux-user/m68k/cpu_loop.c
target/m68k/cpu.h
target/m68k/translate.c

index b4d3d8af3dc898df64a057a5b1c39d0cedcff4a4..30c3332af46efc4d4f758bd2d0c6534e2b0227e3 100644 (file)
@@ -55,7 +55,6 @@ void cpu_loop(CPUM68KState *env)
             break;
         case EXCP_LINEA:
         case EXCP_LINEF:
-        case EXCP_UNSUPPORTED:
         do_sigill:
             info.si_signo = TARGET_SIGILL;
             info.si_errno = 0;
index c63adf772fcfe0c8ddfc1ff72d3a9b38aead540a..b288a3864e036bc2848fa7799b18ceb184b746fb 100644 (file)
@@ -70,7 +70,6 @@
 #define EXCP_MMU_CONF       56  /* MMU Configuration Error */
 #define EXCP_MMU_ILLEGAL    57  /* MMU Illegal Operation Error */
 #define EXCP_MMU_ACCESS     58  /* MMU Access Level Violation Error */
-#define EXCP_UNSUPPORTED    61
 
 #define EXCP_RTE            0x100
 #define EXCP_HALT_INSN      0x101
index ae3651b867b7813d6f7ab742ca92ee79618a136b..752e46ef63f85e1881db4799aa848285a56ea1fd 100644 (file)
@@ -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);