/* BFD library support routines for the Hitachi-SH architecture.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
#include "sysdep.h"
#include "libbfd.h"
-
-static boolean
+static boolean
scan_mach (info, string)
const struct bfd_arch_info *info;
const char *string;
return false;
}
-
#if 0
/* This routine is provided two arch_infos and returns whether
they'd be compatible */
}
#endif
-#define SH_NEXT &arch_info_struct[0]
-#define SH3_NEXT &arch_info_struct[1]
-#define SH3E_NEXT NULL
+#define SH_NEXT &arch_info_struct[0]
+#define SH2_NEXT &arch_info_struct[1]
+#define SH_DSP_NEXT &arch_info_struct[2]
+#define SH3_NEXT &arch_info_struct[3]
+#define SH3_DSP_NEXT &arch_info_struct[4]
+#define SH3E_NEXT &arch_info_struct[5]
+#define SH4_NEXT NULL
-static const bfd_arch_info_type arch_info_struct[] =
+static const 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_sh,
+ bfd_mach_sh2,
+ "sh", /* arch_name */
+ "sh2", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH2_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh_dsp,
+ "sh", /* arch_name */
+ "sh-dsp", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH_DSP_NEXT
+ },
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
scan_mach,
SH3_NEXT
},
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh3_dsp,
+ "sh", /* arch_name */
+ "sh3-dsp", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH3_DSP_NEXT
+ },
{
32, /* 32 bits in a word */
32, /* 32 bits in an address */
scan_mach,
SH3E_NEXT
},
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4,
+ "sh", /* arch_name */
+ "sh4", /* printable name */
+ 1,
+ false, /* not the default */
+ bfd_default_compatible,
+ scan_mach,
+ SH4_NEXT
+ },
};
const bfd_arch_info_type bfd_sh_arch =