summaryrefslogtreecommitdiff
path: root/bfd/elf32-m68k.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2007-04-23 07:51:33 +0000
committerNathan Sidwell <nathan@codesourcery.com>2007-04-23 07:51:33 +0000
commit2d4b8e4e007f173cdcdc113e9b9deebcb690f192 (patch)
tree0e0b396b30f291c328e5989d61e82375d18f0f95 /bfd/elf32-m68k.c
parentbf63b298ef270eeb20ae0792bc50e0bcd7063494 (diff)
downloadgdb-2d4b8e4e007f173cdcdc113e9b9deebcb690f192.tar.gz
gas/testsuite/
* gas/m68k/br-isaa.s: New. * gas/m68k/br-isaa.d: New. * gas/m68k/br-isab.s: New. * gas/m68k/br-isab.d: New. * gas/m68k/br-isac.s: New. * gas/m68k/br-isac.d: New. * gas/m68k/all.exp: Adjust. gas/ * config/tc-m68k.c (mcf54455_ctrl): New. (HAVE_LONG_DISP, HAVE_LONG_CALL, HAVE_LONG_COND): New. (m68k_archs): Add isac. (m68k_cpus): Add 54455 family. (m68k_ip): Split Bg into Bb, Bs, Bg. (m68k_elf_final_processing): Add ISA_C. * doc/c-m68k.texi (M680x0 Options): Add isac. include/opcode/ * m68k.h (mcfisa_c): New. (mcfusp, mcf_mask): Adjust. bfd/ * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac, bfd_mach_mcf_isa_c_emac): New. * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry, elf_isac_plt_entry, elf_isac_plt_info): New. (elf32_m68k_object_p): Add ISA_C. (elf32_m68k_print_private_bfd_data): Print ISA_C. (elf32_m68k_get_plt_info): Detect ISA_C. * cpu-m68k.c (arch_info): Add ISAC. (m68k_arch_features): Likewise, (bfd_m68k_compatible): ISAs B & C are not compatible. opcodes/ * m68k-opc.c: Mark mcfisa_c instructions.
Diffstat (limited to 'bfd/elf32-m68k.c')
-rw-r--r--bfd/elf32-m68k.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 948a9960f05..6cc02129d06 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -300,6 +300,40 @@ static const struct elf_m68k_plt_info elf_isab_plt_info = {
elf_isab_plt_entry, { 2, 20 }, 12
};
+#define ISAC_PLT_ENTRY_SIZE 24
+
+static const bfd_byte elf_isac_plt0_entry[ISAC_PLT_ENTRY_SIZE] =
+{
+ 0x20, 0x3c, /* move.l #offset,%d0 */
+ 0, 0, 0, 0, /* replaced with .got + 4 - . */
+ 0x2e, 0xbb, 0x08, 0xfa, /* move.l (-6,%pc,%d0:l),(%sp) */
+ 0x20, 0x3c, /* move.l #offset,%d0 */
+ 0, 0, 0, 0, /* replaced with .got + 8 - . */
+ 0x20, 0x7b, 0x08, 0xfa, /* move.l (-6,%pc,%d0:l), %a0 */
+ 0x4e, 0xd0, /* jmp (%a0) */
+ 0x4e, 0x71 /* nop */
+};
+
+/* Subsequent entries in a procedure linkage table look like this. */
+
+static const bfd_byte elf_isac_plt_entry[ISAC_PLT_ENTRY_SIZE] =
+{
+ 0x20, 0x3c, /* move.l #offset,%d0 */
+ 0, 0, 0, 0, /* replaced with (.got entry) - . */
+ 0x20, 0x7b, 0x08, 0xfa, /* move.l (-6,%pc,%d0:l), %a0 */
+ 0x4e, 0xd0, /* jmp (%a0) */
+ 0x2f, 0x3c, /* move.l #offset,-(%sp) */
+ 0, 0, 0, 0, /* replaced with offset into relocation table */
+ 0x61, 0xff, /* bsr.l .plt */
+ 0, 0, 0, 0 /* replaced with .plt - . */
+};
+
+static const struct elf_m68k_plt_info elf_isac_plt_info = {
+ ISAC_PLT_ENTRY_SIZE,
+ elf_isac_plt0_entry, { 2, 12},
+ elf_isac_plt_entry, { 2, 20 }, 12
+};
+
#define CPU32_PLT_ENTRY_SIZE 24
/* Procedure linkage table entries for the cpu32 */
static const bfd_byte elf_cpu32_plt0_entry[CPU32_PLT_ENTRY_SIZE] =
@@ -468,6 +502,9 @@ elf32_m68k_object_p (bfd *abfd)
case EF_M68K_CF_ISA_B:
features |= mcfisa_a|mcfisa_b|mcfhwdiv|mcfusp;
break;
+ case EF_M68K_CF_ISA_C:
+ features |= mcfisa_a|mcfisa_c|mcfhwdiv|mcfusp;
+ break;
}
switch (eflags & EF_M68K_CF_MAC_MASK)
{
@@ -617,6 +654,9 @@ elf32_m68k_print_private_bfd_data (abfd, ptr)
case EF_M68K_CF_ISA_B:
isa = "B";
break;
+ case EF_M68K_CF_ISA_C:
+ isa = "C";
+ break;
}
fprintf (file, " [isa %s]%s", isa, additional);
if (eflags & EF_M68K_CF_FLOAT)
@@ -1145,6 +1185,8 @@ elf_m68k_get_plt_info (bfd *output_bfd)
return &elf_cpu32_plt_info;
if (features & mcfisa_b)
return &elf_isab_plt_info;
+ if (features & mcfisa_c)
+ return &elf_isac_plt_info;
return &elf_m68k_plt_info;
}