aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/arc-func.h
diff options
context:
space:
mode:
authorClaudiu Zissulescu <claziss@synopsys.com>2016-03-08 14:19:52 +0100
committerClaudiu Zissulescu <claziss@synopsys.com>2016-03-08 14:19:52 +0100
commit72f3b6aae734d8cdcded38aca94e379848bec7ef (patch)
treeaf7ba7ac67dab430d88682b2e7f6805e60e80829 /include/opcode/arc-func.h
parent8e460aa0a4fbd535ebe383ba2748bb78bbf2a92d (diff)
downloadgdb-72f3b6aae734d8cdcded38aca94e379848bec7ef.zip
gdb-72f3b6aae734d8cdcded38aca94e379848bec7ef.tar.gz
gdb-72f3b6aae734d8cdcded38aca94e379848bec7ef.tar.bz2
[ARC] Allow non-instruction relocations within .text sections
bfd/ 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com> Andrew Burgess <andrew.burgess@embecosm.com> * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32. (arc_bfd_put_32): Becomes an alias for bfd_put_32. (arc_elf_howto_init): Added assert to validate relocations. (get_middle_endian_relocation): Delete. (middle_endian_convert): New function. (ME): Redefine, now does nothing. (IS_ME): New define. (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO' definition to call middle_endian_convert. Add a new local variable and make use of this throughout. Added call to arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations. gas/ 2016-03-08 Andrew Burgess <andrew.burgess@embecosm.com> * testsuite/gas/arc/inline-data-1.d: New file. * testsuite/gas/arc/inline-data-1.s: New file. include/ 2016-03-08 Cupertino Miranda <Cupertino.Miranda@synopsys.com> Andrew Burgess <andrew.burgess@embecosm.com> * elf/arc-reloc.def: Add a call to ME within the formula for each relocation that requires middle-endian correction.
Diffstat (limited to 'include/opcode/arc-func.h')
-rw-r--r--include/opcode/arc-func.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/opcode/arc-func.h b/include/opcode/arc-func.h
index 96ffcff..47451a6 100644
--- a/include/opcode/arc-func.h
+++ b/include/opcode/arc-func.h
@@ -66,8 +66,8 @@ replace_bits16 (unsigned insn, int value ATTRIBUTE_UNUSED)
ATTRIBUTE_UNUSED static unsigned
replace_bits24 (unsigned insn, int value ATTRIBUTE_UNUSED)
{
- insn = insn & ~0xffffff;
- insn |= ((value >> 0) & 0xffffff) << 0;
+ insn = insn & ~0xffffff00;
+ insn |= ((value >> 0) & 0xffffff) << 8;
return insn;
}