diff --git a/src/rars/riscv/instructions/SLLI.java b/src/rars/riscv/instructions/SLLI.java index 550b2b12..8f7584be 100644 --- a/src/rars/riscv/instructions/SLLI.java +++ b/src/rars/riscv/instructions/SLLI.java @@ -36,7 +36,7 @@ a copy of this software and associated documentation files (the public class SLLI extends BasicInstruction { public SLLI() { super("slli t1,t2,10", "Shift left logical : Set t1 to result of shifting t2 left by number of bits specified by immediate", - BasicInstructionFormat.R_FORMAT, "0000000 ttttt sssss 001 fffff 0010011",false); + BasicInstructionFormat.I_FORMAT, "0000000 ttttt sssss 001 fffff 0010011",false); } public void simulate(ProgramStatement statement) { diff --git a/src/rars/tools/InstructionCounter.java b/src/rars/tools/InstructionCounter.java index bcf84694..9a907b6c 100644 --- a/src/rars/tools/InstructionCounter.java +++ b/src/rars/tools/InstructionCounter.java @@ -283,13 +283,13 @@ protected void processRISCVUpdate(Observable resource, AccessNotice notice) { int a = m.getAddress(); if (a == lastAddress) return; lastAddress = a; - counter++; try { ProgramStatement stmt = Memory.getInstance().getStatement(a); // If the program is finished, getStatement() will return null, // a null statement will cause the simulator to stall. if(stmt != null) { + counter++; BasicInstruction instr = (BasicInstruction) stmt.getInstruction(); BasicInstructionFormat format = instr.getInstructionFormat(); if (format == BasicInstructionFormat.R_FORMAT)