aboutsummaryrefslogtreecommitdiff
path: root/sim/common/cgen-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/common/cgen-utils.c')
-rw-r--r--sim/common/cgen-utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sim/common/cgen-utils.c b/sim/common/cgen-utils.c
index a45804e..8383196 100644
--- a/sim/common/cgen-utils.c
+++ b/sim/common/cgen-utils.c
@@ -423,3 +423,16 @@ ROLSI (val, shift)
return val;
}
+
+/* Emit an error message from CGEN RTL. */
+
+void
+cgen_rtx_error (SIM_CPU *cpu, const char * msg)
+{
+ SIM_DESC sd = CPU_STATE (cpu);
+
+ sim_io_printf (sd, msg);
+ sim_io_printf (sd, "\n");
+
+ sim_engine_halt (sd, cpu, NULL, CIA_GET (cpu), sim_stopped, SIM_SIGTRAP);
+}