about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-07-09 11:58:35 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-07-09 11:58:35 +0200
commitec3786f86295b0fb769970bcb3c77b4ffffd7d48 (patch)
treeeeda9ecd7394e93eac2f759786ac3f7c19a1334b /src/emu
parent0e761801deb4aa045e6052dee454973587e8dd4b (diff)
downloadbox64-ec3786f86295b0fb769970bcb3c77b4ffffd7d48.tar.gz
box64-ec3786f86295b0fb769970bcb3c77b4ffffd7d48.zip
Various improvement and some workaround to support musl binary (for #324)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/x64run66.c7
-rw-r--r--src/emu/x64runf0.c23
2 files changed, 29 insertions, 1 deletions
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c
index eeb64827..85ce674b 100644
--- a/src/emu/x64run66.c
+++ b/src/emu/x64run66.c
@@ -697,7 +697,12 @@ int Run66(x64emu_t *emu, rex_t rex, int rep)
             case 1:                 /* DEC Ed */

                 EW->word[0] = dec16(emu, EW->word[0]);

                 break;

-            /*case 6:

+            case 2:                 /* CALL NEAR Ed */

+                tmp64u = (uintptr_t)getAlternate((void*)ED->q[0]);

+                Push(emu, R_RIP);

+                R_RIP = tmp64u;

+                break;

+           /*case 6:

                 Push16(emu, EW->word[0]);

                 break;*/

             default:

diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c
index 8874bf2d..422cd5b3 100644
--- a/src/emu/x64runf0.c
+++ b/src/emu/x64runf0.c
@@ -886,6 +886,29 @@ int RunF0(x64emu_t *emu, rex_t rex)
             pthread_mutex_unlock(&emu->context->mutex_lock);

 #endif

             break;            

+

+        case 0xF6:                      /* GRP3 Eb(,Ib) */

+            nextop = F8;

+            tmp8u = (nextop>>3)&7;

+            GETEB((tmp8u<2)?1:0);

+            switch(tmp8u) {

+                case 2:                 /* NOT Eb */

+#ifdef DYNAREC

+                    do {

+                        tmp8u2 = native_lock_read_b(EB); 

+                        tmp8u2 = not8(emu, tmp8u2);

+                    } while(native_lock_write_b(EB, tmp8u2));

+#else

+                    pthread_mutex_lock(&emu->context->mutex_lock);

+                    EB->byte[0] = not8(emu, EB->byte[0]);

+                    pthread_mutex_unlock(&emu->context->mutex_lock);

+#endif

+                    break;

+                default:

+                    return 1;

+            }

+            break;

+

         case 0xFF:              /* GRP 5 Ed */

             nextop = F8;

             GETED(0);