This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: opcodes patches


Hi Guys,

  I am forwarding this email for Ben Elliston, who is having some
problems with ORBS...

Cheers
	Nick
------------------------------------------------------------------
The following patches add CGEN support to the opcodes
Makefile/configury.  I have not included patches for generated files
like `configure'. 

2000-07-28  Ben Elliston  <bje@redhat.com>

	* Makefile.am (CGEN, CGENDEPS, CGENDIR, CGENFLAGS): New.
	(run-cgen, stamp-m32r, stamp-fr30): New targets.
	* Makefile.in: Regenerate.
	* configure.in: Add --enable-cgen-maint option.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/opcodes/configure.in,v
retrieving revision 1.11
diff -u -r1.11 configure.in
--- configure.in	2000/07/20 16:46:28	1.11
+++ configure.in	2000/07/28 07:20:05
@@ -88,6 +88,24 @@
 
 AC_CHECK_HEADERS(string.h strings.h stdlib.h)
 
+cgen_maint=no
+cgendir='$(srcdir)/../cgen'
+
+AC_ARG_ENABLE(cgen-maint,
+[  --enable-cgen-maint[=dir]    build cgen generated files],
+[case "${enableval}" in
+  yes)	cgen_maint=yes ;;
+  no)	cgen_maint=no ;;
+  *)
+	# argument is cgen install directory (not implemented yet).
+	# Having a `share' directory might be more appropriate for the .scm,
+	# .cpu, etc. files.
+	cgen_maint=yes
+	cgendir=${cgen_maint}/lib/cgen
+	;;
+esac])dnl
+AM_CONDITIONAL(CGEN_MAINT, test x${cgen_maint} = xyes)
+AC_SUBST(cgendir)
 
 using_cgen=no
 
Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/opcodes/Makefile.am,v
retrieving revision 1.21
diff -u -r1.21 Makefile.am
--- Makefile.am	2000/07/20 16:56:18	1.21
+++ Makefile.am	2000/07/28 07:20:07
@@ -223,8 +223,46 @@
 	$(SHELL) ./config.status --recheck
 
 CLEANFILES = \
+	stamp-m32r stamp-fr30 \
 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
 
+
+CGENDIR = @cgendir@
+CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+CGENFLAGS = -v
+
+CGENDEPS = ../cgen/stamp-cgen \
+	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
+	$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
+	$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
+	$(CGENDIR)/opc-opinst.scm \
+	cgen-asm.in cgen-dis.in cgen-ibld.in
+
+if CGEN_MAINT
+M32R_DEPS = stamp-m32r
+FR30_DEPS = stamp-fr30
+else
+M32R_DEPS =
+FR30_DEPS =
+endif
+
+run-cgen:
+	$(SHELL) $(srcdir)/cgen.sh opcodes $(srcdir) $(CGEN) \
+	  $(CGENDIR) "$(CGENFLAGS)" $(arch) $(prefix) \
+	  "$(options)" $(extrafiles)
+	touch stamp-${prefix}
+.PHONY: run-cgen
+
+# For now, require developers to configure with --enable-cgen-maint.
+$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
+	@true	
+stamp-m32r: $(CGENDEPS) $(CGENDIR)/m32r.cpu $(CGENDIR)/m32r.opc
+	$(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
+
+$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
+	@true
+stamp-fr30: $(CGENDEPS) $(CGENDIR)/fr30.cpu $(CGENDIR)/fr30.opc
+	$(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
 
 
 # The start marker is written this way to pass through automake unscathed.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]