From: Andrew Cagney Date: Thu, 28 Aug 1997 10:01:33 +0000 (+0000) Subject: Add sh3 et.al. to SH arch table. X-Git-Tag: gdb-4_18~4928 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f40d28bfc07c793f413cf7523a1f93385f546d95;p=external%2Fbinutils.git Add sh3 et.al. to SH arch table. Improve machine name parsing for v850 and SH. --- diff --git a/bfd/.Sanitize b/bfd/.Sanitize index a6c4592..7522881 100644 --- a/bfd/.Sanitize +++ b/bfd/.Sanitize @@ -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 diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7a960f0..279dd98 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +Thu Aug 28 17:01:09 1997 Andrew Cagney + + * 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 * archures.c (bfd_archures_list): Always NULL terminate the list. diff --git a/bfd/archures.c b/bfd/archures.c index 9e0cbd6..9695451 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -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' diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index ddb5409..d5532fd 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -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' diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c index aa083fd..d035bf3 100644 --- a/bfd/cpu-v850.c +++ b/bfd/cpu-v850.c @@ -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,