[ARC] Use GOTOFFPC relocation for pc-relative accesses.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 16 Jun 2016 12:29:29 +0000 (14:29 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Thu, 16 Jun 2016 12:29:29 +0000 (14:29 +0200)
commitf5e336b111def9f729b874fc1af3bddb73a3d612
treebda8cadb2a0bdcd4fe4d0b967b880e03a36a1a96
parent7f7fa20fdd7f13844868541c57063327bf3bec51
[ARC] Use GOTOFFPC relocation for pc-relative accesses.

gcc/
2016-06-16  Claudiu Zissulescu  <claziss@synopsys.com>
    Joern Rennecke  <joern.rennecke@embecosm.com>

* config/arc/arc.c (arc_print_operand_address): Handle pc-relative
addresses.
(arc_needs_pcl_p): Add GOTOFFPC.
(arc_legitimate_pic_addr_p): Likewise.
(arc_output_pic_addr_const): Likewise.
(arc_legitimize_pic_address): Generate a pc-relative address using
GOTOFFPC.
(arc_output_libcall): Use @pcl syntax.
(arc_delegitimize_address_0): Delegitimize ARC_UNSPEC_GOTOFFPC.
* config/arc/arc.md ("unspec"): Add ARC_UNSPEC_GOTOFFPC.
(*movsi_insn): Use @pcl syntax.
(doloop_begin_i): Likewise.

Co-Authored-By: Joern Rennecke <joern.rennecke@embecosm.com>
From-SVN: r237525
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/config/arc/arc.md