aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJohn Eric Martin <John.Martin@emmicro-us.com>2017-07-19 09:56:55 +0200
committerclaziss <claziss@synopsys.com>2017-07-19 09:56:55 +0200
commit684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16 (patch)
tree86314acf8134b81adb49a35e6f5c685607e03205 /opcodes
parente4943f2c7569a829eb6129f10f7c5401a96aaa08 (diff)
downloadfsf-binutils-gdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.zip
fsf-binutils-gdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.tar.gz
fsf-binutils-gdb-684d5a10b1332e2a1b03a1d6e7a899ef87b3ea16.tar.bz2
[ARC] Add JLI support.
The following relocation types were added to GCC/binutils: ARC_JLI_SECTOFF is a relocation type in Metaware that is now used by GCC as well to adjust the index of function calls to functions with attribute jli_call_always. bfd/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c (JLI): Define. * reloc.c: Add JLI relocations. gas/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/jli-1.d: New file. * testsuite/gas/arc/jli-1.s: Likewise. * testsuite/gas/arc/taux.d: Update for jli_base. include/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * elf/arc-reloc.def: Add JLI relocs howto. * opcode/arc-func.h (replace_jli): New function. ld/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * emulparams/arcelf.sh (JLI_START_TABLE): Define. * scripttempl/elfarc.sc: Handle jlitab section. * scripttempl/elfarcv2.sc: Likewise. * testsuite/ld-arc/arc.exp: Add JLI test. * testsuite/ld-arc/jli-script.ld: New file. * testsuite/ld-arc/jli-simple.dd: Likewise. * testsuite/ld-arc/jli-simple.rd: Likewise. * testsuite/ld-arc/jli-simple.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.d: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.err: Likewise. opcode/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * arc-opc.c (UIMM10_6_S_JLIOFF): Define. (UIMM3_23): Adjust accordingly. * arc-regs.h: Add/correct jli_base register. * arc-tbl.h (jli_s): Likewise.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog8
-rw-r--r--opcodes/arc-opc.c8
-rw-r--r--opcodes/arc-regs.h2
-rw-r--r--opcodes/arc-tbl.h1
4 files changed, 17 insertions, 2 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index c013974..e789003 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,11 @@
+2017-07-19 Claudiu Zissulescu <claziss@synopsys.com>
+ John Eric Martin <John.Martin@emmicro-us.com>
+
+ * arc-opc.c (UIMM10_6_S_JLIOFF): Define.
+ (UIMM3_23): Adjust accordingly.
+ * arc-regs.h: Add/correct jli_base register.
+ * arc-tbl.h (jli_s): Likewise.
+
2017-07-18 Nick Clifton <nickc@redhat.com>
PR 21775
diff --git a/opcodes/arc-opc.c b/opcodes/arc-opc.c
index c266f4f..7f934ce 100644
--- a/opcodes/arc-opc.c
+++ b/opcodes/arc-opc.c
@@ -2039,8 +2039,14 @@ const struct arc_operand arc_operands[] =
| ARC_OPERAND_TRUNCATE | ARC_OPERAND_PCREL, insert_simm8_a16_9_s,
extract_simm8_a16_9_s},
+/* UIMM10_6_S_JLIOFF mask = 0000001111111111. */
+#define UIMM10_6_S_JLIOFF (SIMM8_A16_9_S + 1)
+ {12, 0, BFD_RELOC_ARC_JLI_SECTOFF, ARC_OPERAND_UNSIGNED
+ | ARC_OPERAND_ALIGNED32 | ARC_OPERAND_TRUNCATE, insert_uimm10_6_s,
+ extract_uimm10_6_s},
+
/* UIMM3_23 mask = 00000000000000000000000111000000. */
-#define UIMM3_23 (SIMM8_A16_9_S + 1)
+#define UIMM3_23 (UIMM10_6_S_JLIOFF + 1)
{3, 0, 0, ARC_OPERAND_UNSIGNED, insert_uimm3_23, extract_uimm3_23},
/* UIMM10_6_S mask = 0000001111111111. */
diff --git a/opcodes/arc-regs.h b/opcodes/arc-regs.h
index 0bdbd92..99c39a4 100644
--- a/opcodes/arc-regs.h
+++ b/opcodes/arc-regs.h
@@ -69,7 +69,6 @@ DEF (0x23, ARC_OPCODE_ARCALL, NONE, limit0)
DEF (0x24, ARC_OPCODE_ARCALL, NONE, pcport)
DEF (0x25, ARC_OPCODE_ARCALL, NONE, int_vector_base)
DEF (0x26, ARC_OPCODE_ARCALL, NONE, aux_vbfdw_mode)
-DEF (0x26, ARC_OPCODE_ARCALL, NONE, jli_base)
DEF (0x27, ARC_OPCODE_ARCALL, NONE, aux_vbfdw_bm0)
DEF (0x28, ARC_OPCODE_ARCALL, NONE, aux_vbfdw_bm1)
DEF (0x29, ARC_OPCODE_ARCALL, NONE, aux_vbfdw_accu)
@@ -261,6 +260,7 @@ DEF (0x236, ARC_OPCODE_ARCALL, NONE, ap_amm7)
DEF (0x237, ARC_OPCODE_ARCALL, NONE, ap_ac7)
DEF (0x278, ARC_OPCODE_ARCALL, NONE, pct_control)
DEF (0x279, ARC_OPCODE_ARCALL, NONE, pct_bank)
+DEF (0x290, ARC_OPCODE_ARCV2, NONE, jli_base)
DEF (0x300, ARC_OPCODE_ARCFPX, DPX, fp_status)
DEF (0x301, ARC_OPCODE_ARCFPX, DPX, aux_dpfp1l)
DEF (0x301, ARC_OPCODE_ARCFPX, DPX, d1l)
diff --git a/opcodes/arc-tbl.h b/opcodes/arc-tbl.h
index 79e6b89..07ff304 100644
--- a/opcodes/arc-tbl.h
+++ b/opcodes/arc-tbl.h
@@ -7955,6 +7955,7 @@
/* jli_s u10 010110uuuuuuuuuu. */
{ "jli_s", 0x00005800, 0x0000FC00, ARC_OPCODE_ARCv2EM | ARC_OPCODE_ARCv2HS, JLI, CD1, { UIMM10_6_S }, { 0 }},
+{ "jli_s", 0x00005800, 0x0000FC00, ARC_OPCODE_ARCv2EM | ARC_OPCODE_ARCv2HS, JLI, CD1, { UIMM10_6_S_JLIOFF }, { 0 }},
/* jl_s b 01111bbb01000000. */
{ "jl_s", 0x00007840, 0x0000F8FF, ARC_OPCODE_ARC600 | ARC_OPCODE_ARC700, JUMP, NONE, { BRAKET, RB_S, BRAKETdup }, { 0 }},