[NDS32] Support PIC and TLS.
authorKuan-Lin Chen <kuanlinchentw@gmail.com>
Sat, 19 May 2018 11:03:20 +0000 (11:03 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sat, 19 May 2018 11:03:20 +0000 (11:03 +0000)
commitb26fa4f93b784dc4e8f46d91ca3a5101b2ee5f49
treefbaf49796a3f7b78f7384f1df19ef7eb651bda5f
parentdc32bc72bb8ba03e66c87db9472d6067dd52d09b
[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.

Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
From-SVN: r260393
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