Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rars/riscv/instructions/SLLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/rars/tools/InstructionCounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down