From ece732ba41a7e6e516de081eaf2f0cb465e8115e Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Sat, 15 Jun 2024 15:02:16 +0800 Subject: [DYNAREC_RV64] Fixed 16bit LOCK ADD issue (#1584) --- src/dynarec/rv64/dynarec_rv64_66f0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 +} -- cgit 1.4.1