diff options
| author | Yang Liu <numbksco@gmail.com> | 2024-05-03 16:35:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-03 10:35:44 +0200 |
| commit | 20092ef1ac581dc5c625adcae2c9a50e46d7e6e0 (patch) | |
| tree | bb15c028c1b7a7fd126b53d36b910bcf3920791c /src | |
| parent | aad6a1698459ac44403e71bacce276cd76bac5db (diff) | |
| download | box64-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.c | 6 |
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); |