From 4b927bc37359dec23f67d3427fc982945f24f404 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Wed, 21 May 2025 21:21:26 +0200 Subject: add gitlab issues in toml format --- .../host_missing/accel_missing/2317.toml | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml (limited to 'gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml') diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml new file mode 100644 index 00000000..8b39bb73 --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml @@ -0,0 +1,46 @@ +id = 2317 +title = "SH4: ADDV instruction not emulated properly" +state = "closed" +created_at = "2024-04-29T17:09:55.119Z" +closed_at = "2024-05-04T02:01:16.513Z" +labels = ["kind::Bug", "target: sh4", "workflow::Patch available"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2317" +host-os = "Debian testing" +host-arch = "x86_64" +qemu-version = "qemu-sh4 version 8.2.1 (Debian 1:8.2.1+ds-2)" +guest-os = "Buildroot uClibc (qemu-user)" +guest-arch = "SH4" +description = """ADDV opcode is emulated incorrectly. + +The documentation says: + +`ADDV Rm, Rn Rn + Rm -> Rn, overflow -> T` + +What Qemu actually emulates: + +`ADDV Rm, Rn Rn + Rm -> Rm, overflow -> T`""" +reproduce = """```c +#include + +int main(void) +{ +\tregister unsigned int a asm("r8") = 0x7fffffff; +\tregister unsigned int b asm("r9") = 1; +\tregister unsigned int c asm("r10"); + +\tasm volatile("clrt\\n" +\t\t "addv %2,%0\\n" +\t\t "movt %1\\n" +\t\t : "+r"(a), "=r"(c) : "r"(b) :); + +\tprintf("Values: a=0x%x b=0x%x c=0x%x\\n", a, b, c); + +\treturn 0; +} + +```""" +additional = """Tested on real hardware (SEGA Dreamcast, GCC 15.0), the program above prints: +`Values: a=0x80000000 b=0x1 c=0x1` + +Running with Qemu (and GCC 13.0), the same program prints: +`Values: a=0x7fffffff b=0x80000000 c=0x1`""" -- cgit 1.4.1