diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-04-24 10:58:56 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-04-24 10:58:56 +0200 |
| commit | d51997bc77fc97b183d2d5730fcf10b25fe5f3cb (patch) | |
| tree | 24b918c39b911cf613b2e35f49651209fa5db977 /src | |
| parent | af555abb6f16ece1ee8f3571979923d885b1194c (diff) | |
| download | box64-d51997bc77fc97b183d2d5730fcf10b25fe5f3cb.tar.gz box64-d51997bc77fc97b183d2d5730fcf10b25fe5f3cb.zip | |
[ARM64_DYNAREC] Small change and optims to various (V)MOVNT* opcodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_0f.c | 4 | ||||
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_660f.c | 15 | ||||
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_avx_66_0f.c | 20 | ||||
| -rw-r--r-- | src/dynarec/arm64/dynarec_arm64_avx_66_0f38.c | 18 |
4 files changed, 24 insertions, 33 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_0f.c b/src/dynarec/arm64/dynarec_arm64_0f.c index 33a9abb5..9e62417c 100644 --- a/src/dynarec/arm64/dynarec_arm64_0f.c +++ b/src/dynarec/arm64/dynarec_arm64_0f.c @@ -433,9 +433,7 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin GETG; v0 = sse_get_reg(dyn, ninst, x1, gd, 0); if(MODREG) { - ed = (nextop&7)+(rex.b<<3); - v1 = sse_get_reg_empty(dyn, ninst, x1, ed); - VMOVQ(v1, v0); + DEFAULT; } else { addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0); VST128(v0, ed, fixedaddress); diff --git a/src/dynarec/arm64/dynarec_arm64_660f.c b/src/dynarec/arm64/dynarec_arm64_660f.c index dec21e10..03157f77 100644 --- a/src/dynarec/arm64/dynarec_arm64_660f.c +++ b/src/dynarec/arm64/dynarec_arm64_660f.c @@ -216,12 +216,10 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n case 0x2B: INST_NAME("MOVNTPD Ex,Gx"); nextop = F8; - GETGX(v0, 0); if(MODREG) { - ed = (nextop&7)+(rex.b<<3); - v1 = sse_get_reg_empty(dyn, ninst, x1, ed); - VMOVQ(v1, v0); + DEFAULT; } else { + GETGX(v0, 0); addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0); VST128(v0, ed, fixedaddress); } @@ -626,9 +624,7 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n INST_NAME("MOVNTDQA Gx, Ex"); nextop = F8; if (MODREG) { - v1 = sse_get_reg(dyn, ninst, x1, (nextop & 7) + (rex.b << 3), 0); - GETGX_empty(v0); - VMOVQ(v0, v1); + DEFAULT; } else { GETGX_empty(v0); SMREAD(); @@ -3186,11 +3182,10 @@ uintptr_t dynarec64_660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int n case 0xE7: INST_NAME("MOVNTDQ Ex, Gx"); nextop = F8; - GETGX(v0, 0); if(MODREG) { - v1 = sse_get_reg_empty(dyn, ninst, x1, (nextop&7)+(rex.b<<3)); - VMOVQ(v1, v0); + DEFAULT; } else { + GETGX(v0, 0); addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0); VST128(v0, ed, fixedaddress); } diff --git a/src/dynarec/arm64/dynarec_arm64_avx_66_0f.c b/src/dynarec/arm64/dynarec_arm64_avx_66_0f.c index 2d80f5b6..cb2cc235 100644 --- a/src/dynarec/arm64/dynarec_arm64_avx_66_0f.c +++ b/src/dynarec/arm64/dynarec_arm64_avx_66_0f.c @@ -245,16 +245,10 @@ uintptr_t dynarec64_AVX_66_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, INST_NAME("VMOVNTPD Ex,Gx"); nextop = F8; GETG; - v0 = sse_get_reg(dyn, ninst, x1, gd, 0); if(MODREG) { - ed = (nextop&7) + (rex.b<<3); - v1 = sse_get_reg_empty(dyn, ninst, x1, ed); - VMOVQ(v1, v0); - if(vex.l) { - GETGYEY_empty(v0, v1); - VMOVQ(v1, v0); - } else YMM0(ed); + DEFAULT; } else { + v0 = sse_get_reg(dyn, ninst, x1, gd, 0); if(vex.l) { GETGY(v1, 0, -1, -1, -1); addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, NULL, 0x3f<<4, 15, rex, NULL, 1, 0); @@ -1702,16 +1696,10 @@ uintptr_t dynarec64_AVX_66_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, INST_NAME("VMOVNTDQ Ex,Gx"); nextop = F8; GETG; - v0 = sse_get_reg(dyn, ninst, x1, gd, 0); if(MODREG) { - ed = (nextop&7)+(rex.b<<3); - v1 = sse_get_reg_empty(dyn, ninst, x1, ed); - VMOVQ(v1, v0); - if(vex.l) { - GETGYEY_empty(v0, v1); - VMOVQ(v1, v0); - } else YMM0(ed); + DEFAULT; } else { + v0 = sse_get_reg(dyn, ninst, x1, gd, 0); if(vex.l) { GETGY(v1, 0, -1, -1, -1); addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, NULL, 0x3f<<4, 15, rex, NULL, 1, 0); diff --git a/src/dynarec/arm64/dynarec_arm64_avx_66_0f38.c b/src/dynarec/arm64/dynarec_arm64_avx_66_0f38.c index fe254a73..35c2fe29 100644 --- a/src/dynarec/arm64/dynarec_arm64_avx_66_0f38.c +++ b/src/dynarec/arm64/dynarec_arm64_avx_66_0f38.c @@ -645,11 +645,21 @@ uintptr_t dynarec64_AVX_66_0F38(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip case 0x2A: INST_NAME("VMOVNTDQA Gx, Ex"); nextop = F8; - for(int l=0; l<1+vex.l; ++l) { - if(!l) { GETGX_empty_EX(v0, v1, 0); } else { GETGY_empty_EY(v0, v1); } - VMOVQ(v0, v1); + GETG; + if(MODREG) { + DEFAULT; + } else { + v0 = sse_get_reg_empty(dyn, ninst, x1, gd); + if(vex.l) { + GETGY_empty(v1, -1, -1, -1); + addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, NULL, 0x3f<<4, 15, rex, NULL, 1, 0); + VLDP128_I7(v0, v1, ed, fixedaddress); + } else { + addr = geted(dyn, addr, ninst, nextop, &ed, x1, &fixedaddress, &unscaled, 0xfff<<4, 15, rex, NULL, 0, 0); + VLD128(v0, ed, fixedaddress); + YMM0(gd); + } } - if(!vex.l) YMM0(gd); break; case 0x2B: INST_NAME("VPACKUSDW Gx, Ex, Vx"); |