aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-04-16 15:17:57 +0930
committerAlan Modra <amodra@gmail.com>2018-04-16 15:17:57 +0930
commitfe0bf0fd57ea3ef8458d2e8661b428110fc026e2 (patch)
tree5f2ccf12205a52a9636cb5a5cd69773380477d2d /gas/config
parentfdef3943443987525aea4f3ebe1f569f7070fcc8 (diff)
downloadgdb-fe0bf0fd57ea3ef8458d2e8661b428110fc026e2.zip
gdb-fe0bf0fd57ea3ef8458d2e8661b428110fc026e2.tar.gz
gdb-fe0bf0fd57ea3ef8458d2e8661b428110fc026e2.tar.bz2
Remove h8300-coff support
include/ * coff/h8300.h: Delete. bfd/ * Makefile.am: Remove h8300-coff support. * coffcode.h: Likewise. * config.bfd: Likewise. * configure.ac: Likewise. * reloc16.c: Likewise. * targets.c: Likewise. * coff-h8300.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/binutils-all/objcopy.exp: Remove h8300-coff support. gas/ * config/obj-coff.h: Remove h8300-coff support. * config/tc-h8300.c: Likewise. * config/tc-h8300.h: Likewise. * testsuite/gas/h8300/h8300.exp: Likewise. * testsuite/gas/h8300/branch-coff.s: Delete. * testsuite/gas/h8300/branchh-coff.s: Delete. * testsuite/gas/h8300/branchs-coff.s: Delete. * testsuite/gas/h8300/ffxx1-coff.d: Delete. * testsuite/gas/h8300/ffxx1-coff.s: Delete. * testsuite/gas/h8300/h8300-coff.exp: Delete. ld/ * Makefile.am: Remove h8300-coff support. * configure.tgt: Likewise. * testsuite/ld-h8300/h8300.exp: Likewise. * emulparams/h8300.sh: Delete. * emulparams/h8300h.sh: Delete. * emulparams/h8300hn.sh: Delete. * emulparams/h8300s.sh: Delete. * emulparams/h8300sn.sh: Delete. * emulparams/h8300sx.sh: Delete. * emulparams/h8300sxn.sh: Delete. * scripttempl/h8300.sc: Delete. * scripttempl/h8300h.sc: Delete. * scripttempl/h8300hn.sc: Delete. * scripttempl/h8300s.sc: Delete. * scripttempl/h8300sn.sc: Delete. * scripttempl/h8300sx.sc: Delete. * scripttempl/h8300sxn.sc: Delete. * testsuite/ld-h8300/relax-3-coff.d: Delete. * testsuite/ld-h8300/relax-4-coff.d: Delete. * testsuite/ld-h8300/relax-5-coff.d: Delete. * testsuite/ld-h8300/relax-6-coff.d: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/obj-coff.h5
-rw-r--r--gas/config/tc-h8300.c38
-rw-r--r--gas/config/tc-h8300.h16
3 files changed, 5 insertions, 54 deletions
diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h
index ee28ab4..8168dc2 100644
--- a/gas/config/obj-coff.h
+++ b/gas/config/obj-coff.h
@@ -85,11 +85,6 @@
#define TARGET_FORMAT "coff-z8k"
#endif
-#ifdef TC_H8300
-#include "coff/h8300.h"
-#define TARGET_FORMAT "coff-h8300"
-#endif
-
#ifdef TC_H8500
#include "coff/h8500.h"
#define TARGET_FORMAT "coff-h8500"
diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c
index f1df514..a00089b 100644
--- a/gas/config/tc-h8300.c
+++ b/gas/config/tc-h8300.c
@@ -28,10 +28,7 @@
#define h8_opcodes ops
#include "opcode/h8300.h"
#include "safe-ctype.h"
-
-#ifdef OBJ_ELF
#include "elf/h8.h"
-#endif
const char comment_chars[] = ";";
const char line_comment_chars[] = "#";
@@ -212,12 +209,10 @@ const pseudo_typeS md_pseudo_table[] =
{"page", listing_eject, 0},
{"program", s_ignore, 0},
-#ifdef OBJ_ELF
{"section", h8300_elf_section, 0},
{"section.s", h8300_elf_section, 0},
{"sect", h8300_elf_section, 0},
{"sect.s", h8300_elf_section, 0},
-#endif
{0, 0, 0}
};
@@ -1372,7 +1367,6 @@ do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, cons
check_operand (operand, 0xffff, t);
bytes[0] |= operand->exp.X_add_number >> 8;
bytes[1] |= operand->exp.X_add_number >> 0;
-#ifdef OBJ_ELF
/* MOVA needs both relocs to relax the second operand properly. */
if (relaxmode != 0
&& (OP_KIND(this_try->opcode->how) == O_MOVAB
@@ -1382,7 +1376,6 @@ do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, cons
idx = BFD_RELOC_16;
fix_new_exp (frag_now, offset, 2, &operand->exp, 0, idx);
}
-#endif
break;
case L_24:
check_operand (operand, 0xffffff, t);
@@ -1399,11 +1392,9 @@ do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, cons
bytes[3] |= operand->exp.X_add_number >> 0;
if (relaxmode != 0)
{
-#ifdef OBJ_ELF
if ((operand->mode & MODE) == DISP && relaxmode == 1)
idx = BFD_RELOC_H8_DISP32A16;
else
-#endif
idx = (relaxmode == 2) ? R_MOV24B1 : R_MOVL1;
fix_new_exp (frag_now, offset, 4, &operand->exp, 0, idx);
}
@@ -1418,12 +1409,9 @@ do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, cons
case L_32:
size = 4;
where = (operand->mode & SIZE) == L_24 ? -1 : 0;
-#ifdef OBJ_ELF
if ((operand->mode & MODE) == DISP && relaxmode == 1)
idx = BFD_RELOC_H8_DISP32A16;
- else
-#endif
- if (relaxmode == 2)
+ else if (relaxmode == 2)
idx = R_MOV24B1;
else if (relaxmode == 1)
idx = R_MOVL1;
@@ -1656,17 +1644,9 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand)
int x_mode = x & MODE;
if (x_mode == IMM || x_mode == DISP)
- {
-#ifndef OBJ_ELF
- /* Remove MEMRELAX flag added in h8300.h on mov with
- addressing mode "register indirect with displacement". */
- if (x_mode == DISP)
- x &= ~MEMRELAX;
-#endif
- do_a_fix_imm (output - frag_now->fr_literal + op_at[i] / 2,
- op_at[i] & 1, operand + i, (x & MEMRELAX) != 0,
- this_try);
- }
+ do_a_fix_imm (output - frag_now->fr_literal + op_at[i] / 2,
+ op_at[i] & 1, operand + i, (x & MEMRELAX) != 0,
+ this_try);
else if (x_mode == ABS)
do_a_fix_imm (output - frag_now->fr_literal + op_at[i] / 2,
op_at[i] & 1, operand + i,
@@ -1685,14 +1665,6 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand)
if (operand[i].exp.X_add_number & 1)
as_warn (_("branch operand has odd offset (%lx)\n"),
(unsigned long) operand->exp.X_add_number);
-#ifndef OBJ_ELF
- /* The COFF port has always been off by one, changing it
- now would be an incompatible change, so we leave it as-is.
-
- We don't want to do this for ELF as we want to be
- compatible with the proposed ELF format from Hitachi. */
- operand[i].exp.X_add_number -= 1;
-#endif
if (size16)
{
operand[i].exp.X_add_number =
@@ -1744,7 +1716,6 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand)
int where = 0;
bfd_reloc_code_real_type reloc_type = R_JMPL1;
-#ifdef OBJ_ELF
/* To be compatible with the proposed H8 ELF format, we
want the relocation's offset to point to the first byte
that will be modified, not to the start of the instruction. */
@@ -1756,7 +1727,6 @@ build_bytes (const struct h8_instruction *this_try, struct h8_op *operand)
}
else
where = 1;
-#endif
/* This jmp may be a jump or a branch. */
diff --git a/gas/config/tc-h8300.h b/gas/config/tc-h8300.h
index 8000121..8545a93 100644
--- a/gas/config/tc-h8300.h
+++ b/gas/config/tc-h8300.h
@@ -26,7 +26,6 @@
/* Fixup debug sections since we will never relax them. */
#define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
-#ifdef OBJ_ELF
#ifndef TE_LINUX
#define TARGET_FORMAT "elf32-h8300"
#else
@@ -35,18 +34,12 @@
#define LOCAL_LABEL_PREFIX '.'
#define LOCAL_LABEL(NAME) (NAME[0] == '.' && NAME[1] == 'L')
#define FAKE_LABEL_NAME ".L0\001"
-#endif
struct fix;
struct internal_reloc;
#define WORKING_DOT_WORD
-#define COFF_MAGIC ( Smode && Nmode ? 0x8304 : Hmode && Nmode ? 0x8303 : Smode ? 0x8302 : Hmode ? 0x8301 : 0x8300)
-#define IGNORE_NONSTANDARD_ESCAPES
-
-#define tc_coff_symbol_emit_hook(a) ; /* not used */
-
/* No shared lib support, so we don't need to ensure externally
visible symbols can be overridden. */
#define EXTERN_FORCE_RELOC 0
@@ -55,11 +48,8 @@ struct internal_reloc;
#define DWARF2_LINE_MIN_INSN_LENGTH 2
#define DWARF2_USE_FIXED_ADVANCE_PC 0
-#ifdef OBJ_ELF
/* Provide mappings from the original H8 COFF relocation names to
- their corresponding BFD relocation names. This allows us to use
- most of tc-h8300.c without modifications for both ELF and COFF
- ports. */
+ their corresponding BFD relocation names. */
#define R_MOV24B1 BFD_RELOC_H8_DIR24A8
#define R_MOVL1 BFD_RELOC_H8_DIR32A16
#define R_RELLONG BFD_RELOC_32
@@ -74,12 +64,8 @@ struct internal_reloc;
/* We do not want to adjust any relocations to make implementation of
linker relaxations easier. */
#define tc_fix_adjustable(FIX) 0
-#endif
#define LISTING_HEADER "Renesas H8/300 GAS "
-#ifndef OBJ_ELF
-#define RELOC_32 1234
-#endif
extern int Hmode;
extern int Smode;