diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-12-23 03:27:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 20:27:10 +0100 |
| commit | 316b2fc98abe75bef52e366acd67bd8ae8981d1f (patch) | |
| tree | 7a6feb51d49300e9ed3175295874ec997cca3a98 | |
| parent | 9c7320422458f746326c8123b92173eacc53dae8 (diff) | |
| download | box64-316b2fc98abe75bef52e366acd67bd8ae8981d1f.tar.gz box64-316b2fc98abe75bef52e366acd67bd8ae8981d1f.zip | |
[DYNAREC_RV64] Fixed some bugs in the dynarec for ETS2 (#1155)
* [DYNAREC_RV64] Fixed BSWAP * [DYNAREC_RV64] Fixed 0F C2 CMPPS opcode
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_0f.c | 6 | ||||
| -rw-r--r-- | src/dynarec/rv64/rv64_emitter.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_0f.c b/src/dynarec/rv64/dynarec_rv64_0f.c index c08083ee..b69cd487 100644 --- a/src/dynarec/rv64/dynarec_rv64_0f.c +++ b/src/dynarec/rv64/dynarec_rv64_0f.c @@ -1637,11 +1637,11 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni switch (u8 & 7) { case 1: - BEQ_MARK(x3, xZR); + BEQ(x3, xZR, 8); // MARK2 FLTS(x3, d0, d1); break; // Less than case 2: - BEQ_MARK(x3, xZR); + BEQ(x3, xZR, 8); // MARK2 FLES(x3, d0, d1); break; // Less or equal case 3: XORI(x3, x3, 1); break; // NaN @@ -1711,7 +1711,7 @@ uintptr_t dynarec64_0F(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni case 0xCC: case 0xCD: case 0xCE: - case 0xCF: /* BSWAP reg */ + case 0xCF: INST_NAME("BSWAP Reg"); gd = xRAX + (opcode & 7) + (rex.b << 3); REV8xw(gd, gd, x1, x2, x3, x4); diff --git a/src/dynarec/rv64/rv64_emitter.h b/src/dynarec/rv64/rv64_emitter.h index ae956640..fdbfdfe3 100644 --- a/src/dynarec/rv64/rv64_emitter.h +++ b/src/dynarec/rv64/rv64_emitter.h @@ -825,7 +825,10 @@ f28–31 ft8–11 FP temporaries Caller AND(s3, s3, s2); \ OR(rd, s1, s3); \ } \ - } + } \ + if (!rex.w) \ + AND(rd, rd, xMASK); + // Zbc // Carry-less multily (low-part) |