sh.c (TARGET_HAVE_TLS): Conditionally define.
authorKaz Kojima <kkojima@gcc.gnu.org>
Mon, 24 Feb 2003 02:44:02 +0000 (02:44 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Mon, 24 Feb 2003 02:44:02 +0000 (02:44 +0000)
commit463f02cd037fbf3af66cdbfff526fcb48d2ba746
tree553894bde43b663f56ac150a268af18125866500
parentcf88ede3d283f7ccab57c921204f855bb5b283a4
sh.c (TARGET_HAVE_TLS): Conditionally define.

* config/sh/sh.c (TARGET_HAVE_TLS): Conditionally define.
(prepare_move_operands): Handle TLS operands.
(tls_symbolic_operand): New.
(nonpic_symbol_mentioned_p): Handle TLS UNSPECs.
(legitimize_pic_address): Do nothing for the TLS symbol.
(sh_encode_section_info): Handle TLS case.
(sh_strip_name_encoding): Drop TLS encoding.
* config/sh/sh-protos.h (tls_symbolic_operand): Add prototype.
* config/sh/sh.h (SH_TLS_ENCODING): Define.
(TLS_SYMNAME_P, STRIP_TLS_ENCODING): Likewise.
(ASM_OUTPUT_LABELREF): Drop TLS encoding.
(OUTPUT_ADDR_CONST_EXTRA): Handle TLS UNSPECs.
* config/sh/sh.md: Define TLS UNSPEC constants.
(type): Add tls_load.
("tls_global_dynamic", "tls_local_dynamic"): New insns.
("sym2DTPOFF", "symDTPOFF2reg", "sym2GOTTPOFF"): New expanders.
("tls_initial_exec"): New insn.
("sym2TPOFF", "symTPOFF2reg"): New expanders.
("load_gbr"): New insn.

* configure.in (HAVE_AS_TLS): Add sh-*-* and sh[34]*-*-* cases.
        * configure: Regenerate.

From-SVN: r63353
gcc/ChangeLog
gcc/config/sh/sh-protos.h
gcc/config/sh/sh.c
gcc/config/sh/sh.h
gcc/config/sh/sh.md