diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2023-03-22 15:35:44 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-22 08:35:44 +0100 |
| commit | 75036c43b5feb947ad6e11b5405d2df49f628695 (patch) | |
| tree | 6e1eb96d6b9ff54759d30670afb38a4061bf30ca /src | |
| parent | 3656cd66ea13833e9959598862e7a1e334bea6a0 (diff) | |
| download | box64-75036c43b5feb947ad6e11b5405d2df49f628695.tar.gz box64-75036c43b5feb947ad6e11b5405d2df49f628695.zip | |
[RV64_DYNAREC] Fixed 88 MOV opcode (#613)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_00.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_00.c b/src/dynarec/rv64/dynarec_rv64_00.c index 9b0c4a63..126e342e 100644 --- a/src/dynarec/rv64/dynarec_rv64_00.c +++ b/src/dynarec/rv64/dynarec_rv64_00.c @@ -522,7 +522,7 @@ uintptr_t dynarec64_00(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni } gd = x4; if(gb2) { - SRLI(x4, gb1, gb2); + SRLI(x4, gb1, 8); gb1 = x4; } if(MODREG) { @@ -536,12 +536,13 @@ uintptr_t dynarec64_00(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int ni } ANDI(gd, gb1, 0xff); if(eb2) { - ADDI(x1, xZR, ~0xff); - SLLI(x1, x1, 8); + MOV64x(x1, 0xffffffffffff00ffLL); ANDI(x1, eb1, x1); - SLLI(gd, gd, 8); // it might be possible to avoid SRLI/SLLI, but that will do for now + SLLI(gd, gd, 8); + OR(eb1, x1, gd); + } else { + OR(eb1, eb1, gd); } - ORI(eb1, eb1, gd); } else { addr = geted(dyn, addr, ninst, nextop, &ed, x2, x1, &fixedaddress, rex, &lock, 1, 0); SB(gb1, ed, fixedaddress); |