diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_00_0.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_00_0.c b/src/dynarec/rv64/dynarec_rv64_00_0.c index a0d074fe..716671d5 100644 --- a/src/dynarec/rv64/dynarec_rv64_00_0.c +++ b/src/dynarec/rv64/dynarec_rv64_00_0.c @@ -108,15 +108,17 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int } else { DEFAULT; } + break; case 0x07: if (rex.is32bits) { INST_NAME("POP ES"); POP1_32(x1); SH(x1, xEmu, offsetof(x64emu_t, segs[_ES])); - SW(x1, xEmu, offsetof(x64emu_t, segs_serial[_ES])); + SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_ES])); } else { DEFAULT; } + break; case 0x08: INST_NAME("OR Eb, Gb"); SETFLAGS(X_ALL, SF_SET_PENDING); @@ -135,7 +137,6 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int emit_or32(dyn, ninst, rex, ed, gd, x3, x4); WBACK; break; - case 0x0A: INST_NAME("OR Gb, Eb"); SETFLAGS(X_ALL, SF_SET_PENDING); @@ -250,16 +251,18 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int } else { DEFAULT; } + break; case 0x17: if (rex.is32bits) { INST_NAME("POP SS"); SMREAD(); POP1_32(x1); SH(x1, xEmu, offsetof(x64emu_t, segs[_SS])); - SW(x1, xEmu, offsetof(x64emu_t, segs_serial[_SS])); + SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_SS])); } else { DEFAULT; } + break; case 0x18: INST_NAME("SBB Eb, Gb"); READFLAGS(X_CF); @@ -317,7 +320,27 @@ uintptr_t dynarec64_00_0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int MOV64xw(x2, i64); emit_sbb32(dyn, ninst, rex, xRAX, x2, x3, x4, x5); break; - + case 0x1E: + if (rex.is32bits) { + INST_NAME("PUSH DS"); + LHU(x1, xEmu, offsetof(x64emu_t, segs[_DS])); + PUSH1_32(x1); + SMWRITE(); + } else { + DEFAULT; + } + break; + case 0x1F: + if(rex.is32bits) { + INST_NAME("POP DS"); + SMREAD(); + POP1_32(x1); + SH(x1, xEmu, offsetof(x64emu_t, segs[_DS])); + SW(xZR, xEmu, offsetof(x64emu_t, segs_serial[_DS])); + } else { + DEFAULT; + } + break; case 0x20: INST_NAME("AND Eb, Gb"); SETFLAGS(X_ALL, SF_SET_PENDING); |