Hallo Pete:
Please find attached a patch to add l.nop NOP_REPORT support to the CGEN
simulator. This is needed in order to run the OpenRISC test suite against the
simulator.
Thanks,
rdiez
diff --git a/sim/or1k/or1k.c b/sim/or1k/or1k.c
index 5dd8f60..41fc5bc 100644
--- a/sim/or1k/or1k.c
+++ b/sim/or1k/or1k.c
@@ -131,15 +131,26 @@ void or1k32bf_nop (sim_cpu *current_cpu, USI uimm16)
SIM_DESC sd = CPU_STATE(current_cpu);
switch (uimm16) {
+
+ case NOP_NOP:
+ break;
case NOP_EXIT:
+ sim_io_printf (CPU_STATE(current_cpu), "exit(%d)\n", GET_H_GPR(3) );
sim_engine_halt (sd, current_cpu, NULL, CPU_PC_GET (current_cpu), sim_exited, GET_H_GPR (3));
break;
+
+ case NOP_REPORT:
+ sim_io_printf (CPU_STATE(current_cpu), "report(0x%08x);\n", GET_H_GPR(3) );
+ break;
case NOP_PUTC:
sim_io_printf (CPU_STATE(current_cpu), "%c", (char)(GET_H_GPR(3) & 0xff));
break;
-
+
+ default:
+ sim_io_eprintf(sd, "WARNING: l.nop with unsupported code 0x%08x\n", uimm16);
+ break;
}
}
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc