From 1cfb722a1e827d6aa128efff5de15225bc011a39 Mon Sep 17 00:00:00 2001 From: CocoSimone Date: Tue, 20 Sep 2022 23:02:35 +0200 Subject: [PATCH] minor RSP changes --- src/n64/core/rsp/instructions.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/n64/core/rsp/instructions.cpp b/src/n64/core/rsp/instructions.cpp index 68ca8e7d..c6bf83d3 100644 --- a/src/n64/core/rsp/instructions.cpp +++ b/src/n64/core/rsp/instructions.cpp @@ -227,14 +227,12 @@ void RSP::sqv(u32 instr) { void RSP::sllv(u32 instr) { u8 sa = gpr[RS(instr)] & 0x1F; - s32 rt = gpr[RT(instr)]; - gpr[RD(instr)] = rt << sa; + gpr[RD(instr)] = (u32)gpr[RT(instr)] << sa; } void RSP::srlv(u32 instr) { u8 sa = gpr[RS(instr)] & 0x1F; - u32 rt = gpr[RT(instr)]; - gpr[RD(instr)] = rt >> sa; + gpr[RD(instr)] = (u32)gpr[RT(instr)] >> sa; } void RSP::srav(u32 instr) { @@ -244,7 +242,7 @@ void RSP::srav(u32 instr) { void RSP::sll(u32 instr) { u8 sa = (instr >> 6) & 0x1f; - gpr[RD(instr)] = gpr[RT(instr)] << sa; + gpr[RD(instr)] = (u32)gpr[RT(instr)] << sa; } void RSP::srl(u32 instr) {