[NDS32] Support PIC and TLS.

Programming / Compilers / GCC - jasonwucj [138bc75d-0d04-0410-961f-82ee72b054a4] - 19 May 2018 11:03 EDT

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): 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.

9fbdd630afa [NDS32] Support PIC and TLS.
gcc/ChangeLog | 22 ++
gcc/config/nds32/constants.md | 10 +
gcc/config/nds32/nds32-doubleword.md | 2 +-
gcc/config/nds32/nds32-dspext.md | 14 +
gcc/config/nds32/nds32-md-auxiliary.c | 511 +++++++++++++++++++++++++++-------
gcc/config/nds32/nds32-predicates.c | 36 +++
gcc/config/nds32/nds32-protos.h | 25 +-
gcc/config/nds32/nds32-relax-opt.c | 245 ++++++++++++++++
gcc/config/nds32/nds32.c | 185 +++++++++++-
gcc/config/nds32/nds32.h | 10 +
gcc/config/nds32/nds32.md | 129 +++++++--
gcc/config/nds32/predicates.md | 6 +
12 files changed, 1058 insertions(+), 137 deletions(-)

Upstream: gcc.gnu.org


  • Share