about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-09-08 14:03:47 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-09-08 14:03:47 +0200
commit6d3fa25d5fc41ad5066b565ade8f24e74cb8e1ae (patch)
tree05db4082e1dd36ca5c28f5b2b5901b41607a4a2d /src
parent57b7bcf8f4d127758042e14e607318671d54feca (diff)
downloadbox64-6d3fa25d5fc41ad5066b565ade8f24e74cb8e1ae.tar.gz
box64-6d3fa25d5fc41ad5066b565ade8f24e74cb8e1ae.zip
[ARM64_DYNAREC] Small optim for 0F C6 opcode
Diffstat (limited to 'src')
-rw-r--r--src/dynarec/arm64/dynarec_arm64_0f.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/dynarec/arm64/dynarec_arm64_0f.c b/src/dynarec/arm64/dynarec_arm64_0f.c
index 5a752519..1c288c2c 100644
--- a/src/dynarec/arm64/dynarec_arm64_0f.c
+++ b/src/dynarec/arm64/dynarec_arm64_0f.c
@@ -2322,16 +2322,28 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
                 VMOVeS(v0, 1, v0, 0);

             } else if(v0==v1 && (u8==0xe5)) {   // easy special case

                 VMOVeS(v0, 0, v0, 1);

+            } else if(u8==0x4E && MODREG) {

+                VEXTQ_8(v0, v0, v1, 8);

             } else {

                 d0 = fpu_get_scratch(dyn, ninst);

                 // first two elements from Gx

-                for(int i=0; i<2; ++i) {

-                    VMOVeS(d0, i, v0, (u8>>(i*2))&3);

+                if((u8&0xf)==0x04)

+                    VMOVeD(d0, 0, v0, 0);

+                else if((u8&0xf)==0x0e)

+                    VMOVeD(d0, 0, v0, 1);

+                else

+                    for(int i=0; i<2; ++i) {

+                        VMOVeS(d0, i, v0, (u8>>(i*2))&3);

                 }

                 // second two from Ex

                 if(MODREG) {

-                    for(int i=2; i<4; ++i) {

-                        VMOVeS(d0, i, v1, (u8>>(i*2))&3);

+                    if((u8&0xf0)==0x40)

+                        VMOVeD(d0, 1, v1, 0);

+                    else if((u8&0xf0)==0xe0)

+                        VMOVeD(d0, 1, v1, 1);

+                    else

+                        for(int i=2; i<4; ++i) {

+                            VMOVeS(d0, i, v1, (u8>>(i*2))&3);

                     }

                 } else {

                     SMREAD();