about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-21 17:55:14 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-21 17:55:14 +0100
commita77093e154af900d2fc31700a2d0ec9934916214 (patch)
treed978f84218bd000e5a235e9d03b448bda0983c64 /src
parent6676fe3b3b968dc4ef2486df7aeffc7ac4f88b45 (diff)
downloadbox64-a77093e154af900d2fc31700a2d0ec9934916214.tar.gz
box64-a77093e154af900d2fc31700a2d0ec9934916214.zip
[DYNAREC] Added 0F B6/B7 opcodes
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/dynarec_arm64_0f.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/dynarec/dynarec_arm64_0f.c b/src/dynarec/dynarec_arm64_0f.c
index d538e42e..edb99cb6 100755
--- a/src/dynarec/dynarec_arm64_0f.c
+++ b/src/dynarec/dynarec_arm64_0f.c
@@ -402,6 +402,38 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin
             }

             break;

 

+        case 0xB6:

+            INST_NAME("MOVZX Gd, Eb");

+            nextop = F8;

+            GETGD;

+            if(MODREG) {

+                if(rex.rex) {

+                    eb1 = xRAX+(nextop&7)+(rex.b<<3);

+                    eb2 = 0;                \

+                } else {

+                    ed = (nextop&7);

+                    eb1 = xRAX+(ed&3);  // Ax, Cx, Dx or Bx

+                    eb2 = (ed&4)>>2;    // L or H

+                }

+                UBFXxw(gd, eb1, eb2*8, 8);

+            } else {

+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, 0xfff, 0, rex, 0, 0);

+                LDRB_U12(gd, ed, fixedaddress);

+            }

+            break;

+        case 0xB7:

+            INST_NAME("MOVZX Gd, Ew");

+            nextop = F8;

+            GETGD;

+            if(MODREG) {

+                ed = xRAX+(nextop&7)+(rex.b<<3);

+                UBFXxw(gd, ed, 0, 16);

+            } else {

+                addr = geted(dyn, addr, ninst, nextop, &ed, x2, &fixedaddress, 0xfff<<1, 1, rex, 0, 0);

+                LDRH_U12(gd, ed, fixedaddress);

+            }

+            break;

+

         case 0xBB:

             INST_NAME("BTC Ed, Gd");

             SETFLAGS(X_CF, SF_SET);