aboutsummaryrefslogtreecommitdiff
path: root/bfd/cpu-mips.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1998-01-28 04:45:04 +0000
committerJeff Law <law@redhat.com>1998-01-28 04:45:04 +0000
commit29410c45ae1c3f55ec6a3914bf5259ccc15493b2 (patch)
treeb55c0722d20c51b99685167d2949b509e60bb93e /bfd/cpu-mips.c
parent4411d96450537b3496fb899ab6603ed37944d916 (diff)
downloadgdb-29410c45ae1c3f55ec6a3914bf5259ccc15493b2.zip
gdb-29410c45ae1c3f55ec6a3914bf5259ccc15493b2.tar.gz
gdb-29410c45ae1c3f55ec6a3914bf5259ccc15493b2.tar.bz2
* archures.c (bfd_mach_mips*): Add definitions for various MIPS
processors. * cpu-mips.c (arch_info_struct): Add mips variants. * bfd-in2.h: Rebuilt.
Diffstat (limited to 'bfd/cpu-mips.c')
-rw-r--r--bfd/cpu-mips.c134
1 files changed, 69 insertions, 65 deletions
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index 10c72cf..1ece3d4 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -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]);