aboutsummaryrefslogtreecommitdiff
path: root/include/opcode
diff options
context:
space:
mode:
authorCupertino Miranda <cmiranda@synopsys.com>2016-06-07 10:24:37 +0200
committerCupertino Miranda <cmiranda@synopsys.com>2016-08-26 12:09:17 +0200
commita87aa054a67e23faeead400bdf902a1eddb242a4 (patch)
tree219d95926b493b534b9af082f5fae233073bc28c /include/opcode
parent0955507f6e7144c9c5e420bbcf617593b13de38b (diff)
downloadgdb-a87aa054a67e23faeead400bdf902a1eddb242a4.zip
gdb-a87aa054a67e23faeead400bdf902a1eddb242a4.tar.gz
gdb-a87aa054a67e23faeead400bdf902a1eddb242a4.tar.bz2
Fixes to legacy ARC relocations.
Added support for ARC_SDA_12 reloc. Fixed ARC_N32_ME. Added ME (middle-endian) to ARC_SDA_12 reloc. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12 relocation. * bfd-in2.h: Regenerated from the previous changes. * libbfd.h: Regenerated from the previous changes. include/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12, SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations. * opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12 relocation.
Diffstat (limited to 'include/opcode')
-rw-r--r--include/opcode/arc-func.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/opcode/arc-func.h b/include/opcode/arc-func.h
index cafb92f..c92382b 100644
--- a/include/opcode/arc-func.h
+++ b/include/opcode/arc-func.h
@@ -264,3 +264,18 @@ replace_disp9s1 (unsigned insn, int value ATTRIBUTE_UNUSED)
}
#endif /* REPLACE_disp9s1 */
+
+/* mask = 00000000000000000000111111222222. */
+#ifndef REPLACE_disp12s
+#define REPLACE_disp12s
+ATTRIBUTE_UNUSED static unsigned
+replace_disp12s (unsigned insn, int value ATTRIBUTE_UNUSED)
+{
+ insn = insn & ~0xfff;
+ insn |= ((value >> 0) & 0x003f) << 6;
+ insn |= ((value >> 6) & 0x003f) << 0;
+
+ return insn;
+}
+
+#endif /* REPLACE_disp12s */