about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorYang Liu <numbksco@gmail.com>2024-05-03 16:35:44 +0800
committerGitHub <noreply@github.com>2024-05-03 10:35:44 +0200
commit20092ef1ac581dc5c625adcae2c9a50e46d7e6e0 (patch)
treebb15c028c1b7a7fd126b53d36b910bcf3920791c /src
parentaad6a1698459ac44403e71bacce276cd76bac5db (diff)
downloadbox64-20092ef1ac581dc5c625adcae2c9a50e46d7e6e0.tar.gz
box64-20092ef1ac581dc5c625adcae2c9a50e46d7e6e0.zip
[RV64_DYNAREC] Fixed OF flag computation (#1489)
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/rv64/dynarec_rv64_emit_shift.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_emit_shift.c b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
index 3349ccd4..fc7fa1d1 100644
--- a/src/dynarec/rv64/dynarec_rv64_emit_shift.c
+++ b/src/dynarec/rv64/dynarec_rv64_emit_shift.c
@@ -267,7 +267,7 @@ void emit_shr8(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4, i
         // OF flag is affected only on 1-bit shifts
         // OF flag is set to the most-significant bit of the original operand
         ADDI(s3, xZR, 1);
-        BEQ(s2, s3, 4+3*4);
+        BNE(s2, s3, 4 + 3 * 4);
         SRLI(s3, s1, 7);
         SLLI(s3, s3, F_OF2);
         OR(xFlags, xFlags, s3);
@@ -586,7 +586,7 @@ void emit_shr16(dynarec_rv64_t* dyn, int ninst, int s1, int s2, int s3, int s4,
         // OF flag is affected only on 1-bit shifts
         // OF flag is set to the most-significant bit of the original operand
         ADDI(s3, xZR, 1);
-        BEQ(s2, s3, 4+3*4);
+        BNE(s2, s3, 4 + 3 * 4);
         SRLI(s3, s1, 15);
         SLLI(s3, s3, F_OF2);
         OR(xFlags, xFlags, s3);
@@ -793,7 +793,7 @@ void emit_shr32(dynarec_rv64_t* dyn, int ninst, rex_t rex, int s1, int s2, int s
         // OF flag is affected only on 1-bit shifts
         // OF flag is set to the most-significant bit of the original operand
         ADDI(s3, xZR, 1);
-        BEQ(s2, s3, 4+3*4);
+        BNE(s2, s3, 4 + 3 * 4);
         SRLIxw(s3, s1, rex.w?63:31);
         SLLI(s3, s3, F_OF2);
         OR(xFlags, xFlags, s3);