* archures.c (bfd_mach_mips*): Add definitions for various MIPS
authorJeff Law <law@redhat.com>
Wed, 28 Jan 1998 04:45:04 +0000 (04:45 +0000)
committerJeff Law <law@redhat.com>
Wed, 28 Jan 1998 04:45:04 +0000 (04:45 +0000)
        processors.
        * cpu-mips.c (arch_info_struct): Add mips variants.
        * bfd-in2.h: Rebuilt.

bfd/.Sanitize
bfd/ChangeLog
bfd/archures.c
bfd/bfd-in2.h
bfd/cpu-mips.c

index 345328d8af269d2a2f1c6d4c03ea6905029f2fe8..fb02228075ee1acd777344a521d4eaee32e72130 100644 (file)
@@ -354,7 +354,7 @@ else
        done
 fi
 
-r5900_files="ChangeLog config.bfd"
+r5900_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-mips.c"
 if ( echo $* | grep keep\-r5900 > /dev/null ) ; then
        for i in $r5900_files ; do
                if test ! -d $i && (grep sanitize-r5900 $i > /dev/null) ; then
@@ -382,6 +382,62 @@ else
        done
 fi
 
+tx19_files="archures.c bfd-in2.h cpu-mips.c"
+if ( echo $* | grep keep\-tx19 > /dev/null ) ; then
+       for i in $tx19_files ; do
+               if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping tx19 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $tx19_files ; do
+               if test ! -d $i && (grep sanitize-tx19 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"tx19\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-tx19/,/end-\sanitize\-tx19/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
+tx49_files="archures.c bfd-in2.h cpu-mips.c"
+if ( echo $* | grep keep\-tx49 > /dev/null ) ; then
+       for i in $tx49_files ; do
+               if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping tx49 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $tx49_files ; do
+               if test ! -d $i && (grep sanitize-tx49 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"tx49\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-tx49/,/end-\sanitize\-tx49/d' < $i > new
+                       if [ -n "${safe}" -a ! -f .Recover/$i ] ; then
+                               if [ -n "${verbose}" ] ; then
+                                       echo Caching $i in .Recover...
+                               fi
+                               mv $i .Recover
+                       fi
+                       mv new $i
+               fi
+       done
+fi
+
 sh4_files="ChangeLog config.bfd archures.c bfd-in2.h cpu-sh.c"
 if ( echo $* | grep keep\-sh4 > /dev/null ) ; then
        for i in $sh4_files ; do
index e1bbcae5caf600a60fed0585169edb20c8f6cc33..516bcfff58e40a0490c347f7ca28d9843f198807 100644 (file)
@@ -1,3 +1,10 @@
+Tue Jan 27 21:45:15 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * archures.c (bfd_mach_mips*): Add definitions for various MIPS
+       processors.
+       * cpu-mips.c (arch_info_struct): Add mips variants.
+       * bfd-in2.h: Rebuilt.
+
 Tue Jan 27 15:06:04 1998  Nick Clifton  <nickc@cygnus.com>
 
        * coff-arm.c (coff_arm_relocate_section): Fix for PR14752 by
index 59e196142b598097f0dbf536d4b7bee942aaa69e..f508cfd775252f1ca7ed596844a5a66f8fecbea0 100644 (file)
@@ -102,16 +102,33 @@ DESCRIPTION
 .{* Nonzero if MACH has the v9 instruction set.  *}
 .#define bfd_mach_sparc_v9_p(mach) \
 .  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
-.  bfd_arch_mips,      {* MIPS Rxxxx *}
+. {* start-sanitize-tx19 *}
+.#define bfd_mach_mips1900             1900
+. {* end-sanitize-tx19 *}
 .#define bfd_mach_mips3000             3000
-.#define bfd_mach_mips6000             6000
+.#define bfd_mach_mips3900             3900
 .#define bfd_mach_mips4000             4000
-.#define bfd_mach_mips8000             8000
-.#define bfd_mach_mips16                 16
+.#define bfd_mach_mips4010             4010
+.#define bfd_mach_mips4100             4100
+.#define bfd_mach_mips4300             4300
+.#define bfd_mach_mips4400             4400
+.#define bfd_mach_mips4600             4600
+.#define bfd_mach_mips4650             4650
+. {* start-sanitize-tx49 *}
+.#define bfd_mach_mips4900             4900
+. {* end-sanitize-tx49 *}
+.#define bfd_mach_mips5000             5000
 . {* start-sanitize-vr5400 *}
-.#define bfd_mach_vr5400               5400
-.#define bfd_mach_vr5000               5000
+.#define bfd_mach_mips5400             5400
 . {* end-sanitize-vr5400 *}
+. {* start-sanitize-r5900 *}
+.#define bfd_mach_mips5900             5900
+. {* end-sanitize-r5900 *}
+.#define bfd_mach_mips6000             6000
+.#define bfd_mach_mips8000             8000
+.#define bfd_mach_mips10000            10000
+.#define bfd_mach_mips16               16
+.  bfd_arch_mips,      {* MIPS Rxxxx *}
 .  bfd_arch_i386,      {* Intel 386 *}
 .#define bfd_mach_i386_i386 0
 .#define bfd_mach_i386_i8086 1
index 89fcb1fdbaa1e9a8dd6457680ba65217982a7d3e..32e6eb6bbc66adbccd9f80b4313fffd5d97ecf61 100644 (file)
@@ -1194,16 +1194,33 @@ enum bfd_architecture
  /* Nonzero if MACH has the v9 instruction set.  */
 #define bfd_mach_sparc_v9_p(mach) \
   ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
-  bfd_arch_mips,       /* MIPS Rxxxx */
+  /* start-sanitize-tx19 */
+#define bfd_mach_mips1900              1900
+  /* end-sanitize-tx19 */
 #define bfd_mach_mips3000              3000
-#define bfd_mach_mips6000              6000
+#define bfd_mach_mips3900              3900
 #define bfd_mach_mips4000              4000
-#define bfd_mach_mips8000              8000
-#define bfd_mach_mips16                  16
+#define bfd_mach_mips4010              4010
+#define bfd_mach_mips4100              4100
+#define bfd_mach_mips4300              4300
+#define bfd_mach_mips4400              4400
+#define bfd_mach_mips4600              4600
+#define bfd_mach_mips4650              4650
+  /* start-sanitize-tx49 */
+#define bfd_mach_mips4900              4900
+  /* end-sanitize-tx49 */
+#define bfd_mach_mips5000              5000
   /* start-sanitize-vr5400 */
-#define bfd_mach_vr5400                5400
-#define bfd_mach_vr5000                5000
+#define bfd_mach_mips5400              5400
   /* end-sanitize-vr5400 */
+  /* start-sanitize-r5900 */
+#define bfd_mach_mips5900              5900
+  /* end-sanitize-r5900 */
+#define bfd_mach_mips6000              6000
+#define bfd_mach_mips8000              8000
+#define bfd_mach_mips10000             10000
+#define bfd_mach_mips16                16
+  bfd_arch_mips,       /* MIPS Rxxxx */
   bfd_arch_i386,       /* Intel 386 */
 #define bfd_mach_i386_i386 0
 #define bfd_mach_i386_i8086 1
index 10c72cf353932979b5759de9815cb90f8022e49f..1ece3d41c9f9ead074bf0eaa94e918cc6ebc2212 100644 (file)
@@ -1,5 +1,5 @@
 /* bfd back-end for mips support
-   Copyright (C) 1990, 91, 92, 93, 94 Free Software Foundation, Inc.
+   Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
    Written by Steve Chamberlain of Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -22,71 +22,75 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 
-static bfd_arch_info_type arch_info_struct[] = 
-{
-  {
-    32,        /* 32 bits in a word */
-    32,        /* 32 bits in an address */
-    8, /* 8 bits in a byte */
-    bfd_arch_mips,
-    3000,
-    "mips",
-    "mips:3000",
-    3,
-    true,
-    bfd_default_compatible, 
-    bfd_default_scan,
-    0,
-  },
-  {
-    32,        /* 32 bits in a word */
-    32,        /* 32 bits in an address */
-    8, /* 8 bits in a byte */
-    bfd_arch_mips,
-    6000,
-    "mips",
-    "mips:6000",
-    3,
-    false,
-    bfd_default_compatible, 
-    bfd_default_scan,
-    0,
-  },
-  {
-    64, /* 64 bits in a word */
-    64, /* 64 bits in an address */
-    8,  /* 8 bits in a byte */
-    bfd_arch_mips,
-    4000,
-    "mips",
-    "mips:4000",
-    3,
-    false,
-    bfd_default_compatible, 
-    bfd_default_scan ,
-    0,
-  },
-  {
-    64, /* 64 bits in a word */
-    64, /* 64 bits in an address */
-    8,  /* 8 bits in a byte */
-    bfd_arch_mips,
-    8000,
-    "mips",
-    "mips:8000",
-    3,
-    false,
-    bfd_default_compatible, 
-    bfd_default_scan ,
-    0,
+#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT)          \
+  {                                                    \
+    BITS_WORD, /*  bits in a word */                   \
+    BITS_ADDR, /* bits in an address */                        \
+    8, /* 8 bits in a byte */                          \
+    bfd_arch_mips,                                     \
+    NUMBER,                                            \
+    "mips",                                            \
+    PRINT,                                             \
+    3,                                                 \
+    DEFAULT,                                           \
+    bfd_default_compatible,                            \
+    bfd_default_scan,                                  \
+    NEXT,                                              \
   }
-};
 
-void
-bfd_mips_arch ()
+
+#define A 0
+#define B 0
+#define C 0
+#define D 0
+
+static const bfd_arch_info_type arch_info_struct[] = 
 {
-  register unsigned int i;
+  N (32, 32, bfd_mach_mips3000, "mips:3000", false, &arch_info_struct[1]),
+  N (32, 32, bfd_mach_mips3900, "mips:3900", false, &arch_info_struct[2]),
+  N (64, 64, bfd_mach_mips4000, "mips:4000", false, &arch_info_struct[3]),
+  N (64, 64, bfd_mach_mips4010, "mips:4010", false, &arch_info_struct[4]),
+  N (64, 64, bfd_mach_mips4100, "mips:4100", false, &arch_info_struct[5]),
+  N (64, 64, bfd_mach_mips4300, "mips:4300", false, &arch_info_struct[6]),
+  N (64, 64, bfd_mach_mips4400, "mips:4400", false, &arch_info_struct[7]),
+  N (64, 64, bfd_mach_mips4600, "mips:4600", false, &arch_info_struct[8]),
+  N (64, 64, bfd_mach_mips4650, "mips:4650", false, &arch_info_struct[9]),
+  N (64, 64, bfd_mach_mips5000, "mips:5000", false, &arch_info_struct[10]),
+  N (32, 32, bfd_mach_mips6000, "mips:6000", false, &arch_info_struct[11]),
+  N (64, 64, bfd_mach_mips8000, "mips:8000", false, &arch_info_struct[12]),
+  N (64, 64, bfd_mach_mips10000, "mips:10000", false, &arch_info_struct[13]),
+
+  /* start-sanitize-tx19
+#undef A
+#define A 1
+  N (32, 32, bfd_mach_mips1900, "mips:1900", false, &arch_info_struct[13+A]),
+  /* end-sanitize-tx19 */
+  /* start-sanitize-tx49 */
+#undef B
+#define B 1
+  N (64, 64, bfd_mach_mips4900, "mips:4900", false, &arch_info_struct[13+A+B]),
+  /* end-sanitize-tx49 */
+  /* start-sanitize-vr5400 */
+#undef C
+#define C 1
+  N (64, 64, bfd_mach_mips5400, "mips:5400", false, &arch_info_struct[13+A+B+C]),
+  /* end-sanitize-vr5400 */
+  /* start-sanitize-r5900 */
+#undef D
+#define D 1
+  N (64, 64, bfd_mach_mips5900, "mips:5900", false, &arch_info_struct[13+A+B+C+D]),
+  /* end-sanitize-r5900 */
+  N (64, 64, bfd_mach_mips16,   "mips:16",   false, 0),
+};
+
+#undef A
+#undef B
+#undef C
+#undef D
+
+/* The default architecture is mips:3000, but with a machine number of
+   zero.  This lets the linker distinguish between a default setting
+   of mips, and an explicit setting of mips:3000.  */
 
-  for (i = 0; i < sizeof (arch_info_struct) / sizeof (*arch_info_struct); i++)
-    bfd_arch_linkin(&arch_info_struct[i]);
-}
+const bfd_arch_info_type bfd_mips_arch =
+N (32, 32, 0, "mips", true, &arch_info_struct[0]);