From 77f7c1278b8235aec0ea28ad61bf4d91b1fa0dc8 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 21 May 2025 17:06:42 +0200 Subject: [INTERP] Added unaligned path for F0 FF /1 32bits opcode --- src/emu/x64runf0.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/emu/x64runf0.c b/src/emu/x64runf0.c index 26221789..d86dfce3 100644 --- a/src/emu/x64runf0.c +++ b/src/emu/x64runf0.c @@ -1311,9 +1311,20 @@ uintptr_t RunF0(x64emu_t *emu, rex_t rex, uintptr_t addr) tmp64u = native_lock_read_dd(ED); } while(native_lock_write_dd(ED, dec64(emu, tmp64u))); else { - do { - tmp32u = native_lock_read_d(ED); - } while(native_lock_write_d(ED, dec32(emu, tmp32u))); + if((uintptr_t)ED&3) { + //meh. + do { + tmp32u = ED->dword[0]; + tmp32u &=~0xff; + tmp32u |= native_lock_read_b(ED); + tmp32u = dec32(emu, tmp32u); + } while(native_lock_write_b(ED, tmp32u&0xff)); + ED->dword[0] = tmp32u; + } else { + do { + tmp32u = native_lock_read_d(ED); + } while(native_lock_write_d(ED, dec32(emu, tmp32u))); + } if(MODREG) ED->dword[1] = 0; } #else -- cgit 1.4.1