From 3fc3875e82402f788c85db9de16851570d69346f Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Fri, 5 May 2023 18:33:20 +0800 Subject: [RV64_DYNAREC] Added more opcodes (#764) * Added 67 8B MOV opcode * Added 67 89 MOV opcode --- src/dynarec/rv64/dynarec_rv64_67.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dynarec/rv64/dynarec_rv64_67.c b/src/dynarec/rv64/dynarec_rv64_67.c index 71d7d887..01b66da4 100644 --- a/src/dynarec/rv64/dynarec_rv64_67.c +++ b/src/dynarec/rv64/dynarec_rv64_67.c @@ -441,7 +441,7 @@ uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni break; } break; - + case 0x88: INST_NAME("MOV Eb, Gb"); nextop = F8; @@ -483,6 +483,30 @@ uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni SMWRITELOCK(lock); } break; + case 0x89: + INST_NAME("MOV Ed, Gd"); + nextop=F8; + GETGD; + if(MODREG) { // reg <= reg + MVxw(xRAX+(nextop&7)+(rex.b<<3), gd); + } else { // mem <= reg + addr = geted32(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0); + SDxw(gd, ed, fixedaddress); + SMWRITELOCK(lock); + } + break; + case 0x8B: + INST_NAME("MOV Gd, Ed"); + nextop=F8; + GETGD; + if(MODREG) { + MVxw(gd, xRAX+(nextop&7)+(rex.b<<3)); + } else { + addr = geted32(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0); + SMREADLOCK(lock); + LDxw(gd, ed, fixedaddress); + } + break; case 0x8D: INST_NAME("LEA Gd, Ed"); nextop=F8; @@ -490,7 +514,7 @@ uintptr_t dynarec64_67(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni if(MODREG) { // reg <= reg? that's an invalid operation DEFAULT; } else { // mem <= reg - addr = geted(dyn, addr, ninst, nextop, &ed, gd, x1, &fixedaddress, rex, NULL, 0, 0); + addr = geted32(dyn, addr, ninst, nextop, &ed, gd, x1, &fixedaddress, rex, NULL, 0, 0); if(ed!=gd) { AND(gd, ed, xMASK); } -- cgit 1.4.1