daily update
[deliverable/binutils-gdb.git] / bfd / cpu-sparc.c
index 583a75d261328bf91089ae54ab54868b93cfa181..dbc83bad534a5113670c506b748eda1bba479f32 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD support for the SPARC architecture.
-   Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
+   Copyright 1992, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
 
 This file is part of BFD, the Binary File Descriptor library.
 
@@ -21,23 +21,52 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "sysdep.h"
 #include "libbfd.h"
 
+/* Don't mix 32 bit and 64 bit files.  */
+
+static const bfd_arch_info_type *sparc_compatible
+  PARAMS ((const bfd_arch_info_type *, const bfd_arch_info_type *));
+
+static const bfd_arch_info_type *
+sparc_compatible (a, b)
+     const bfd_arch_info_type *a;
+     const bfd_arch_info_type *b;
+{
+  if (a->bits_per_word != b->bits_per_word)
+    return NULL;
+
+  return bfd_default_compatible (a, b);
+}
+
 static const bfd_arch_info_type arch_info_struct[] =
 {
   {
-    64,        /* bits in a word */
-    64,        /* bits in an address */
+    32,        /* bits in a word */
+    32,        /* bits in an address */
     8, /* bits in a byte */
     bfd_arch_sparc,
-    bfd_mach_sparc_v9,
+    bfd_mach_sparc_sparclet,
     "sparc",
-    "sparc:v9",
+    "sparc:sparclet",
     3,
     false,
-    bfd_default_compatible, 
+    sparc_compatible,
     bfd_default_scan,
     &arch_info_struct[1],
   },
-  /* start-sanitize-v8plus */
+  {
+    32,        /* bits in a word */
+    32,        /* bits in an address */
+    8, /* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_sparclite,
+    "sparc",
+    "sparc:sparclite",
+    3,
+    false,
+    sparc_compatible,
+    bfd_default_scan,
+    &arch_info_struct[2],
+  },
   {
     32,        /* bits in a word */
     32,        /* bits in an address */
@@ -48,9 +77,9 @@ static const bfd_arch_info_type arch_info_struct[] =
     "sparc:v8plus",
     3,
     false,
-    bfd_default_compatible, 
+    sparc_compatible,
     bfd_default_scan,
-    &arch_info_struct[2],
+    &arch_info_struct[3],
   },
   {
     32,        /* bits in a word */
@@ -62,11 +91,38 @@ static const bfd_arch_info_type arch_info_struct[] =
     "sparc:v8plusa",
     3,
     false,
-    bfd_default_compatible, 
+    sparc_compatible,
     bfd_default_scan,
-    &arch_info_struct[3],
+    &arch_info_struct[4],
+  },
+  {
+    32,        /* bits in a word */
+    32,        /* bits in an address */
+    8, /* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_sparclite_le,
+    "sparc",
+    "sparc:sparclite_le",
+    3,
+    false,
+    sparc_compatible,
+    bfd_default_scan,
+    &arch_info_struct[5],
+  },
+  {
+    64,        /* bits in a word */
+    64,        /* bits in an address */
+    8, /* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9,
+    "sparc",
+    "sparc:v9",
+    3,
+    false,
+    sparc_compatible,
+    bfd_default_scan,
+    &arch_info_struct[6],
   },
-  /* end-sanitize-v8plus */
   {
     64,        /* bits in a word */
     64,        /* bits in an address */
@@ -77,7 +133,35 @@ static const bfd_arch_info_type arch_info_struct[] =
     "sparc:v9a",
     3,
     false,
-    bfd_default_compatible, 
+    sparc_compatible,
+    bfd_default_scan,
+    &arch_info_struct[7],
+  },
+  {
+    32,        /* bits in a word */
+    32,        /* bits in an address */
+    8, /* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v8plusb,
+    "sparc",
+    "sparc:v8plusb",
+    3,
+    false,
+    sparc_compatible,
+    bfd_default_scan,
+    &arch_info_struct[8],
+  },
+  {
+    64,        /* bits in a word */
+    64,        /* bits in an address */
+    8, /* bits in a byte */
+    bfd_arch_sparc,
+    bfd_mach_sparc_v9b,
+    "sparc",
+    "sparc:v9b",
+    3,
+    false,
+    sparc_compatible,
     bfd_default_scan,
     0,
   }
@@ -94,7 +178,7 @@ const bfd_arch_info_type bfd_sparc_arch =
     "sparc",
     3,
     true, /* the default */
-    bfd_default_compatible, 
+    sparc_compatible,
     bfd_default_scan,
     &arch_info_struct[0],
   };
This page took 0.024562 seconds and 4 git commands to generate.