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]

[rfa:] CRIS port part 1/8: gas without tc-*


I'd like to submit and commit the CRIS binutils port.

The port has a.out and ELF support; the gas port is multi-object-format.
The targets are embedded systems without MMU; there's no native support
yet.  FWIW, it also compiles with --enable-targets=all for a native
i686-pc-linux-gnulibc1.

The only change in the root directory is in config.sub, which I believe
should be imported from its home in subversions.gnu.org/config;
it has the required change.  Ok to do that?

Here are the gas changes for all changed and new files, except for the
testsuite and the tc-* files (to avoid size-limit bounce).
Note this ChangeLog entry contains the tc-* entry.

I regenerated dependencies with "make dep-am", which accounts for some
unrelated changes.
It seems dependencies for *coff* for all targets are always added.  It's a
slight nuiscance, but I did not bother to fix that, as it would mean I
would have to explicitly list a lot of targets, which seems not wanted.

Ok to commit?  I'll commit all dependent parts simultaneously.

2000-07-18  Hans-Peter Nilsson  <hp@axis.com>

	* configure.in: Add CRIS support.
	* configure: Regenerate.
	* Makefile.am: (CPU_TYPES): Add cris.
	(CPU_OBJ_VALID) [aout]: Add cris.
	(MULTI_CPU_TYPES): Add cris.
	(MULTI_CPU_OBJ_VALID) [aout]: Add cris.
 	[coff]: Only i386 and mips are valid.
	(TARGET_CPU_CFILES): Add config/tc-cris.c.
	(TARGET_CPU_HFILES): Add config/tc-cris.h.
	(MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c.
	Regenerate dependencies.
	* Makefile.in: Regenerate.
	* as.c: Declare crisaout, criself.
	* po/POTIFILES.in, po/gas.pot: Regenerate.
	* config/tc-cris.h, config/tc-cris.c: New.
	* config/e-criself.c, config/e-crisaout.c: New.

Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.35
diff -p -c -r1.35 configure.in
*** configure.in	2000/07/13 14:57:49	1.35
--- configure.in	2000/07/18 12:31:11
*************** changequote([,])dnl
*** 189,194 ****
--- 189,196 ----
  
        avr-*-*)		    fmt=elf bfd_gas=yes ;;
  
+       cris-*-*)		    fmt=multi bfd_gas=yes ;;
+ 
        d10v-*-*)		    fmt=elf bfd_gas=yes ;;
        d30v-*-*)		    fmt=elf bfd_gas=yes ;;
  
*************** changequote([,])dnl
*** 576,581 ****
--- 578,586 ----
        i386-*-aout)	emulation="i386aout" ;;
        i386-*-coff)	emulation="i386coff" ;;
        i386-*-elf)	emulation="i386elf" ;;
+ 
+       # Always all formats.  Having a.out first makes it the default.
+       cris-*-*)		emulation="crisaout criself" ;;
      esac
  
      emulations="$emulations $emulation"
Index: gas/Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.27
diff -p -c -r1.27 Makefile.am
*** Makefile.am	2000/06/22 13:01:42	1.27
--- Makefile.am	2000/07/18 12:30:34
*************** CPU_TYPES = \
*** 42,47 ****
--- 42,48 ----
  	arc \
  	arm \
  	avr \
+ 	cris \
  	d10v \
  	d30v \
  	fr30 \
*************** CPU_OBJ_VALID = \
*** 99,105 ****
  	case $$o in \
  	aout) \
  	  case $$c in \
! 	  a29k | arm | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
  	    valid=yes ;; \
  	  esac ;; \
  	bout) \
--- 100,106 ----
  	case $$o in \
  	aout) \
  	  case $$c in \
! 	  a29k | arm | cris | i386 | i860 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
  	    valid=yes ;; \
  	  esac ;; \
  	bout) \
*************** CPU_OBJ_VALID = \
*** 128,143 ****
  
  # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
  
! MULTI_CPU_TYPES = i386 mips
  
  MULTI_CPU_OBJ_VALID = \
  	valid= ; \
  	case $$o in \
  	aout) \
  	  case $$c in \
! 	  i386) valid=yes ;; \
  	  esac ;; \
! 	coff) valid=yes ;; \
  	ecoff) \
  	  case $$c in \
  	  mips) valid=yes ;; \
--- 129,147 ----
  
  # These are like CPU_TYPES and CPU_OBJ_VALID, for the obj=multi case.
  
! MULTI_CPU_TYPES = i386 mips cris
  
  MULTI_CPU_OBJ_VALID = \
  	valid= ; \
  	case $$o in \
  	aout) \
  	  case $$c in \
! 	  i386 | cris) valid=yes ;; \
  	  esac ;; \
! 	coff) \
! 	  case $$c in \
! 	  i386 | mips) valid=yes ;; \
! 	  esac ;; \
  	ecoff) \
  	  case $$c in \
  	  mips) valid=yes ;; \
*************** TARGET_CPU_CFILES = \
*** 215,220 ****
--- 219,225 ----
  	config/tc-arc.c \
  	config/tc-arm.c \
  	config/tc-avr.c \
+ 	config/tc-cris.c \
  	config/tc-d10v.c \
  	config/tc-d30v.c \
  	config/tc-fr30.c \
*************** TARGET_CPU_HFILES = \
*** 254,259 ****
--- 259,265 ----
  	config/tc-arc.h \
  	config/tc-arm.h \
  	config/tc-avr.h \
+ 	config/tc-cris.h \
  	config/tc-d10v.h \
  	config/tc-d30v.h \
  	config/tc-fr30.h \
*************** TARG_ENV_HFILES = \
*** 349,354 ****
--- 355,362 ----
  # Multi files in config
  
  MULTI_CFILES = \
+ 	config/e-crisaout.c \
+ 	config/e-criself.c \
  	config/e-i386aout.c \
  	config/e-i386coff.c \
  	config/e-i386elf.c \
*************** e-i386coff.o: $(srcdir)/config/e-i386cof
*** 544,549 ****
--- 552,561 ----
  	$(COMPILE) -c $(srcdir)/config/e-i386coff.c
  e-i386elf.o: $(srcdir)/config/e-i386elf.c
  	$(COMPILE) -c $(srcdir)/config/e-i386elf.c
+ e-crisaout.o: $(srcdir)/config/e-crisaout.c
+ 	$(COMPILE) -c $(srcdir)/config/e-crisaout.c
+ e-criself.o: $(srcdir)/config/e-criself.c
+ 	$(COMPILE) -c $(srcdir)/config/e-criself.c
  
  # The m68k operand parser.
  
*************** DEPTC_avr_elf = $(srcdir)/config/obj-elf
*** 952,957 ****
--- 964,979 ----
    $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
    $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
    $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
+ DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+   $(INCDIR)/opcode/cris.h
+ DEPTC_cris_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-cris.h \
+   $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+   subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h
+ DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+   $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
+   $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h
  DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
    subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
*************** DEPTC_h8500_elf = $(srcdir)/config/obj-e
*** 995,1007 ****
    $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
  DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
!   subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/libbfd.h \
!   $(INCDIR)/opcode/hppa.h
  DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
    $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
    $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
    $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
!   subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libbfd.h $(INCDIR)/opcode/hppa.h \
    dwarf2dbg.h
  DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
--- 1017,1028 ----
    $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
  DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
!   subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
  DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
    $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
    $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
    $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
!   subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \
    dwarf2dbg.h
  DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
*************** DEPTC_i386_multi = $(DEPTC_i386_aout) $(
*** 1254,1259 ****
--- 1275,1281 ----
    $(DEPTC_i386_elf)
  DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
    $(DEPTC_mips_elf)
+ DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
  DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
    $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
    $(INCDIR)/obstack.h
*************** DEPOBJ_avr_elf = $(srcdir)/config/obj-el
*** 1302,1307 ****
--- 1324,1339 ----
    $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
    $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
    $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+ DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+   $(INCDIR)/obstack.h
+ DEPOBJ_cris_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-cris.h \
+   $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+   $(INCDIR)/obstack.h subsegs.h
+ DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+   $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
+   $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
  DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
    $(INCDIR)/obstack.h subsegs.h
*************** DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) 
*** 1576,1581 ****
--- 1608,1614 ----
    $(DEPOBJ_i386_elf)
  DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
    $(DEPOBJ_mips_elf)
+ DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
  DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
    $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
  DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
*************** DEP_avr_coff = $(srcdir)/config/obj-coff
*** 1610,1615 ****
--- 1643,1655 ----
  DEP_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
    $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
    $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
+ DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
+   $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+ DEP_cris_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-cris.h \
+   $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+   $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+   $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
  DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
    $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
  DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
*************** DEP_i386_multi = $(DEP_i386_aout) $(DEP_
*** 1818,1823 ****
--- 1858,1864 ----
    $(DEP_i386_elf)
  DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
    $(DEP_mips_elf)
+ DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf)
  BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.
  #MKDEP    DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
  app.o: app.c
*************** symbols.o: symbols.c $(INCDIR)/obstack.h
*** 1855,1860 ****
--- 1896,1903 ----
  write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h
  gasp.o: gasp.c sb.h macro.h
  itbl-ops.o: itbl-ops.c itbl-ops.h
+ e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
+ e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
  e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
  e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
  e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
Index: gas/as.c
===================================================================
RCS file: /cvs/src/src/gas/as.c,v
retrieving revision 1.14
diff -p -c -r1.14 as.c
*** as.c	2000/07/06 07:25:02	1.14
--- as.c	2000/07/18 12:30:50
*************** static struct itbl_file_list *itbl_files
*** 117,122 ****
--- 117,123 ----
  extern struct emulation mipsbelf, mipslelf, mipself;
  extern struct emulation mipsbecoff, mipslecoff, mipsecoff;
  extern struct emulation i386coff, i386elf, i386aout;
+ extern struct emulation crisaout, criself;
  
  static struct emulation *const emulations[] = { EMULATIONS };
  static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]);
*** /dev/null	Tue Jan  1 05:00:00 1980
--- config/e-crisaout.c	Thu May 18 01:17:28 2000
***************
*** 0 ****
--- 1,17 ----
+ #include "as.h"
+ #include "emul.h"
+ 
+ static const char *
+ crisaout_bfd_name ()
+ {
+   abort ();
+   return NULL;
+ }
+ 
+ #define emul_bfd_name	crisaout_bfd_name
+ #define emul_format	&aout_format_ops
+ 
+ #define emul_name	"crisaout"
+ #define emul_struct_name crisaout
+ #define emul_default_endian 0
+ #include "emul-target.h"
*** /dev/null	Tue Jan  1 05:00:00 1980
--- config/e-criself.c	Thu May 18 01:18:49 2000
***************
*** 0 ****
--- 1,17 ----
+ #include "as.h"
+ #include "emul.h"
+ 
+ static const char *
+ criself_bfd_name ()
+ {
+   abort ();
+   return NULL;
+ }
+ 
+ #define emul_bfd_name	criself_bfd_name
+ #define emul_format	&elf_format_ops
+ 
+ #define emul_name	"criself"
+ #define emul_struct_name criself
+ #define emul_default_endian 0
+ #include "emul-target.h"

brgds, H-P

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