diff --git a/src/cpu/rv32cpu.c b/src/cpu/rv32cpu.c index 89b3ce0..1d1be22 100644 --- a/src/cpu/rv32cpu.c +++ b/src/cpu/rv32cpu.c @@ -814,15 +814,15 @@ static void cpu_print_instruction(instruction_t* instruction) { case FUNC3_SB: // Store Byte (8-bits) - printf("sb x%u, %d(x%u)\n", instruction->rs1, immediate, instruction->rs2); + printf("sb x%u, %d(x%u)\n", instruction->rs2, immediate, instruction->rs1); break; case FUNC3_SH: // Store Halfword (16-bits) - printf("sh x%u, %d(x%u)\n", instruction->rs1, immediate, instruction->rs2); + printf("sh x%u, %d(x%u)\n", instruction->rs2, immediate, instruction->rs1); break; case FUNC3_SW: // Store Word (32-bits) - printf("sw x%u, %d(x%u)\n", instruction->rs1, immediate, instruction->rs2); + printf("sw x%u, %d(x%u)\n", instruction->rs2, immediate, instruction->rs1); break; default: fprintf(stderr, "Warning: Unknown func3 0x%x for store instruction\n", instruction->func3);