diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2025-09-03 18:28:07 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2025-09-03 18:28:07 +0200 |
| commit | be2f566fbfa1486ef278daae81cb8448b5f3b8aa (patch) | |
| tree | 9799c170e7c5a25ead00aa20b3418689f752a9de /src | |
| parent | 08944bc7ca1ae6907d18bcb7cb547c11786c3dad (diff) | |
| download | box64-be2f566fbfa1486ef278daae81cb8448b5f3b8aa.tar.gz box64-be2f566fbfa1486ef278daae81cb8448b5f3b8aa.zip | |
[DYNAREC] Better handling of 32bits 2E & 36 prefix (silent some false negative with Cosim on some multi-bytes NOP)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/dynarec_native_pass.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/dynarec/dynarec_native_pass.c b/src/dynarec/dynarec_native_pass.c index b88cfb41..a90206fb 100644 --- a/src/dynarec/dynarec_native_pass.c +++ b/src/dynarec/dynarec_native_pass.c @@ -168,11 +168,16 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int #endif rep = 0; + rex.is32bits = is32bits; uint8_t pk = PK(0); - while((pk==0xF2) || (pk==0xF3) || (pk==0x3E) || (pk==0x26)) { + while((pk==0xF2) || (pk==0xF3) || (pk==0x3E) || (pk==0x26) + || (is32bits && ((pk==0x2E) || (pk==0x36))) + ) { switch(pk) { case 0xF2: rep = 1; break; case 0xF3: rep = 2; break; + case 0x2E: + case 0x36: case 0x3E: case 0x26: /* ignored */ break; } @@ -180,7 +185,6 @@ uintptr_t native_pass(dynarec_native_t* dyn, uintptr_t addr, int alternate, int pk = PK(0); } rex.rex = 0; - rex.is32bits = is32bits; if(!rex.is32bits) while(pk>=0x40 && pk<=0x4f) { rex.rex = pk; |