about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-02-06 18:35:13 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-02-06 18:35:13 +0100
commitd7ca4abf4028e7210078c3438e144f38d28a40aa (patch)
treec82a0e0e7064739cdaf4fd164742f04d6ef58cad /src
parent757b74e1d04a6cab902391b271f00a8224d847c4 (diff)
downloadbox64-d7ca4abf4028e7210078c3438e144f38d28a40aa.tar.gz
box64-d7ca4abf4028e7210078c3438e144f38d28a40aa.zip
Added F0 0F C0 opcode (for #210)
Diffstat (limited to 'src')
-rw-r--r--src/emu/x64runf0.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c
index 041c147a..634d3d40 100644
--- a/src/emu/x64runf0.c
+++ b/src/emu/x64runf0.c
@@ -586,6 +586,23 @@ int RunF0(x64emu_t *emu, rex_t rex)
                         }

                         break;

 

+                case 0xC0:                      /* XADD Gb,Eb */

+                    nextop = F8;

+                    GETEB(0);

+                    GETGB;

+#ifdef DYNAREC

+                    do {

+                        tmp8u = arm64_lock_read_b(EB);

+                        tmp8u2 = add8(emu, tmp8u, GB);

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

+#else

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

+                    tmp8u = add8(emu, EB->byte[0], GB);

+                    GB = EB->byte[0];

+                    EB->byte[0] = tmp32u;

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

+#endif

+                    break;

                 case 0xC1:                      /* XADD Gd,Ed */

                     nextop = F8;

                     GETED(0);