diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-11-16 13:44:36 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-11-16 13:44:36 +0100 |
| commit | 49a854fa7e4a7204d9b9e1bcaeadd0182f64fa31 (patch) | |
| tree | 53ae41b46b97f406350dd12307b10583fd21bcfe /src/emu | |
| parent | 5adabbbcaae8f794d603605b2368492cf5704695 (diff) | |
| download | box64-49a854fa7e4a7204d9b9e1bcaeadd0182f64fa31.tar.gz box64-49a854fa7e4a7204d9b9e1bcaeadd0182f64fa31.zip | |
[INTERPRETER] Fixed potential issue with 0F A3 opcode
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run0f.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/emu/x64run0f.c b/src/emu/x64run0f.c index bac642b3..d7b0fe61 100644 --- a/src/emu/x64run0f.c +++ b/src/emu/x64run0f.c @@ -1125,19 +1125,19 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step) nextop = F8; GETED(0); GETGD; - tmp32s = GD->sdword[0]; - tmp8u=tmp32s&(rex.w?63:31); - tmp32s >>= (rex.w?6:5); + tmp64s = rex.w?GD->sq[0]:GD->sdword[0]; + tmp8u=tmp64s&(rex.w?63:31); + tmp64s >>= (rex.w?6:5); if(!MODREG) { #ifdef TEST_INTERPRETER - test->memaddr=((test->memaddr)+(tmp32s<<(rex.w?3:2))); + test->memaddr=((test->memaddr)+(tmp64s<<(rex.w?3:2))); if(rex.w) *(uint64_t*)test->mem = *(uint64_t*)test->memaddr; else *(uint32_t*)test->mem = *(uint32_t*)test->memaddr; #else - ED=(reg64_t*)(((uintptr_t)(ED))+(tmp32s<<(rex.w?3:2))); + ED=(reg64_t*)(((uintptr_t)(ED))+(tmp64s<<(rex.w?3:2))); #endif } if(rex.w) { |