diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-05-13 17:58:04 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-05-13 17:58:04 +0200 |
| commit | 2c00386e999e264d5e53ad48229e750d0b46306d (patch) | |
| tree | 3099aac7661e9e1c37a54fca8d9e9083324397a6 /src | |
| parent | 3b03b7aee66b0a5113932bfc745f9b895573e1da (diff) | |
| download | box64-2c00386e999e264d5e53ad48229e750d0b46306d.tar.gz box64-2c00386e999e264d5e53ad48229e750d0b46306d.zip | |
[INTERPRETER] Added 1 unligned case for F0 83 group
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64runf0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index f215a2d2..58c03f16 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -946,7 +946,11 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr) case 2: do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = adc32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; case 3: do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = sbb32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; case 4: do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = and32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; - case 5: do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = sub32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; + case 5: if(((uintptr_t)ED)&3) { + // unaligned case + do { tmp32u2 = native_lock_read_b(ED); tmp32u2=ED->dword[0]; tmp32u2 = sub32(emu, tmp32u2, tmp64u);} while(native_lock_write_b(ED, tmp32u2)); ED->dword[0]=tmp32u2; break; + } else + do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = sub32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; case 6: do { tmp32u2 = native_lock_read_d(ED); tmp32u2 = xor32(emu, tmp32u2, tmp64u);} while(native_lock_write_d(ED, tmp32u2)); break; case 7: cmp32(emu, ED->dword[0], tmp64u); break; } |