]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add sh3 et.al. to SH arch table.
authorAndrew Cagney <cagney@redhat.com>
Thu, 28 Aug 1997 10:01:33 +0000 (10:01 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 28 Aug 1997 10:01:33 +0000 (10:01 +0000)
Improve machine name parsing for v850 and SH.

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

index a6c4592b1443abee00a7337cdc2dcf020b6aabcd..7522881dfc0ec4cb5adf0cd775592edec1008f69 100644 (file)
@@ -449,6 +449,34 @@ else
        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
+               if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Keeping sh4 stuff in $i
+                       fi
+               fi
+       done
+else
+       for i in $sh4_files ; do
+               if test ! -d $i && (grep sanitize-sh4 $i > /dev/null) ; then
+                       if [ -n "${verbose}" ] ; then
+                               echo Removing traces of \"sh4\" from $i...
+                       fi
+                       cp $i new
+                       sed '/start\-sanitize\-sh4/,/end-\sanitize\-sh4/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
+
 tic80_files="ChangeLog Makefile.in Makefile.am archures.c bfd-in2.h config.bfd configure configure.in targets.c coffcode.h coffswap.h"
 if ( echo $* | grep keep\-tic80 > /dev/null ) ; then
        for i in $tic80_files ; do
index 7a960f030d2e9f7e7b6fe274688463e8ca67f570..279dd98beeb50db3379f75bcd5aa8151923cbb2e 100644 (file)
@@ -1,3 +1,16 @@
+Thu Aug 28 17:01:09 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * cpu-v850.c: Remove "plain" from v850 printable name.
+       (scan): Use strcasecmp.
+
+       * archures.c (bfd_mach_v850): Define.
+       
+       * cpu-sh.c (scan_mach): Compare with table instead of hardwired to
+       just sh/SH, use strcasecmp.
+       (arch_info_struct): Add entries for sh3 et.al.
+
+       * archures.c (bfd_mach_sh, ...): Define.
+
 Wed Aug 27 17:33:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * archures.c (bfd_archures_list): Always NULL terminate the list.
index 9e0cbd6d35da906ca7abba03a5869516a8081671..96954518d9897776638e4c8bd7093b587b3f2dc4 100644 (file)
@@ -130,6 +130,12 @@ DESCRIPTION
 .#define bfd_mach_z8002                2
 .  bfd_arch_h8500,     {* Hitachi H8/500 *}
 .  bfd_arch_sh,        {* Hitachi SH *}
+.#define bfd_mach_sh            0
+.#define bfd_mach_sh3        0x30
+.#define bfd_mach_sh3e       0x3e
+.  {* start-sanitize-sh4 *}
+.#define bfd_mach_sh4        0x40
+.  {* end-sanitize-sh4 *}
 .  bfd_arch_alpha,     {* Dec Alpha *}
 .  bfd_arch_arm,       {* Advanced Risc Machines ARM *}
 .#define bfd_mach_arm_2                1
@@ -145,8 +151,9 @@ DESCRIPTION
 . {* end-sanitize-tic80 *}
 . {* start-sanitize-v850 *}
 .  bfd_arch_v850,      {* NEC V850 *}
+.#define bfd_mach_v850          0
 . {* start-sanitize-v850e *}
-.#define bfd_mach_v850e        'E'
+.#define bfd_mach_v850e        'E'
 . {* end-sanitize-v850e *}
 . {* start-sanitize-v850eq *}
 .#define bfd_mach_v850eq       'Q'
index ddb54093034839509e7f40456dd2c655d1f2341a..d5532fdfc238958ec4335253b63fda9f3ab34b92 100644 (file)
@@ -1222,6 +1222,12 @@ enum bfd_architecture
 #define bfd_mach_z8002         2
   bfd_arch_h8500,      /* Hitachi H8/500 */
   bfd_arch_sh,         /* Hitachi SH */
+#define bfd_mach_sh            0
+#define bfd_mach_sh3        0x30
+#define bfd_mach_sh3e       0x3e
+   /* start-sanitize-sh4 */
+#define bfd_mach_sh4        0x40
+   /* end-sanitize-sh4 */
   bfd_arch_alpha,      /* Dec Alpha */
   bfd_arch_arm,        /* Advanced Risc Machines ARM */
 #define bfd_mach_arm_2         1
@@ -1237,8 +1243,9 @@ enum bfd_architecture
   /* end-sanitize-tic80 */
   /* start-sanitize-v850 */
   bfd_arch_v850,       /* NEC V850 */
+#define bfd_mach_v850          0
   /* start-sanitize-v850e */
-#define bfd_mach_v850e 'E'
+#define bfd_mach_v850e         'E'
   /* end-sanitize-v850e */
   /* start-sanitize-v850eq */
 #define bfd_mach_v850eq        'Q'
index aa083fde38b41d724779828ed5c37d7002e65ae5..d035bf3450b5fd49595c5ff919f708878ad14c00 100644 (file)
@@ -32,7 +32,7 @@ scan (info, string)
   enum bfd_architecture arch;
 
   /* First test for an exact match */
-  if (strcmp (string, info->printable_name) == 0)
+  if (strcasecmp (string, info->printable_name) == 0)
     return true;
 
   /* See how much of the supplied string matches with the
@@ -93,7 +93,7 @@ static const bfd_arch_info_type arch_info_struct[2] =
     8, /* 8 bits in a byte */
     bfd_arch_v850,
     bfd_mach_v850e,
-    "v850e",
+    "v850",
     "v850e",
     2,
     false,
@@ -109,7 +109,7 @@ static const bfd_arch_info_type arch_info_struct[2] =
     8, /* 8 bits in a byte */
     bfd_arch_v850,
     bfd_mach_v850eq,
-    "v850eq",
+    "v850",
     "v850eq",
     2,
     false,
@@ -126,9 +126,9 @@ const bfd_arch_info_type bfd_v850_arch =
     32, /* 32 bits in an address */
     8,  /* 8 bits in a byte */
     bfd_arch_v850,
-    0,  /* only 1 machine */
+    bfd_mach_v850,
+    "v850",
     "v850",
-    "plain v850",
     2,
     true, /* the default */
     bfd_default_compatible,