summary refs log tree commit diff stats
path: root/results/scraper/launchpad-without-comments/1885350
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-30 12:24:58 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-06-30 12:27:06 +0000
commit33606b41d35115f887ea688b1a16f2ff85bf2fe4 (patch)
tree406b2c7b19a087ba437c68f3dbf0b589fa1d6150 /results/scraper/launchpad-without-comments/1885350
parentadedf8771bc4de3113041ca21bd4d0d1c0014b6a (diff)
downloademulator-bug-study-33606b41d35115f887ea688b1a16f2ff85bf2fe4.tar.gz
emulator-bug-study-33606b41d35115f887ea688b1a16f2ff85bf2fe4.zip
add launchpad bug reports without comments
Diffstat (limited to 'results/scraper/launchpad-without-comments/1885350')
-rw-r--r--results/scraper/launchpad-without-comments/188535023
1 files changed, 23 insertions, 0 deletions
diff --git a/results/scraper/launchpad-without-comments/1885350 b/results/scraper/launchpad-without-comments/1885350
new file mode 100644
index 00000000..f0de082b
--- /dev/null
+++ b/results/scraper/launchpad-without-comments/1885350
@@ -0,0 +1,23 @@
+RISCV dynamic rounding mode is not behaving correctly
+
+Hello,
+
+I’ve gone through the RISC-V code in latest QEMU release (qemu-5.0.0-rc2) and when checking the Floating point encodings I found the rounding mode is only updated if the opcode field “rm” is changed “ctx->frm == rm”. But according to RISC-V Volume I: Unprivileged ISA, there’s a dynamic mode when rm=7 where the rounding mode is set with frm value. 
+
+So for the same rm value (=7) and when changing frm value seeking different rounding modes, and according to the below code, the rounding mode won’t be updated. Please correct me if I got this implementation wrong. 
+
+static void gen_set_rm(DisasContext *ctx, int rm)
+{
+    TCGv_i32 t0;
+    if (ctx->frm == rm) {
+        return;
+    }
+    ctx->frm = rm;
+    t0 = tcg_const_i32(rm);
+    gen_helper_set_rounding_mode(cpu_env, t0);
+    tcg_temp_free_i32(t0);
+}
+
+
+My testcase:
+I set statically the rm field in the instruction to 7 and before this execution I changed the value of frm field in fcsr register. For the 1st time it worked (according to the code above, the rm is updated so the round mode will also be updated). But when changing fcsr register an re-execute the instruction, there's no difference and the rounding mode is the same like the previous frm value.
\ No newline at end of file