aboutsummaryrefslogtreecommitdiff
path: root/bfd/cpu-v850.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-02 11:52:01 +0000
committerAlan Modra <amodra@gmail.com>2002-09-02 11:52:01 +0000
commit638524b534054974ce5d64b08463e3e61f0d1996 (patch)
treed1f6a63fe42bb0e9039b229ec7ba7d3796799369 /bfd/cpu-v850.c
parent250d94fd4b15ec8846f60f531fad5d504932d9fa (diff)
downloadgdb-638524b534054974ce5d64b08463e3e61f0d1996.zip
gdb-638524b534054974ce5d64b08463e3e61f0d1996.tar.gz
gdb-638524b534054974ce5d64b08463e3e61f0d1996.tar.bz2
* cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
(bfd_pj_arch): Use bfd_default_scan. * cpu-v850.c (scan): Remove. (N): Use bfd_default_scan. * cpu-z8k.c (scan_mach): Remove. (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is first. Use bfd_default_scan.
Diffstat (limited to 'bfd/cpu-v850.c')
-rw-r--r--bfd/cpu-v850.c60
1 files changed, 1 insertions, 59 deletions
diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c
index ce61caa..38333c8 100644
--- a/bfd/cpu-v850.c
+++ b/bfd/cpu-v850.c
@@ -22,67 +22,9 @@
#include "libbfd.h"
#include "safe-ctype.h"
-static boolean scan PARAMS ((const struct bfd_arch_info *, const char *));
-
-static boolean
-scan (info, string)
- const struct bfd_arch_info * info;
- const char * string;
-{
- const char *ptr_src;
- const char *ptr_tst;
- unsigned long number;
- enum bfd_architecture arch;
-
- /* First test for an exact match. */
- if (strcasecmp (string, info->printable_name) == 0)
- return true;
-
- /* See how much of the supplied string matches with the
- architecture, eg the string m68k:68020 would match the m68k entry
- up to the :, then we get left with the machine number. */
- for (ptr_src = string, ptr_tst = info->arch_name;
- *ptr_src && *ptr_tst;
- ptr_src++, ptr_tst++)
- if (*ptr_src != *ptr_tst)
- break;
-
- /* Chewed up as much of the architecture as will match;
- if there is a colon present skip it. */
- if (*ptr_src == ':')
- ptr_src ++;
-
- if (*ptr_src == 0)
- /* Nothing more, then only keep this one if it is
- the default machine for this architecture. */
- return info->the_default;
-
- number = 0;
- while (ISDIGIT (*ptr_src))
- {
- number = number * 10 + * ptr_src - '0';
- ptr_src ++;
- }
-
- switch (number)
- {
- case bfd_mach_v850e: arch = bfd_arch_v850; break;
- default:
- return false;
- }
-
- if (arch != info->arch)
- return false;
-
- if (number != info->mach)
- return false;
-
- return true;
-}
-
#define N(number, print, default, next) \
{ 32, 32, 8, bfd_arch_v850, number, "v850", print, 2, default, \
- bfd_default_compatible, scan, next }
+ bfd_default_compatible, bfd_default_scan, next }
#define NEXT NULL