aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJames Bowman <jamesb@excamera.com>2017-10-12 18:37:40 -0700
committerJames Bowman <jamesb@excamera.com>2017-10-12 18:41:29 -0700
commit3b4b0a629a972bf80fc0ac6202f89681fab1df37 (patch)
treec8cde198a64de3a48b1de08dbf65f68dbbc9a13d /bfd
parentd268bbaff7da90caf5fbc94456ae58315ffa1802 (diff)
downloadgdb-3b4b0a629a972bf80fc0ac6202f89681fab1df37.zip
gdb-3b4b0a629a972bf80fc0ac6202f89681fab1df37.tar.gz
gdb-3b4b0a629a972bf80fc0ac6202f89681fab1df37.tar.bz2
FT32: support for FT32B processor - part 1
FT32B is a new FT32 family member. It has a code compression scheme, which requires the use of linker relaxations. The change is quite large, so submission is in several parts. Part 1 adds a 15-bit instruction field, and CPU-specific functions for the code compression that are used in binutils and GDB. bfd/ChangeLog: 2017-10-12 James Bowman <james.bowman@ftdichip.com> * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-ft32.c: Add HOWTO R_FT32_15. * reloc.c: Add BFD_RELOC_FT32_15. gas/ChangeLog: 2017-10-12 James Bowman <james.bowman@ftdichip.com> * config/tc-ft32.c (md_assemble): Replace FT32_FLD_K8 with K15. (md_apply_fix, tc_gen_reloc): Add BFD_RELOC_FT32_15. include/ChangeLog: 2017-10-12 James Bowman <james.bowman@ftdichip.com> * elf/ft32.h: Add R_FT32_15. * opcode/ft32.h: Replace FT32_FLD_K8 with K15. (ft32_shortcode, sc_compar, ft32_split_shortcode, ft32_merge_shortcode, ft32_merge_shortcode): New functions. opcodes/ChangeLog: 2017-10-12 James Bowman <james.bowman@ftdichip.com> * opcodes/ft32-dis.c (print_insn_ft32): Replace FT32_FLD_K8 with K15. * opcodes/ft32-opc.c (ft32_opc_info): Replace FT32_FLD_K8 with K15. Add jmpix pattern. sim/ChangeLog: 2017-10-12 James Bowman <james.bowman@ftdichip.com> * sim/ft32/interp.c (step_once): Replace FT32_FLD_K8 with K15.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/bfd-in2.h1
-rw-r--r--bfd/elf32-ft32.c14
-rw-r--r--bfd/libbfd.h1
-rw-r--r--bfd/reloc.c2
5 files changed, 25 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a62f7f6..ecdb0e7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2017-10-12 James Bowman <james.bowman@ftdichip.com>
+
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-ft32.c: Add HOWTO R_FT32_15.
+ * reloc.c: Add BFD_RELOC_FT32_15.
+
2017-10-12 Nick Clifton <nickc@redhat.com>
* reloc.c (enum bfd_reloc_status): Start values at 2.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8265efa..503e237 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -3149,6 +3149,7 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_FT32_20,
BFD_RELOC_FT32_17,
BFD_RELOC_FT32_18,
+ BFD_RELOC_FT32_15,
/* Fujitsu Frv Relocations. */
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index 233c5a1..2ee691c 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -147,6 +147,19 @@ static reloc_howto_type ft32_elf_howto_table [] =
0x0003ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+ HOWTO (R_FT32_15, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 15, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_FT32_15", /* name */
+ FALSE, /* partial_inplace */
+ 0x00000000, /* src_mask */
+ 0x00007fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* Map BFD reloc types to FT32 ELF reloc types. */
@@ -167,6 +180,7 @@ static const struct ft32_reloc_map ft32_reloc_map [] =
{ BFD_RELOC_FT32_20, R_FT32_20 },
{ BFD_RELOC_FT32_17, R_FT32_17 },
{ BFD_RELOC_FT32_18, R_FT32_18 },
+ { BFD_RELOC_FT32_15, R_FT32_15 },
};
static reloc_howto_type *
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 196e1f0..0f8843e 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -1216,6 +1216,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_FT32_20",
"BFD_RELOC_FT32_17",
"BFD_RELOC_FT32_18",
+ "BFD_RELOC_FT32_15",
"BFD_RELOC_FRV_LABEL16",
"BFD_RELOC_FRV_LABEL24",
diff --git a/bfd/reloc.c b/bfd/reloc.c
index b4d8584..e4edfd3 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -2487,6 +2487,8 @@ ENUMX
BFD_RELOC_FT32_17
ENUMX
BFD_RELOC_FT32_18
+ENUMX
+ BFD_RELOC_FT32_15
ENUMDOC
FT32 ELF relocations.
COMMENT