From 20092ef1ac581dc5c625adcae2c9a50e46d7e6e0 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 3 May 2024 16:35:44 +0800 Subject: [RV64_DYNAREC] Fixed OF flag computation (#1489) --- src/dynarec/rv64/dynarec_rv64_emit_shift.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit 1.4.1