From d8a19e98327e723588bfac16d6d96e8730c30199 Mon Sep 17 00:00:00 2001 From: liuli Date: Wed, 13 Dec 2023 15:11:15 +0800 Subject: fix emit_shr16 (#1135) For the SHR instruction, the OF flag is set to the most-significant bit of the original operand. --- src/dynarec/arm64/dynarec_arm64_emit_shift.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dynarec/arm64/dynarec_arm64_emit_shift.c b/src/dynarec/arm64/dynarec_arm64_emit_shift.c index 24f16979..b3803353 100644 --- a/src/dynarec/arm64/dynarec_arm64_emit_shift.c +++ b/src/dynarec/arm64/dynarec_arm64_emit_shift.c @@ -665,7 +665,7 @@ void emit_shr16(dynarec_arm_t* dyn, int ninst, int s1, int s2, int s3, int s4) IFX(X_OF) { CMPSw_U12(s2, 1); // if s2==1 Bcond(cNE, 4+2*4); - LSRw(s4, s1, 7); + LSRw(s4, s1, 15); BFIw(xFlags, s4, F_OF, 1); } LSRw_REG(s1, s1, s2); @@ -1354,4 +1354,4 @@ void emit_shld16(dynarec_arm_t* dyn, int ninst, int s1, int s2, int s5, int s3, IFX(X_PF) { emit_pf(dyn, ninst, s1, s3, s4); } -} \ No newline at end of file +} -- cgit 1.4.1