summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-05-30 16:52:07 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-05-30 16:52:17 +0200
commit9260319e7411ff8281700a532caa436f40120ec4 (patch)
tree2f6bfe5f3458dd49d328d3a9eb508595450adec0 /gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802
parent225caa38269323af1bfc2daadff5ec8bd930747f (diff)
downloadqemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.tar.gz
qemu-analysis-9260319e7411ff8281700a532caa436f40120ec4.zip
gitlab scraper: download in toml and text format
Diffstat (limited to 'gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802')
-rw-r--r--gitlab/issues_text/target_sparc/host_missing/accel_TCG/280226
1 files changed, 26 insertions, 0 deletions
diff --git a/gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802 b/gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802
new file mode 100644
index 000000000..c77e9a5f8
--- /dev/null
+++ b/gitlab/issues_text/target_sparc/host_missing/accel_TCG/2802
@@ -0,0 +1,26 @@
+Sparc: fdtox/fqtox instructions incorrectly select destination register
+Description of problem:
+This bug report is mostly for informational purposes as I will be posting a fix for the bug.
+
+The `fdtox` and `fqtox` instructions incorrectly select the destination register when the destination register is higher than `f31`.
+Steps to reproduce:
+1. Install Sparc cross compiler `gcc-12-sparc64-linux-gnu`(in Debian)
+2. Compile the test program using `sparc64-linux-gnu-gcc-12 -m64 -o test_program -static test_program.c`
+3. Run the test program using `qemu-sparc64-static ./test_program`
+4. Expected output is 60. Prints 0 instead.
+Additional information:
+Test program to test the issue:
+
+```c
+#include <stdio.h>
+
+int main(int argc, char** argv) {
+    long long truncated = 0;
+    __asm__("fdtox %0,%%f32\n\t" :: "f"(60.0));
+    __asm__("fmovd %%f32,%0\n\t" : "=f"(truncated));
+    printf("%lld\n", truncated);
+    return 0;
+}
+```
+
+The issue is caused by the commit 0bba7572d4. Where certain changes were made in the way destination registers are selected(moving the DFPREG/QFPREG to decodetree).