All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] M68k for 3.1 patches
@ 2018-11-01 11:37 Laurent Vivier
  2018-11-01 11:37 ` [Qemu-devel] [PULL 1/1] target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED Laurent Vivier
  2018-11-02 13:15 ` [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Vivier @ 2018-11-01 11:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier

The following changes since commit 7d51a855cd568ec3399a1834ada4023cfa12f231:

  Merge remote-tracking branch 'remotes/xtensa/tags/20181030-xtensa' into staging (2018-10-31 16:11:43 +0000)

are available in the Git repository at:

  git://github.com/vivier/qemu-m68k.git tags/m68k-for-3.1-pull-request

for you to fetch changes up to b9f8e55bf7e994e192ab7360830731580384b813:

  target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED (2018-11-01 12:12:24 +0100)

----------------------------------------------------------------
Fix illegal instruction exception number

----------------------------------------------------------------

Laurent Vivier (1):
  target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED

 linux-user/m68k/cpu_loop.c | 1 -
 target/m68k/cpu.h          | 1 -
 target/m68k/translate.c    | 6 +++---
 3 files changed, 3 insertions(+), 5 deletions(-)

-- 
2.17.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED
  2018-11-01 11:37 [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Laurent Vivier
@ 2018-11-01 11:37 ` Laurent Vivier
  2018-11-02 13:15 ` [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2018-11-01 11:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: Laurent Vivier

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 | 1 -
 target/m68k/cpu.h          | 1 -
 target/m68k/translate.c    | 6 +++---
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/linux-user/m68k/cpu_loop.c b/linux-user/m68k/cpu_loop.c
index b4d3d8af3d..30c3332af4 100644
--- a/linux-user/m68k/cpu_loop.c
+++ b/linux-user/m68k/cpu_loop.c
@@ -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;
diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h
index c63adf772f..b288a3864e 100644
--- a/target/m68k/cpu.h
+++ b/target/m68k/cpu.h
@@ -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
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);
-- 
2.17.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] M68k for 3.1 patches
  2018-11-01 11:37 [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Laurent Vivier
  2018-11-01 11:37 ` [Qemu-devel] [PULL 1/1] target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED Laurent Vivier
@ 2018-11-02 13:15 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2018-11-02 13:15 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: QEMU Developers

On 1 November 2018 at 11:37, Laurent Vivier <laurent@vivier.eu> wrote:
> The following changes since commit 7d51a855cd568ec3399a1834ada4023cfa12f231:
>
>   Merge remote-tracking branch 'remotes/xtensa/tags/20181030-xtensa' into staging (2018-10-31 16:11:43 +0000)
>
> are available in the Git repository at:
>
>   git://github.com/vivier/qemu-m68k.git tags/m68k-for-3.1-pull-request
>
> for you to fetch changes up to b9f8e55bf7e994e192ab7360830731580384b813:
>
>   target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED (2018-11-01 12:12:24 +0100)
>
> ----------------------------------------------------------------
> Fix illegal instruction exception number
>
> ----------------------------------------------------------------
>
> Laurent Vivier (1):
>   target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED
>
>  linux-user/m68k/cpu_loop.c | 1 -
>  target/m68k/cpu.h          | 1 -
>  target/m68k/translate.c    | 6 +++---
>  3 files changed, 3 insertions(+), 5 deletions(-)
>

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-02 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 11:37 [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Laurent Vivier
2018-11-01 11:37 ` [Qemu-devel] [PULL 1/1] target/m68k: use EXCP_ILLEGAL instead of EXCP_UNSUPPORTED Laurent Vivier
2018-11-02 13:15 ` [Qemu-devel] [PULL 0/1] M68k for 3.1 patches Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.