[ARC] Use TARGET_USE_ANCHORS_FOR_SYMBOL_P.
authorClaudiu Zissulescu <claziss@synopsys.com>
Fri, 1 Sep 2017 11:43:17 +0000 (13:43 +0200)
committerClaudiu Zissulescu <claziss@gcc.gnu.org>
Fri, 1 Sep 2017 11:43:17 +0000 (13:43 +0200)
commit7cfbf676bdb8783e2818995ddd436a442b4dae75
tree9c1a5c6698bec6a78ba2568a6606ffd5c2ca82e5
parentd2e05fcbdafc26ab0c2babf2b3065d177f71305b
[ARC] Use TARGET_USE_ANCHORS_FOR_SYMBOL_P.

We don't want to use anchors for small data: the GP register acts as an anchor in that
case.  We also don't want to use them for PC-relative accesses,
where the PC acts as an anchor.  TLS symbols require special accesses as well, don't use
anchors for such symbols.

gcc/
2017-04-28  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.

gcc/testsuite
2017-04-28  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/pr9001184797.c: New test.

From-SVN: r251586
gcc/ChangeLog
gcc/config/arc/arc.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arc/pr9001184797.c [new file with mode: 0644]