summary refs log tree commit diff stats
path: root/results/classifier/zero-shot-user-mode/output/instruction/1918026
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/zero-shot-user-mode/output/instruction/1918026')
-rw-r--r--results/classifier/zero-shot-user-mode/output/instruction/191802635
1 files changed, 35 insertions, 0 deletions
diff --git a/results/classifier/zero-shot-user-mode/output/instruction/1918026 b/results/classifier/zero-shot-user-mode/output/instruction/1918026
new file mode 100644
index 00000000..42dd6fa4
--- /dev/null
+++ b/results/classifier/zero-shot-user-mode/output/instruction/1918026
@@ -0,0 +1,35 @@
+instruction: 0.523
+syscall: 0.306
+runtime: 0.171
+
+
+
+RISCV64 32-bit AMOs incorrectly simulated
+
+Version: qemu-riscv64 version 4.2.1 (Debian 1:4.2-3ubuntu6.14)
+
+test:
+  amomaxu.w a0, a1, (a0)
+  ret
+
+int32_t* value = -7;
+EXPECT_EQ(-7, test(&value, -11));
+EXPECT_EQ(-7, value);  // FAIL, saw -11
+EXPECT_EQ(-7, test(&value, -7));
+EXPECT_EQ(-7, value);  // FAIL, raw -11
+EXPECT_EQ(-7, test(&value, -4));
+EXPECT_EQ(-4, value);
+
+test:
+  amomax.w a0, a1, (a0)
+  ret
+
+int32_t* value = -7;
+EXPECT_EQ(-7, test(&value, -11));
+EXPECT_EQ(-7, value);
+EXPECT_EQ(-7, test(&value, -7));
+EXPECT_EQ(-7, value);
+EXPECT_EQ(-7, test(&value, -4));
+EXPECT_EQ(-4, value);  // FAIL, saw -7
+
+I suspect that trans_amo<op>_w should be using tcg_gen_atomic_fetch_<op>_i32 instead of tcg_gen_atomic_fetch_<op>_tl.
\ No newline at end of file