From 495c98a488bb2b39d19dbcf97996db29345316f5 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 1 Jan 2025 09:46:19 +0100 Subject: [PATCH] [ARM64_DYNAREC] Small improvements to POPCNT and ADOX opcodes --- src/dynarec/arm64/dynarec_arm64_f30f.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dynarec/arm64/dynarec_arm64_f30f.c b/src/dynarec/arm64/dynarec_arm64_f30f.c index c13079f08..bb42167f7 100644 --- a/src/dynarec/arm64/dynarec_arm64_f30f.c +++ b/src/dynarec/arm64/dynarec_arm64_f30f.c @@ -185,8 +185,12 @@ uintptr_t dynarec64_F30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n GETED(0); GETGD; MRS_nzcv(x3); - LSRw(x4, xFlags, F_OF); - BFIx(x3, x4, 29, 1); // set C + IFNATIVE_BEFORE(NF_VF) { + LSRw(x4, x3, NZCV_V); + } else { + LSRw(x4, xFlags, F_OF); + } + BFIx(x3, x4, NZCV_C, 1); // set C MSR_nzcv(x3); // load CC into ARM CF IFX(X_OF) { ADCSxw_REG(gd, gd, ed); @@ -478,7 +482,7 @@ uintptr_t dynarec64_F30F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n } CNT_8(v1, v1); UADDLV_8(v1, v1); - VMOVQDto(gd, v1, 0); + VMOVHto(gd, v1, 0); IFX(X_ALL) { IFX(X_AF|X_PF|X_SF|X_OF|X_CF) { MOV32w(x1, (1<