better printing
This commit is contained in:
parent
cdf2ed883a
commit
ce1729d5b1
@ -814,15 +814,15 @@ static void cpu_print_instruction(instruction_t* instruction)
|
|||||||
{
|
{
|
||||||
case FUNC3_SB:
|
case FUNC3_SB:
|
||||||
// Store Byte (8-bits)
|
// 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;
|
break;
|
||||||
case FUNC3_SH:
|
case FUNC3_SH:
|
||||||
// Store Halfword (16-bits)
|
// 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;
|
break;
|
||||||
case FUNC3_SW:
|
case FUNC3_SW:
|
||||||
// Store Word (32-bits)
|
// 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;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "Warning: Unknown func3 0x%x for store instruction\n", instruction->func3);
|
fprintf(stderr, "Warning: Unknown func3 0x%x for store instruction\n", instruction->func3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user