diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2024-06-15 15:02:16 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 09:02:16 +0200 |
| commit | ece732ba41a7e6e516de081eaf2f0cb465e8115e (patch) | |
| tree | 9eb0ba15328eb8f5a769378381a0d5041a773bda /src | |
| parent | 8f40dc1a8c7bfebbe9e0903a6d61af503154f99e (diff) | |
| download | box64-ece732ba41a7e6e516de081eaf2f0cb465e8115e.tar.gz box64-ece732ba41a7e6e516de081eaf2f0cb465e8115e.zip | |
[DYNAREC_RV64] Fixed 16bit LOCK ADD issue (#1584)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dynarec/rv64/dynarec_rv64_66f0.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dynarec/rv64/dynarec_rv64_66f0.c b/src/dynarec/rv64/dynarec_rv64_66f0.c index 02fdae40..4317171e 100644 --- a/src/dynarec/rv64/dynarec_rv64_66f0.c +++ b/src/dynarec/rv64/dynarec_rv64_66f0.c @@ -128,7 +128,7 @@ uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int } SETFLAGS(X_ALL, SF_SET_PENDING); if(MODREG) { - if(opcode==0x81) u64 = F16; else (uint16_t)(int16_t)F8S; + if(opcode==0x81) u64 = F16; else u64 = (uint16_t)(int16_t)F8S; ed = xRAX+(nextop&7)+(rex.b<<3); MOV64x(x5, u64); ZEXTH(x6, ed); @@ -138,7 +138,7 @@ uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int OR(ed, ed, x6); } else { addr = geted(dyn, addr, ninst, nextop, &wback, x2, x1, &fixedaddress, rex, LOCK_LOCK, 0, (opcode==0x81)?2:1); - if(opcode==0x81) u64 = F16; else (uint16_t)(int16_t)F8S; + if(opcode==0x81) u64 = F16; else u64 = (uint16_t)(int16_t)F8S; MOV64x(x5, u64); ANDI(x3, wback, 0b10); @@ -193,4 +193,4 @@ uintptr_t dynarec64_66F0(dynarec_rv64_t* dyn, uintptr_t addr, uintptr_t ip, int } return addr; -} \ No newline at end of file +} |