aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-10-21 15:49:45 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-10-21 15:49:45 +0000
commitaf9ba62190ff90757b9f66469de3a1a64760704e (patch)
tree975cb5dc38a14e5323e6a3c2abdc4a2fd144f957
parenta747ee4d519b86fe36dad8dd629e7e9945fd108a (diff)
downloadgdb-af9ba62190ff90757b9f66469de3a1a64760704e.zip
gdb-af9ba62190ff90757b9f66469de3a1a64760704e.tar.gz
gdb-af9ba62190ff90757b9f66469de3a1a64760704e.tar.bz2
* archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
bfd_mach_sh4a_nofpu): New machine types. * bfd-in2.h: Rebuilt. * cpu-sh.c (compatible): Remove unused function. (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New. (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu. * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/archures.c4
-rw-r--r--bfd/bfd-in2.h4
-rw-r--r--bfd/cpu-sh.c75
-rw-r--r--bfd/elf32-sh.c12
5 files changed, 91 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 119a8c0..2a002c1 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
+ Michael Snyder <msnyder@redhat.com>
+
+ * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
+ bfd_mach_sh4a_nofpu): New machine types.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (compatible): Remove unused function.
+ (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
+ (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
+
2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
diff --git a/bfd/archures.c b/bfd/archures.c
index b71434e..064fa55 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -229,6 +229,10 @@ DESCRIPTION
.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
.#define bfd_mach_sh4 0x40
+.#define bfd_mach_sh4_nofpu 0x41
+.#define bfd_mach_sh4a 0x4a
+.#define bfd_mach_sh4a_nofpu 0x4b
+.#define bfd_mach_sh4al_dsp 0x4d
.#define bfd_mach_sh5 0x50
. bfd_arch_alpha, {* Dec Alpha *}
.#define bfd_mach_alpha_ev4 0x10
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index b58d6ca..fb2064f 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1664,6 +1664,10 @@ enum bfd_architecture
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
+#define bfd_mach_sh4_nofpu 0x41
+#define bfd_mach_sh4a 0x4a
+#define bfd_mach_sh4a_nofpu 0x4b
+#define bfd_mach_sh4al_dsp 0x4d
#define bfd_mach_sh5 0x50
bfd_arch_alpha, /* Dec Alpha */
#define bfd_mach_alpha_ev4 0x10
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index e247cb8..2f33240 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -23,21 +23,6 @@
#include "sysdep.h"
#include "libbfd.h"
-#if 0
-/* This routine is provided two arch_infos and returns whether
- they'd be compatible. */
-
-static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
-{
- if (a->arch != b->arch || a->mach != b->mach)
- return NULL;
- return a;
-}
-#endif
-
#define SH_NEXT &arch_info_struct[0]
#define SH2_NEXT &arch_info_struct[1]
#define SH2E_NEXT &arch_info_struct[2]
@@ -46,6 +31,10 @@ compatible (a,b)
#define SH3_DSP_NEXT &arch_info_struct[5]
#define SH3E_NEXT &arch_info_struct[6]
#define SH4_NEXT &arch_info_struct[7]
+#define SH4A_NEXT &arch_info_struct[8]
+#define SH4AL_DSP_NEXT &arch_info_struct[9]
+#define SH4_NOFPU_NEXT &arch_info_struct[10]
+#define SH4A_NOFPU_NEXT &arch_info_struct[11]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
@@ -149,6 +138,62 @@ static const bfd_arch_info_type arch_info_struct[] =
SH4_NEXT
},
{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4a,
+ "sh", /* arch_name */
+ "sh4a", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4A_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4al_dsp,
+ "sh", /* arch_name */
+ "sh4al-dsp", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4AL_DSP_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_nofpu,
+ "sh", /* arch_name */
+ "sh4-nofpu", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4_NOFPU_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4a_nofpu,
+ "sh", /* arch_name */
+ "sh4a-nofpu", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4A_NOFPU_NEXT
+ },
+ {
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 836b34b..134356d 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -6863,6 +6863,18 @@ sh_elf_set_mach_from_flags (bfd *abfd)
case EF_SH4:
bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4);
break;
+ case EF_SH4_NOFPU:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4_nofpu);
+ break;
+ case EF_SH4A:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a);
+ break;
+ case EF_SH4A_NOFPU:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4a_nofpu);
+ break;
+ case EF_SH4AL_DSP:
+ bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh4al_dsp);
+ break;
default:
return FALSE;
}