From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Elliston To: gdb-patches@sources.redhat.com Cc: bje@redhat.com Subject: [RFA] Patch for cgen_rtx_error() Date: Sat, 07 Oct 2000 18:40:00 -0000 Message-id: <200010080038.LAA27334@dublin.cygnus.com> X-SW-Source: 2000-10/msg00026.html The following patch implements the cgen_rtx_error function, which is invoked by cgen-generated code. Until now, no one has used the cgen (error ..) rtx, so this has gone unnoticed. Okay to commit? Ben 2000-10-08 Ben Elliston * cgen-utils.c (cgen_rtx_error): New function. diff -u -r1.26 cgen-utils.c --- cgen-utils.c 2000/09/26 17:24:19 1.26 +++ cgen-utils.c 2000/10/08 01:37:31 @@ -423,3 +423,15 @@ return val; } + +/* Emit an error message from CGEN RTL. */ + +void +cgen_rtx_error (SIM_CPU *cpu, const char * fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + sim_io_printf (CPU_STATE (cpu), fmt, ap); + va_end(ap); + sim_io_printf (CPU_STATE (cpu), "\n"); +}