diff options
Diffstat (limited to 'src/dynarec/rv64/dynarec_rv64_00_3.c')
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_00_3.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_00_3.c b/src/dynarec/rv64/dynarec_rv64_00_3.c index c4ba2e1d..81c240e4 100644 --- a/src/dynarec/rv64/dynarec_rv64_00_3.c +++ b/src/dynarec/rv64/dynarec_rv64_00_3.c @@ -796,7 +796,10 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int SETFLAGS(X_ALL, SF_SET_PENDING, NAT_FLAGS_FUSION); // some flags are left undefined if (!dyn->insts[ninst].x64.gen_flags) { GETED(0); - SLLxw(ed, ed, xRCX); + if (rex.w) + SLL(ed, ed, xRCX); + else + SLLW(ed, ed, xRCX); if (dyn->insts[ninst].nat_flags_fusion) { if (!rex.w) ZEROUP(ed); NAT_FLAGS_OPS(ed, xZR); @@ -818,7 +821,10 @@ uintptr_t dynarec64_00_3(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int SETFLAGS(X_ALL, SF_SET_PENDING, NAT_FLAGS_FUSION); // some flags are left undefined if (!dyn->insts[ninst].x64.gen_flags) { GETED(0); - SRLxw(ed, ed, xRCX); + if (rex.w) + SRL(ed, ed, xRCX); + else + SRLW(ed, ed, xRCX); if (dyn->insts[ninst].nat_flags_fusion) { if (!rex.w) ZEROUP(ed); NAT_FLAGS_OPS(ed, xZR); |