diff -crB binutils-2.11.2/bfd/Makefile.am binutils-2.11.2.i51/bfd/Makefile.am *** binutils-2.11.2/bfd/Makefile.am Mon Jun 11 12:03:59 2001 --- binutils-2.11.2.i51/bfd/Makefile.am Wed Dec 26 16:20:51 2001 *************** *** 57,62 **** --- 57,63 ---- cpu-ia64.lo \ cpu-i370.lo \ cpu-i386.lo \ + cpu-i51.lo \ cpu-i860.lo \ cpu-i960.lo \ cpu-m32r.lo \ *************** *** 99,104 **** --- 100,106 ---- cpu-ia64.c \ cpu-i370.c \ cpu-i386.c \ + cpu-i51.c \ cpu-i860.c \ cpu-i960.c \ cpu-m32r.c \ *************** *** 185,190 **** --- 187,193 ---- elf32-hppa.lo \ elf32-i370.lo \ elf32-i386.lo \ + elf32-i51.lo \ elf32-i860.lo \ elf32-i960.lo \ elf32-ia64.lo \ *************** *** 323,328 **** --- 326,332 ---- elf32-hppa.c \ elf32-i370.c \ elf32-i386.c \ + elf32-i51.c \ elf32-i860.c \ elf32-i960.c \ elf32-m32r.c \ *************** *** 789,794 **** --- 793,799 ---- $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h + cpu-i51.lo: cpu-i51.c $(INCDIR)/filenames.h cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h *************** *** 1002,1007 **** --- 1007,1016 ---- elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h + elf32-i51.lo: elf32-i51.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/i51.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ diff -crB binutils-2.11.2/bfd/Makefile.in binutils-2.11.2.i51/bfd/Makefile.in *** binutils-2.11.2/bfd/Makefile.in Mon Jun 11 12:03:59 2001 --- binutils-2.11.2.i51/bfd/Makefile.in Wed Dec 26 16:20:51 2001 *************** *** 1327,1332 **** --- 1327,1333 ---- $(srcdir)/../opcodes/ia64-opc.h $(INCDIR)/opcode/ia64.h cpu-i370.lo: cpu-i370.c $(INCDIR)/filenames.h cpu-i386.lo: cpu-i386.c $(INCDIR)/filenames.h + cpu-i51.lo: cpu-i51.c $(INCDIR)/filenames.h cpu-i860.lo: cpu-i860.c $(INCDIR)/filenames.h cpu-i960.lo: cpu-i960.c $(INCDIR)/filenames.h cpu-m32r.lo: cpu-m32r.c $(INCDIR)/filenames.h *************** *** 1540,1545 **** --- 1541,1550 ---- elf32-i386.lo: elf32-i386.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \ $(INCDIR)/elf/external.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/reloc-macros.h \ elf32-target.h + elf32-i51.lo: elf32-i51.c $(INCDIR)/filenames.h elf-bfd.h \ + $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ + $(INCDIR)/bfdlink.h $(INCDIR)/elf/i51.h $(INCDIR)/elf/reloc-macros.h \ + elf32-target.h elf32-i860.lo: elf32-i860.c $(INCDIR)/filenames.h elf-bfd.h \ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \ diff -crB binutils-2.11.2/bfd/archures.c binutils-2.11.2.i51/bfd/archures.c *** binutils-2.11.2/bfd/archures.c Mon Jun 11 12:03:59 2001 --- binutils-2.11.2.i51/bfd/archures.c Wed Dec 26 16:20:51 2001 *************** *** 254,259 **** --- 254,260 ---- .#define bfd_mach_avr4 4 .#define bfd_mach_avr5 5 . bfd_arch_cris, {* Axis CRIS *} + . bfd_arch_i51, {* I51 microcontrollers *} . bfd_arch_last . }; */ *************** *** 329,334 **** --- 330,336 ---- extern const bfd_arch_info_type bfd_mcore_arch; extern const bfd_arch_info_type bfd_avr_arch; extern const bfd_arch_info_type bfd_ia64_arch; + extern const bfd_arch_info_type bfd_i51_arch; static const bfd_arch_info_type * const bfd_archures_list[] = { #ifdef SELECT_ARCHITECTURES *************** *** 373,378 **** --- 375,381 ---- &bfd_mcore_arch, &bfd_avr_arch, &bfd_ia64_arch, + &bfd_i51_arch, #endif 0 }; diff -crB binutils-2.11.2/bfd/bfd-in2.h binutils-2.11.2.i51/bfd/bfd-in2.h *** binutils-2.11.2/bfd/bfd-in2.h Mon Jun 11 12:03:59 2001 --- binutils-2.11.2.i51/bfd/bfd-in2.h Sun Dec 30 10:46:39 2001 *************** *** 1527,1532 **** --- 1527,1533 ---- #define bfd_mach_avr4 4 #define bfd_mach_avr5 5 bfd_arch_cris, /* Axis CRIS */ + bfd_arch_i51, /* MCS-51 microcontrollers */ bfd_arch_last }; *************** *** 2677,2682 **** --- 2678,2703 ---- BFD_RELOC_860_HIGH, BFD_RELOC_860_HIGOT, BFD_RELOC_860_HIGOTOFF, + + /* This is a register indirect reloc for the I51 */ + BFD_RELOC_I51_R1, + /* This is a register reloc for the I51 */ + BFD_RELOC_I51_R3, + /* This is a 16 bit reloc for the I51 - 8 bit signed pc relative */ + BFD_RELOC_I51_7_PCREL, + /* This is a 16 bit reloc for the I51 - 11 bit absolute inpage */ + BFD_RELOC_I51_11, + /* This is a bit register reloc for the I51 */ + BFD_RELOC_I51_8_BIT, + /* This is a LOW(16BIT) reloc for the I51 */ + BFD_RELOC_I51_8_LOW, + /* This is a HIGH(16BIT) reloc for the I51 */ + BFD_RELOC_I51_8_HIGH, + /* This is a Byte2Bit reloc for the I51 */ + BFD_RELOC_I51_8_B2B, + /* This is a 13 bit Pcode reloc for the I51 */ + BFD_RELOC_I51_13_PCODE, + BFD_RELOC_UNUSED }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; reloc_howto_type * diff -crB binutils-2.11.2/bfd/config.bfd binutils-2.11.2.i51/bfd/config.bfd *** binutils-2.11.2/bfd/config.bfd Thu Jun 14 13:16:59 2001 --- binutils-2.11.2.i51/bfd/config.bfd Wed Dec 26 16:20:51 2001 *************** *** 914,919 **** --- 914,924 ---- targ_defvec=m68kcoff_vec targ_selvecs=ieee_vec ;; + + i51-*-*) + targ_defvec=bfd_elf32_i51_vec + ;; + # END OF targmatch.h *) echo 1>&2 "*** BFD does not support target ${targ}." diff -crB binutils-2.11.2/bfd/configure binutils-2.11.2.i51/bfd/configure *** binutils-2.11.2/bfd/configure Tue Jun 19 21:58:08 2001 --- binutils-2.11.2.i51/bfd/configure Wed Dec 26 16:20:51 2001 *************** *** 5944,5949 **** --- 5944,5950 ---- tb="$tb elf32-hppa.lo elf32.lo $elf" ;; bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;; bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;; + bfd_elf32_i51_vec) tb="$tb elf32-i51.lo elf32.lo $elf" ;; bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf" target64=true ;; bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;; diff -crB binutils-2.11.2/bfd/configure.in binutils-2.11.2.i51/bfd/configure.in *** binutils-2.11.2/bfd/configure.in Tue Jun 19 21:58:12 2001 --- binutils-2.11.2.i51/bfd/configure.in Wed Dec 26 16:20:51 2001 *************** *** 659,664 **** --- 659,665 ---- w65_vec) tb="$tb coff-w65.lo reloc16.lo" ;; we32kcoff_vec) tb="$tb coff-we32k.lo" ;; z8kcoff_vec) tb="$tb coff-z8k.lo reloc16.lo" ;; + bfd_elf32_i51_vec) tb="$tb elf32-i51.lo elf32.lo $elf" ;; "") ;; *) AC_MSG_ERROR(*** unknown target vector $vec) ;; diff -crB binutils-2.11.2/bfd/libbfd.h binutils-2.11.2.i51/bfd/libbfd.h *** binutils-2.11.2/bfd/libbfd.h Mon Jun 11 12:04:17 2001 --- binutils-2.11.2.i51/bfd/libbfd.h Wed Dec 26 16:20:51 2001 *************** *** 1030,1035 **** --- 1030,1044 ---- "BFD_RELOC_860_HIGH", "BFD_RELOC_860_HIGOT", "BFD_RELOC_860_HIGOTOFF", + "BFD_RELOC_I51_R1", + "BFD_RELOC_I51_R3", + "BFD_RELOC_I51_7_PCREL", + "BFD_RELOC_I51_11", + "BFD_RELOC_I51_8_BIT", + "BFD_RELOC_I51_8_LOW", + "BFD_RELOC_I51_8_HIGH", + "BFD_RELOC_I51_8_B2B", + "BFD_RELOC_I51_13_PCODE", "@@overflow: BFD_RELOC_UNUSED@@", }; #endif diff -crB binutils-2.11.2/bfd/reloc.c binutils-2.11.2.i51/bfd/reloc.c *** binutils-2.11.2/bfd/reloc.c Mon Jun 11 12:04:21 2001 --- binutils-2.11.2.i51/bfd/reloc.c Wed Dec 26 16:20:51 2001 *************** *** 3013,3018 **** --- 3013,3039 ---- ENUMDOC Intel i860 Relocations. + ENUMX + BFD_RELOC_I51_R1 + ENUMX + BFD_RELOC_I51_R3 + ENUMX + BFD_RELOC_I51_7_PCREL + ENUMX + BFD_RELOC_I51_11 + ENUMX + BFD_RELOC_I51_8_BIT + ENUMX + BFD_RELOC_I51_8_LOW + ENUMX + BFD_RELOC_I51_8_HIGH + ENUMX + BFD_RELOC_I51_8_B2B + ENUMX + BFD_RELOC_I51_13_PCODE + ENUMDOC + MCS-51 Relocations. + ENDSENUM BFD_RELOC_UNUSED CODE_FRAGMENT diff -crB binutils-2.11.2/bfd/targets.c binutils-2.11.2.i51/bfd/targets.c *** binutils-2.11.2/bfd/targets.c Mon Jun 11 12:04:21 2001 --- binutils-2.11.2.i51/bfd/targets.c Wed Dec 26 16:20:51 2001 *************** *** 519,524 **** --- 519,525 ---- extern const bfd_target bfd_elf32_fr30_vec; extern const bfd_target bfd_elf32_hppa_linux_vec; extern const bfd_target bfd_elf32_hppa_vec; + extern const bfd_target bfd_elf32_i51_vec; extern const bfd_target bfd_elf32_i370_vec; extern const bfd_target bfd_elf32_i386_vec; extern const bfd_target bfd_elf32_i860_little_vec; *************** *** 744,749 **** --- 745,751 ---- &bfd_elf32_hppa_linux_vec, &bfd_elf32_i370_vec, &bfd_elf32_i386_vec, + &bfd_elf32_i51_vec, #ifdef BFD64 &bfd_elf64_x86_64_vec, #endif diff -crB binutils-2.11.2/binutils/Makefile.am binutils-2.11.2.i51/binutils/Makefile.am *** binutils-2.11.2/binutils/Makefile.am Mon May 28 20:34:46 2001 --- binutils-2.11.2.i51/binutils/Makefile.am Wed Dec 26 16:20:51 2001 *************** *** 493,499 **** $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ ! $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h --- 493,499 ---- $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ ! $(INCDIR)/elf/i51.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h diff -crB binutils-2.11.2/binutils/Makefile.in binutils-2.11.2.i51/binutils/Makefile.in *** binutils-2.11.2/binutils/Makefile.in Mon May 28 20:34:46 2001 --- binutils-2.11.2.i51/binutils/Makefile.in Wed Dec 26 16:20:51 2001 *************** *** 1379,1385 **** $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ ! $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h --- 1379,1385 ---- $(INCDIR)/elf/fr30.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/i960.h \ $(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \ $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \ ! $(INCDIR)/elf/i51.h $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \ $(INCDIR)/libiberty.h windres.h winduni.h diff -crB binutils-2.11.2/binutils/readelf.c binutils-2.11.2.i51/binutils/readelf.c *** binutils-2.11.2/binutils/readelf.c Mon May 28 20:34:24 2001 --- binutils-2.11.2.i51/binutils/readelf.c Wed Dec 26 16:20:51 2001 *************** *** 74,79 **** --- 74,80 ---- #include "elf/cris.h" #include "elf/i860.h" #include "elf/x86-64.h" + #include "elf/i51.h" #include "bucomm.h" #include "getopt.h" *************** *** 588,593 **** --- 589,595 ---- case EM_CRIS: case EM_860: case EM_X86_64: + case EM_I51: return TRUE; case EM_MMA: *************** *** 943,948 **** --- 945,954 ---- case EM_X86_64: rtype = elf_x86_64_reloc_type (type); break; + + case EM_I51: + rtype = elf_i51_reloc_type (type); + break; } if (rtype == NULL) *************** *** 1323,1328 **** --- 1329,1335 ---- case EM_HUANY: return "Harvard Universitys's machine-independent object format"; case EM_PRISM: return "SiTera Prism"; case EM_X86_64: return "Advanced Micro Devices X86-64"; + case EM_I51: return "MCS-51 8-bit microcontroller"; default: sprintf (buff, _(": %x"), e_machine); return buff; diff -crB binutils-2.11.2/config.sub binutils-2.11.2.i51/config.sub *** binutils-2.11.2/config.sub Thu Mar 22 12:12:23 2001 --- binutils-2.11.2.i51/config.sub Wed Dec 26 16:20:51 2001 *************** *** 233,239 **** | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ ! | pj | pjl | h8500) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) --- 233,239 ---- | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ ! | pj | pjl | h8500 | i51) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) diff -crB binutils-2.11.2/gas/Makefile.am binutils-2.11.2.i51/gas/Makefile.am *** binutils-2.11.2/gas/Makefile.am Mon Jun 11 12:04:36 2001 --- binutils-2.11.2.i51/gas/Makefile.am Wed Dec 26 16:20:51 2001 *************** *** 49,54 **** --- 49,55 ---- h8300 \ h8500 \ hppa \ + i51 \ ia64 \ i370 \ i386 \ *************** *** 230,235 **** --- 231,237 ---- config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-i51.c \ config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ *************** *** 270,275 **** --- 272,278 ---- config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-i51.h \ config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ *************** *** 1031,1036 **** --- 1034,1046 ---- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ dwarf2dbg.h + DEPTC_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i51.h + DEPTC_i51_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 subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i51.h DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h *************** *** 1380,1385 **** --- 1390,1402 ---- $(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)/aout/aout64.h + DEPOBJ_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h + DEPOBJ_i51_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-i51.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ $(INCDIR)/obstack.h subsegs.h *************** *** 1678,1683 **** --- 1695,1705 ---- $(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 + DEP_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + DEP_i51_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-i51.h DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \ diff -crB binutils-2.11.2/gas/Makefile.in binutils-2.11.2.i51/gas/Makefile.in *** binutils-2.11.2/gas/Makefile.in Mon Jun 11 12:04:37 2001 --- binutils-2.11.2.i51/gas/Makefile.in Wed Dec 26 16:20:51 2001 *************** *** 160,165 **** --- 160,166 ---- h8300 \ h8500 \ hppa \ + i51 \ ia64 \ i370 \ i386 \ *************** *** 347,352 **** --- 348,354 ---- config/tc-h8300.c \ config/tc-h8500.c \ config/tc-hppa.c \ + config/tc-i51.c \ config/tc-ia64.c \ config/tc-i370.c \ config/tc-i386.c \ *************** *** 388,393 **** --- 390,396 ---- config/tc-h8300.h \ config/tc-h8500.h \ config/tc-hppa.h \ + config/tc-i51 \ config/tc-ia64.h \ config/tc-i370.h \ config/tc-i386.h \ *************** *** 766,771 **** --- 769,783 ---- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \ dwarf2dbg.h + DEPTC_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i51.h + + DEPTC_i51_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-i51.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/opcode/i51.h + DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h *************** *** 1208,1213 **** --- 1220,1234 ---- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + DEPOBJ_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ + $(INCDIR)/obstack.h subsegs.h + + DEPOBJ_i51_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-i51.h subsegs.h \ + $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h + DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \ $(INCDIR)/obstack.h subsegs.h *************** *** 1598,1603 **** --- 1619,1631 ---- $(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 + + DEP_i51_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i51.h \ + $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h + + DEP_i51_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-i51.h DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h diff -crB binutils-2.11.2/gas/config/obj-elf.c binutils-2.11.2.i51/gas/config/obj-elf.c *** binutils-2.11.2/gas/config/obj-elf.c Thu Jun 7 05:15:26 2001 --- binutils-2.11.2.i51/gas/config/obj-elf.c Wed Dec 26 16:20:51 2001 *************** *** 50,55 **** --- 50,59 ---- #include "elf/i370.h" #endif + #ifdef TC_I51 + #include "elf/i51.h" + #endif + static bfd_vma elf_s_get_size PARAMS ((symbolS *)); static void elf_s_set_size PARAMS ((symbolS *, bfd_vma)); static bfd_vma elf_s_get_align PARAMS ((symbolS *)); diff -crB binutils-2.11.2/gas/configure binutils-2.11.2.i51/gas/configure *** binutils-2.11.2/gas/configure Mon Jun 11 12:04:38 2001 --- binutils-2.11.2.i51/gas/configure Wed Dec 26 16:20:51 2001 *************** *** 2349,2354 **** --- 2349,2356 ---- h8500-*-rtems*) fmt=coff ;; h8500-*-coff) fmt=coff ;; + i51-*-*) fmt=elf bfd_gas=yes ;; + i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; diff -crB binutils-2.11.2/gas/configure.in binutils-2.11.2.i51/gas/configure.in *** binutils-2.11.2/gas/configure.in Mon Jun 11 12:04:44 2001 --- binutils-2.11.2.i51/gas/configure.in Wed Dec 26 16:20:51 2001 *************** *** 233,238 **** --- 233,240 ---- h8500-*-rtems*) fmt=coff ;; h8500-*-coff) fmt=coff ;; + i51-*-*) fmt=elf bfd_gas=yes ;; + i370-*-elf* | i370-*-linux*) fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; diff -crB binutils-2.11.2/include/dis-asm.h binutils-2.11.2.i51/include/dis-asm.h *** binutils-2.11.2/include/dis-asm.h Thu Jun 7 05:21:38 2001 --- binutils-2.11.2.i51/include/dis-asm.h Wed Dec 26 16:20:51 2001 *************** *** 224,229 **** --- 224,230 ---- extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_avr PARAMS ((bfd_vma, disassemble_info*)); + extern int print_insn_i51 PARAMS ((bfd_vma, disassemble_info*)); extern void print_arm_disassembler_options PARAMS ((FILE *)); extern void parse_arm_disassembler_option PARAMS ((char *)); diff -crB binutils-2.11.2/include/elf/common.h binutils-2.11.2.i51/include/elf/common.h *** binutils-2.11.2/include/elf/common.h Mon Jun 11 12:05:05 2001 --- binutils-2.11.2.i51/include/elf/common.h Wed Dec 26 16:20:51 2001 *************** *** 216,221 **** --- 216,224 ---- Written in the absense of an ABI. */ #define EM_AVR 0x1057 + /* MCS-51 magic number - no EABI available. */ + #define EM_I51 0x7262 + /* See the above comment before you add a new EM_* value here. */ /* Values for e_version. */ diff -crB binutils-2.11.2/ld/Makefile.am binutils-2.11.2.i51/ld/Makefile.am *** binutils-2.11.2/ld/Makefile.am Mon Jun 11 12:05:07 2001 --- binutils-2.11.2.i51/ld/Makefile.am Wed Dec 26 16:20:51 2001 *************** *** 154,159 **** --- 154,160 ---- eelf_i386.o \ eelf_i386_be.o \ eelf_i386_chaos.o \ + eelf_i51.o \ egld960.o \ egld960coff.o \ eh8300.o \ *************** *** 602,607 **** --- 603,610 ---- ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)" + eelf32_i51.c: $(srcdir)/emulparams/elf32_i51.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32i51.sc ${GEN_DEPENDS} elnk960.c: $(srcdir)/emulparams/lnk960.sh \ $(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS} ${GENSCRIPTS} lnk960 "$(tdir_lnk960)" diff -crB binutils-2.11.2/ld/Makefile.in binutils-2.11.2.i51/ld/Makefile.in *** binutils-2.11.2/ld/Makefile.in Mon Jun 11 12:05:07 2001 --- binutils-2.11.2.i51/ld/Makefile.in Wed Dec 26 16:20:51 2001 *************** *** 262,267 **** --- 262,268 ---- eelf_i386.o \ eelf_i386_be.o \ eelf_i386_chaos.o \ + eelf_i51.o \ egld960.o \ egld960coff.o \ eh8300.o \ *************** *** 1143,1148 **** --- 1144,1152 ---- eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)" + eelf32_i51.c: $(srcdir)/emulparams/elf32_i51.sh \ + $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32i51.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf32_i51 "$(tdir_elf32_i51)" eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf32_i960 "$(tdir_elf32_i960)" diff -crB binutils-2.11.2/ld/configure.tgt binutils-2.11.2.i51/ld/configure.tgt *** binutils-2.11.2/ld/configure.tgt Mon Jun 11 12:05:08 2001 --- binutils-2.11.2.i51/ld/configure.tgt Wed Dec 26 16:20:51 2001 *************** *** 136,141 **** --- 136,142 ---- targ_extra_emuls=i386linux tdir_i386linux=${targ_alias}aout ;; + i51-*-*) targ_emul=elf32_i51 ;; x86_64-*-linux-gnu*) targ_emul=elf_x86_64 targ_extra_emuls="elf_i386 i386linux" tdir_i386linux=${targ_alias}aout diff -crB binutils-2.11.2/ld/ldlang.c binutils-2.11.2.i51/ld/ldlang.c *** binutils-2.11.2/ld/ldlang.c Fri Jun 8 04:01:12 2001 --- binutils-2.11.2.i51/ld/ldlang.c Wed Dec 26 16:20:51 2001 *************** *** 3560,3573 **** section = h->u.c.p->section; ! /* Increase the size of the section. */ ! section->_cooked_size = ALIGN_N ((section->_cooked_size + opb - 1) / opb, ! (bfd_size_type) (1 << power_of_two)) * opb; ! ! /* Adjust the alignment if necessary. */ ! if (power_of_two > section->alignment_power) ! section->alignment_power = power_of_two; /* Change the symbol from common to defined. */ h->type = bfd_link_hash_defined; h->u.def.section = section; --- 3560,3575 ---- section = h->u.c.p->section; ! if (ldfile_output_architecture != bfd_arch_i51 ) ! { ! /* Increase the size of the section. */ ! section->_cooked_size = ALIGN_N ((section->_cooked_size + opb - 1) / opb, ! (bfd_size_type) (1 << power_of_two)) * opb; + /* Adjust the alignment if necessary. */ + if (power_of_two > section->alignment_power) + section->alignment_power = power_of_two; + } /* Change the symbol from common to defined. */ h->type = bfd_link_hash_defined; h->u.def.section = section; diff -crB binutils-2.11.2/opcodes/Makefile.am binutils-2.11.2.i51/opcodes/Makefile.am *** binutils-2.11.2/opcodes/Makefile.am Mon Jun 11 12:05:16 2001 --- binutils-2.11.2.i51/opcodes/Makefile.am Wed Dec 26 16:20:51 2001 *************** *** 65,70 **** --- 65,71 ---- i370-dis.c \ i370-opc.c \ i386-dis.c \ + i51-dis.c \ i860-dis.c \ i960-dis.c \ ia64-dis.c \ *************** *** 145,150 **** --- 146,152 ---- i386-dis.lo \ i370-dis.lo \ i370-opc.lo \ + i51-dis.lo \ i860-dis.lo \ i960-dis.lo \ ia64-dis.lo \ *************** *** 398,403 **** --- 400,407 ---- $(INCDIR)/opcode/i370.h i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h sysdep.h config.h opintl.h + i51-dis.lo: i51-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/dis-asm.h $(BFD_H) opintl.h $(INCDIR)/opcode/i51.h i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i860.h i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ diff -crB binutils-2.11.2/opcodes/Makefile.in binutils-2.11.2.i51/opcodes/Makefile.in *** binutils-2.11.2/opcodes/Makefile.in Mon Jun 11 12:05:16 2001 --- binutils-2.11.2.i51/opcodes/Makefile.in Wed Dec 26 16:20:51 2001 *************** *** 176,181 **** --- 176,182 ---- i370-dis.c \ i370-opc.c \ i386-dis.c \ + i51-dis.c \ i860-dis.c \ i960-dis.c \ ia64-dis.c \ *************** *** 257,262 **** --- 258,264 ---- i386-dis.lo \ i370-dis.lo \ i370-opc.lo \ + i51-dis.lo \ i860-dis.lo \ i960-dis.lo \ ia64-dis.lo \ *************** *** 909,914 **** --- 911,918 ---- $(INCDIR)/opcode/i370.h i386-dis.lo: i386-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h sysdep.h config.h opintl.h + i51-dis.lo: i51-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/dis-asm.h $(BFD_H) opintl.h $(INCDIR)/opcode/i51.h i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i860.h i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \ diff -crB binutils-2.11.2/opcodes/configure binutils-2.11.2.i51/opcodes/configure *** binutils-2.11.2/opcodes/configure Mon Jun 11 12:05:16 2001 --- binutils-2.11.2.i51/opcodes/configure Wed Dec 26 16:20:51 2001 *************** *** 4507,4512 **** --- 4507,4513 ---- bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; bfd_i386_arch) ta="$ta i386-dis.lo" ;; + bfd_i51_arch) ta="$ta i51-dis.lo" ;; bfd_i860_arch) ta="$ta i860-dis.lo" ;; bfd_i960_arch) ta="$ta i960-dis.lo" ;; bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;; *************** *** 4540,4545 **** --- 4541,4547 ---- bfd_w65_arch) ta="$ta w65-dis.lo" ;; bfd_we32k_arch) ;; bfd_z8k_arch) ta="$ta z8k-dis.lo" ;; + bfd_i51_arch) ;; "") ;; *) { echo "configure: error: *** unknown target architecture $arch" 1>&2; exit 1; } ;; diff -crB binutils-2.11.2/opcodes/configure.in binutils-2.11.2.i51/opcodes/configure.in *** binutils-2.11.2/opcodes/configure.in Mon Jun 11 12:05:17 2001 --- binutils-2.11.2.i51/opcodes/configure.in Wed Dec 26 16:20:51 2001 *************** *** 183,188 **** --- 183,189 ---- bfd_hppa_arch) ta="$ta hppa-dis.lo" ;; bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;; bfd_i386_arch) ta="$ta i386-dis.lo" ;; + bfd_i51_arch) ta="$ta i51-dis.lo" ;; bfd_i860_arch) ta="$ta i860-dis.lo" ;; bfd_i960_arch) ta="$ta i960-dis.lo" ;; bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;; diff -crB binutils-2.11.2/opcodes/disassemble.c binutils-2.11.2.i51/opcodes/disassemble.c *** binutils-2.11.2/opcodes/disassemble.c Thu Jun 7 05:18:34 2001 --- binutils-2.11.2.i51/opcodes/disassemble.c Wed Dec 26 16:20:51 2001 *************** *** 33,38 **** --- 33,39 ---- #define ARCH_hppa #define ARCH_i370 #define ARCH_i386 + #define ARCH_i51 #define ARCH_i860 #define ARCH_i960 #define ARCH_ia64 *************** *** 151,156 **** --- 152,162 ---- disassemble = print_insn_i386_intel; else disassemble = print_insn_i386_att; break; #endif + #ifdef ARCH_i51 + case bfd_arch_i51: + disassemble = print_insn_i51; + break; + #endif #ifdef ARCH_i860