* [RFA] Patch for cgen_rtx_error()
@ 2000-10-07 18:40 Ben Elliston
2000-10-07 18:51 ` Frank Ch. Eigler
0 siblings, 1 reply; 3+ messages in thread
From: Ben Elliston @ 2000-10-07 18:40 UTC (permalink / raw)
To: gdb-patches; +Cc: bje
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 <bje@redhat.com>
* 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");
+}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Patch for cgen_rtx_error()
2000-10-07 18:40 [RFA] Patch for cgen_rtx_error() Ben Elliston
@ 2000-10-07 18:51 ` Frank Ch. Eigler
[not found] ` <Pine.LNX.4.21.0010090828120.26484-100000@moshpit.cygnus.com>
0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2000-10-07 18:51 UTC (permalink / raw)
To: Ben Elliston; +Cc: gdb-patches
On Sun, Oct 08, 2000 at 11:38:00AM +1100, Ben Elliston wrote:
> The following patch implements the cgen_rtx_error function [...]
> [...]
> +/* 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");
> +}
Rather than just print the given message (is it really a varargs function?),
it would be good to do a sim_engine_halt() there too.
- FChE
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE539MSVZbdDOm/ZT0RAqiBAJ0VrugoZUSWacpG6GmCx0wiHfUgowCeIqUv
iqSY2nfAuyws+PB/4aMDDXg=
=TF1H
-----END PGP SIGNATURE-----
From cgf@cygnus.com Sat Oct 07 19:07:00 2000
From: Chris Faylor <cgf@cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Makefile.in tweak
Date: Sat, 07 Oct 2000 19:07:00 -0000
Message-id: <20001007220647.C31591@cygnus.com>
References: <Pine.LNX.4.21.0010081028160.23524-100000@moshpit.cygnus.com>
X-SW-Source: 2000-10/msg00028.html
Content-length: 984
On Sun, Oct 08, 2000 at 10:30:21AM +1100, Ben Elliston wrote:
>The following patch is a very minor change -- it replaces leading spaces
>with a single hard tab in Makefile.in so that Emacs doesn't complain about a
>possible Makefile syntax error. Okay to commit?
Sure. Go ahead.
cgf
>--- Makefile.in 2000/09/15 10:21:14 1.791
>+++ Makefile.in 2000/10/07 23:28:17
>@@ -646,7 +646,7 @@
> ui-out.o cli-out.o \
> varobj.o wrapper.o \
> jv-lang.o jv-valprint.o jv-typeprint.o \
>- m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
>+ m2-lang.o p-lang.o p-typeprint.o p-valprint.o \
> scm-exp.o scm-lang.o scm-valprint.o complaints.o typeprint.o \
> c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
> c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
>
>Ben
--
cgf@cygnus.com Cygnus Solutions, a Red Hat company
http://sourceware.cygnus.com/ http://www.redhat.com/
From bje@redhat.com Sun Oct 08 14:32:00 2000
From: Ben Elliston <bje@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: gdb-patches@sources.redhat.com, cgen development <cgen@sources.redhat.com>
Subject: Re: [RFA] Patch for cgen_rtx_error()
Date: Sun, 08 Oct 2000 14:32:00 -0000
Message-id: <Pine.LNX.4.21.0010090828120.26484-100000@moshpit.cygnus.com>
References: <20001007215114.D31946@redhat.com>
X-SW-Source: 2000-10/msg00029.html
Content-length: 900
fche wrote:
On Sun, Oct 08, 2000 at 11:38:00AM +1100, Ben Elliston wrote:
> +/* 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");
> +}
Rather than just print the given message (is it really a varargs
function?), it would be good to do a sim_engine_halt() there too.
Upon further inspection, it seems that the CGEN `error' rtx accepts only a
single argument, so this function need not accept varargs. Right, Doug?
Without making assumptions about the architecture of any given port, what
are you proposing that I pass for the `pc' argument to sim_engine_halt?
It's wrong to assume that GET_H_PC() and friends will be present.
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFA] Patch for cgen_rtx_error()
[not found] ` <Pine.LNX.4.21.0010090828120.26484-100000@moshpit.cygnus.com>
@ 2000-10-08 14:52 ` Frank Ch. Eigler
0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2000-10-08 14:52 UTC (permalink / raw)
To: Ben Elliston; +Cc: gdb-patches
Hi -
On Mon, Oct 09, 2000 at 08:31:50AM +1100, Ben Elliston wrote:
> [...]
> Without making assumptions about the architecture of any given port, what
> are you proposing that I pass for the `pc' argument to sim_engine_halt?
> It's wrong to assume that GET_H_PC() and friends will be present.
You could use CIA_GET() or else NULL_CIA.
- FChE
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE54OyKVZbdDOm/ZT0RAnDhAJ4r0ccJq7yoyrzGig/4kZFd2KNREgCggJdS
DXYB3C65p7mkPat9g84qxFo=
=bFgf
-----END PGP SIGNATURE-----
From bje@redhat.com Sun Oct 08 15:56:00 2000
From: Ben Elliston <bje@redhat.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Patch for cgen_rtx_error()
Date: Sun, 08 Oct 2000 15:56:00 -0000
Message-id: <Pine.LNX.4.21.0010090956250.27008-100000@moshpit.cygnus.com>
References: <20001008175210.B27022@redhat.com>
X-SW-Source: 2000-10/msg00031.html
Content-length: 428
On Mon, Oct 09, 2000 at 08:31:50AM +1100, Ben Elliston wrote:
> [...]
> Without making assumptions about the architecture of any given port, what
> are you proposing that I pass for the `pc' argument to sim_engine_halt?
> It's wrong to assume that GET_H_PC() and friends will be present.
You could use CIA_GET() or else NULL_CIA.
I've made this suggested change and checked it into sim/common.
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-08 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-07 18:40 [RFA] Patch for cgen_rtx_error() Ben Elliston
2000-10-07 18:51 ` Frank Ch. Eigler
[not found] ` <Pine.LNX.4.21.0010090828120.26484-100000@moshpit.cygnus.com>
2000-10-08 14:52 ` Frank Ch. Eigler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox