[NDS32] Support PIC and TLS.
commit9fbdd630afa490bbd1706123fdc37e90822728c2
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 May 2018 11:03:20 +0000 (19 11:03 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 19 May 2018 11:03:20 +0000 (19 11:03 +0000)
treefbaf49796a3f7b78f7384f1df19ef7eb651bda5f
parent5edbbb22f1566f62c9af256659c99b4fcb842b1b
[NDS32] Support PIC and TLS.

gcc/
* config/nds32/constants.md: Add TP_REGNUM constant.
(unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
UNSPEC_ADD32.
* config/nds32/nds32-doubleword.md: Consider flag_pic.
* config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
* config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
* config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
and PIC code generation.
* config/nds32/nds32-protos.h: Declarations that support TLS and PIC
code generation.
* config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
optimization.
* config/nds32/nds32.md: Support TLS and PIC.
* config/nds32/nds32.c: Support TLS and PIC.
* config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
* config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
predicate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260393 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/config/nds32/constants.md
gcc/config/nds32/nds32-doubleword.md
gcc/config/nds32/nds32-dspext.md
gcc/config/nds32/nds32-md-auxiliary.c
gcc/config/nds32/nds32-predicates.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32-relax-opt.c
gcc/config/nds32/nds32.c
gcc/config/nds32/nds32.h
gcc/config/nds32/nds32.md
gcc/config/nds32/predicates.md