public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: cgen@sourceware.org, gdb@sources.redhat.com
Cc: jimb@redhat.com
Subject: Re: Troubles building cris target
Date: Thu, 24 Mar 2005 06:20:00 -0000	[thread overview]
Message-ID: <200503240619.j2O6JMdC024049@ignucius.se.axis.com> (raw)
In-Reply-To: <200503161824.j2GIOLaw029089@ignucius.se.axis.com> (message from Hans-Peter Nilsson on Wed, 16 Mar 2005 19:24:21 +0100)

> Date: Wed, 16 Mar 2005 19:24:21 +0100
> From: Hans-Peter Nilsson <hp@axis.com>

> Ok to commit if it works?
> 
> 2005-03-16  Hans-Peter Nilsson  <hp@axis.com>
> 
> 	* sim-decode.scm (cgen-decode.c): Include cgen-ops.h.

That patch worked, as in compiles and cgen-utils.o contains the
intended symbols for cris-sim.  Calling again: any CGEN
maintainer care to comment, perhaps approve?  See earlier post
for the obvious patch.

For CRIS, removing the sim-main.h kludge as per below is
necessary too.  And of course, rebuilding decodev{10,32}.c is
also necessary.

Though until I get approval or other feedback from CGEN, I've
instead committed the following horrible patch, which fixes up
the generated decodev{10,32}.c after the fact but as soon as
it's generated.

(I couldn't find any system where gcc outlined some operator
calls like what happens for Jim Blandy, but then again I don't
have access to an amd64 system with FC2.  SuSE's gcc-3.3.3 on
amd64 does inline.  Ditto gcc-3.2 and 3.4 for various
hewlett-packard-testdrive systems.)

Jim, please update and retry.

I committed regen of all files; most changes in (other) regened
files were the copyright blurb, but there seems to have been
some gcc-4.0 fixes by Alan Modra.  Can't be all bad. :-)
Committed, after running the test-suite (which I haven't
contributed yet, doh!) except the C tests.

	* cris/Makefile.in (stamp-v10fcpu, stamp-v32fcpu): Add kludge to
	include cgen-ops.h in decodev10.c and decodev32.c.
	* cris/sim-main.h: Don't include cgen-ops.h here.
	* cris/arch.c, cris/arch.h, cris/cpuall.h, cris/cpuv10.c,
	cris/cpuv10.h, cris/cpuv32.c, cris/cpuv32.h, cris/cris-desc.c,
	cris/cris-desc.h, cris/cris-opc.h, cris/decodev10.c,
	cris/decodev10.h, cris/decodev32.c, cris/decodev32.h,
	cris/modelv10.c, cris/modelv32.c, cris/semcrisv10f-switch.c,
	cris/semcrisv32f-switch.c: Regenerate.

Index: sim-main.h
===================================================================
RCS file: /cvs/src/src/sim/cris/sim-main.h,v
retrieving revision 1.1
diff -p -c -u -p -r1.1 sim-main.h
--- sim-main.h	28 Jan 2005 04:29:00 -0000	1.1
+++ sim-main.h	24 Mar 2005 06:06:03 -0000
@@ -56,9 +56,6 @@ do { \
 #include "sim-base.h"
 #include "cgen-sim.h"
 #include "cris-sim.h"
-
-/* For occurrences of ANDIF in decodev32.c.  */
-#include "cgen-ops.h"
 \f
 struct cris_sim_mmapped_page {
   USI addr;
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/cris/Makefile.in,v
retrieving revision 1.1
diff -p -c -u -p -r1.1 Makefile.in
--- Makefile.in	28 Jan 2005 04:28:59 -0000	1.1
+++ Makefile.in	24 Mar 2005 06:06:03 -0000
@@ -140,11 +140,14 @@ stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH
 	touch stamp-arch
 arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
 
+# The sed-hack is supposed to be temporary, until we get CGEN to emit it.
 stamp-v10fcpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CGEN_CPU_DIR)/cris.cpu Makefile
 	$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
 	  archfile=$(CGEN_CPU_DIR)/cris.cpu \
 	  cpu=crisv10f mach=crisv10 SUFFIX=v10 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
 	$(SHELL) $(srcroot)/move-if-change $(srcdir)/semv10-switch.c $(srcdir)/semcrisv10f-switch.c
+	sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev10.c > decodev10.c.tmp
+	mv decodev10.c.tmp $(srcdir)/decodev10.c
 	touch stamp-v10fcpu
 cpuv10.h cpuv10.c semcrisv10f-switch.c modelv10.c decodev10.c decodev10.h: $(CGEN_MAINT) stamp-v10fcpu
 
@@ -153,6 +156,8 @@ stamp-v32fcpu: $(CGEN_READ_SCM) $(CGEN_C
 	  archfile=$(CGEN_CPU_DIR)/cris.cpu \
 	  cpu=crisv32f mach=crisv32 SUFFIX=v32 FLAGS="with-scache with-profile=fn" EXTRAFILES="$(CGEN_CPU_SEMSW)"
 	$(SHELL) $(srcroot)/move-if-change $(srcdir)/semv32-switch.c $(srcdir)/semcrisv32f-switch.c
+	sed -ne 'p; s/^\(#include "sim-assert.h"\)$$/#include "cgen-ops.h"/p' < $(srcdir)/decodev32.c > decodev32.c.tmp
+	mv decodev32.c.tmp $(srcdir)/decodev32.c
 	touch stamp-v32fcpu
 cpuv32.h cpuv32.c semcrisv32f-switch.c modelv32.c decodev32.c decodev32.h: $(CGEN_MAINT) stamp-v32fcpu
 
brgds, H-P

  reply	other threads:[~2005-03-24  6:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vt27jk8r372.fsf@zenia.home>
2005-03-15 23:09 ` Hans-Peter Nilsson
2005-03-16 17:57   ` Jim Blandy
2005-03-16 18:25     ` Hans-Peter Nilsson
2005-03-24  6:20       ` Hans-Peter Nilsson [this message]
2005-03-24 12:29       ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200503240619.j2O6JMdC024049@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=cgen@sourceware.org \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).