diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-03-18 08:14:08 +0000 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-03-18 08:14:08 +0000 |
| commit | 6ee2fbf88c986c1073748dfbcd7f9eb414791119 (patch) | |
| tree | c2fa8394614c602c2dec3adfceb2c39c6fc164ca | |
| parent | 5665653b7d98cf3333f56deae3e40fefc210cc61 (diff) | |
| download | box64-6ee2fbf88c986c1073748dfbcd7f9eb414791119.tar.gz box64-6ee2fbf88c986c1073748dfbcd7f9eb414791119.zip | |
[RV64_DYNAREC] Added 88 MOV opcode
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_00.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_00.c b/src/dynarec/rv64/dynarec_rv64_00.c index 5348f73d..e6b5bbbc 100644 --- a/src/dynarec/rv64/dynarec_rv64_00.c +++ b/src/dynarec/rv64/dynarec_rv64_00.c @@ -297,6 +297,45 @@ uintptr_t dynarec64_00(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni emit_test32(dyn, ninst, rex, ed, gd, x3, x4, x5); break; + case 0x88: + INST_NAME("MOV Eb, Gb"); + nextop = F8; + gd = ((nextop&0x38)>>3)+(rex.r<<3); + if(rex.rex) { + gb2 = 0; + gb1 = xRAX + gd; + } else { + gb2 = ((gd&4)>>2); + gb1 = xRAX+(gd&3); + } + gd = x4; + if(gb2) { + SRLI(x4, gb1, gb2); + gb1 = x4; + } + if(MODREG) { + ed = (nextop&7) + (rex.b<<3); + if(rex.rex) { + eb1 = xRAX+ed; + eb2 = 0; + } else { + eb1 = xRAX+(ed&3); // Ax, Cx, Dx or Bx + eb2 = ((ed&4)>>2); // L or H + } + ANDI(gd, gb1, 0xff); + if(eb2) { + ADDI(x1, xZR, ~0xff); + SLLI(x1, x1, 8); + ANDI(x1, eb1, x1); + SLLI(gd, gd, 8); // it might be possible to avoid SRLI/SLLI, but that will do for now + } + ORI(eb1, eb1, gd); + } else { + addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0); + SB(gb1, ed, fixedaddress); + SMWRITELOCK(lock); + } + break; case 0x89: INST_NAME("MOV Ed, Gd"); nextop=F8; |