qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode
@ 2020-05-31  1:02 Ahmed Karaman
  2020-05-31  1:09 ` [Bug 1881450] " Ahmed Karaman
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Ahmed Karaman @ 2020-05-31  1:02 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Please check the attached math-example.c file.
When running the m68k executable under QEMU, it results in an 
"Illegal instruction" error.
Other targets don't produce this error.

Steps to reproduce the bug:

1. Download the math-example.c attached file.
2. Compile it by running:
   m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
3. Run the executable with QEMU:
   /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

The output of execution is:
   Profiling function expm1f():
   qemu: uncaught target signal 4 (Illegal instruction) - core dumped
   Illegal instruction (core dumped)

Output when running on other targets:
   Profiling function expm1f():
     Elapsed time: 47 ms
     Control result: 71804.953125

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: m68k

** Attachment added: "Emulating the expm1f() function."
   https://bugs.launchpad.net/bugs/1881450/+attachment/5378913/+files/math-example.c

** Description changed:

  Please check the attached math-example.c file.
- When running the m68k executable under QEMU, it results in an "Illegal instruction" error.
+ When running the m68k executable under QEMU, it results in an 
+ "Illegal instruction" error.
  Other targets don't produce this error.
  
  Steps to reproduce the bug:
  
  1. Download the math-example.c attached file.
  2. Compile it by running:
-         m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
+    m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
-         /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k 
+    /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k
  
  The output of execution is:
-         Profiling function expm1f():
-         qemu: uncaught target signal 4 (Illegal instruction) - core dumped
-         Illegal instruction (core dumped)
+    Profiling function expm1f():
+    qemu: uncaught target signal 4 (Illegal instruction) - core dumped
+    Illegal instruction (core dumped)
  
- Expected output:
-         Profiling function expm1f():
-           Elapsed time: 47 ms
-           Control result: 71804.953125
+ Output when running on other targets:
+    Profiling function expm1f():
+      Elapsed time: 47 ms
+      Control result: 71804.953125

** Attachment removed: "math-example.c"
   https://bugs.launchpad.net/qemu/+bug/1881450/+attachment/5378913/+files/math-example.c

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  New

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
@ 2020-05-31  1:09 ` Ahmed Karaman
  2020-05-31  6:49 ` Laurent Vivier
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Ahmed Karaman @ 2020-05-31  1:09 UTC (permalink / raw)
  To: qemu-devel

** Attachment added: "math-example.c"
   https://bugs.launchpad.net/qemu/+bug/1881450/+attachment/5378914/+files/math-example.c

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  New

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
  2020-05-31  1:09 ` [Bug 1881450] " Ahmed Karaman
@ 2020-05-31  6:49 ` Laurent Vivier
  2020-05-31 12:37 ` Laurent Vivier
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-31  6:49 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
     Assignee: (unassigned) => Laurent Vivier (laurent-vivier)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  New

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
  2020-05-31  1:09 ` [Bug 1881450] " Ahmed Karaman
  2020-05-31  6:49 ` Laurent Vivier
@ 2020-05-31 12:37 ` Laurent Vivier
  2020-05-31 13:11 ` Laurent Vivier
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-31 12:37 UTC (permalink / raw)
  To: qemu-devel

Tracing gives me:

IN: expm1f
0x800005cc:  fetoxm1x %fp2,%fp0
Disassembler disagrees with translator over instruction decoding
Please report this to qemu-devel@nongnu.org

(gdb) x/2hx 0x800005cc
0x800005cc:	0xf200	0x0808

The instruction is not implemented in qemu. I fix that.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  New

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
                   ` (2 preceding siblings ...)
  2020-05-31 12:37 ` Laurent Vivier
@ 2020-05-31 13:11 ` Laurent Vivier
  2020-05-31 13:13 ` Laurent Vivier
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-31 13:11 UTC (permalink / raw)
  To: qemu-devel

** Patch added: "0001-target-m68k-implement-opcode-fetoxm1x.patch"
   https://bugs.launchpad.net/qemu/+bug/1881450/+attachment/5379012/+files/0001-target-m68k-implement-opcode-fetoxm1x.patch

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  In Progress

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
                   ` (3 preceding siblings ...)
  2020-05-31 13:11 ` Laurent Vivier
@ 2020-05-31 13:13 ` Laurent Vivier
  2020-06-02 18:27 ` Laurent Vivier
  2020-08-20 14:58 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-05-31 13:13 UTC (permalink / raw)
  To: qemu-devel

Fix available.

Execution doesn't fail anymore:

  Profiling function expm1f():
    Elapsed time: 41 ms
    Control result: 71805.108342

Control result matches real hardware one:

  Profiling function expm1f():
    Elapsed time: 2152 ms
    Control result: 71805.108342


** Changed in: qemu
       Status: New => In Progress

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  In Progress

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
                   ` (4 preceding siblings ...)
  2020-05-31 13:13 ` Laurent Vivier
@ 2020-06-02 18:27 ` Laurent Vivier
  2020-08-20 14:58 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2020-06-02 18:27 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  Fix Committed

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

* [Bug 1881450] Re: Emulation of a math function fails for m68k Linux user mode
  2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
                   ` (5 preceding siblings ...)
  2020-06-02 18:27 ` Laurent Vivier
@ 2020-08-20 14:58 ` Thomas Huth
  6 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2020-08-20 14:58 UTC (permalink / raw)
  To: qemu-devel

Fixed here:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=250b1da35d579f423

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1881450

Title:
  Emulation of a math function fails for m68k Linux user mode

Status in QEMU:
  Fix Released

Bug description:
  Please check the attached math-example.c file.
  When running the m68k executable under QEMU, it results in an 
  "Illegal instruction" error.
  Other targets don't produce this error.

  Steps to reproduce the bug:

  1. Download the math-example.c attached file.
  2. Compile it by running:
     m68k-linux-gnu-gcc -O2 -static math-example.c -o math-example-m68k -lm
  3. Run the executable with QEMU:
     /build/qemu-5.0.0/build-gcc/m68k-linux-user/qemu-m68k math-example-m68k

  The output of execution is:
     Profiling function expm1f():
     qemu: uncaught target signal 4 (Illegal instruction) - core dumped
     Illegal instruction (core dumped)

  Output when running on other targets:
     Profiling function expm1f():
       Elapsed time: 47 ms
       Control result: 71804.953125

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1881450/+subscriptions


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

end of thread, other threads:[~2020-08-20 15:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31  1:02 [Bug 1881450] [NEW] Emulation of a math function fails for m68k Linux user mode Ahmed Karaman
2020-05-31  1:09 ` [Bug 1881450] " Ahmed Karaman
2020-05-31  6:49 ` Laurent Vivier
2020-05-31 12:37 ` Laurent Vivier
2020-05-31 13:11 ` Laurent Vivier
2020-05-31 13:13 ` Laurent Vivier
2020-06-02 18:27 ` Laurent Vivier
2020-08-20 14:58 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).