diff options
author | claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-28 11:53:46 +0000 |
---|---|---|
committer | claziss <claziss@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-28 11:53:46 +0000 |
commit | 4260aeee7557175449ed6fe33a1e1dc7e801ae0f (patch) | |
tree | ab5e739e6e70fe88058986a5610bcd6e72648938 /gcc/config/arc/arc.opt | |
parent | 5caa55b9492731bbf6dcd2e4c98cec8df7415b21 (diff) | |
download | gcc-4260aeee7557175449ed6fe33a1e1dc7e801ae0f.tar.gz |
[ARC] Add TLS support.
gcc/
2016-04-28 Claudiu Zissulescu <claziss@synopsys.com>
Joern Rennecke <joern.rennecke@embecosm.com>
* config/arc/arc-protos.h (arc_legitimize_pic_address): Remove
declaration.
(emit_pic_move): Remove.
(arc_eh_uses, insn_is_tls_gd_dispatch): Declare.
* config/arc/arc.c (emit_pic_move): Removed.
(TARGET_HAVE_TLS): Define.
(arc_conditional_register_usage): Test for arc_tp_regno.
(arc_print_operand, arc_print_operand_address): Handle TLS
unspecs.
(arc_needs_pcl_p): New function.
(arc_legitimate_pc_offset_p): Use arc_needs_pcl_p.
(arc_legitimate_pic_addr_p): Handle TLS unspecs.
(arc_raw_symbolic_reference_mentioned_p): Likewise.
(arc_get_tp, arc_emit_call_tls_get_addr): New function.
(arc_legitimize_tls_address): Likewise.
(DTPOFF_ZERO_SYM): Define.
(arc_legitimize_pic_address): Make it static, handle TLS cases.
(arc_output_pic_addr_const): Print TLS unspecs.
(prepare_pic_move): New function, replaces emit_pic_move.
(arc_legitimate_constant_p): Handle TLS unspecs.
(arc_legitimate_address_p): Likewise.
(arc_rewrite_small_data_p): Use assert for TLS constants.
(prepare_move_operands): Use prepare_pic_move.
(arc_legitimize_address): Legitimize tls addresses.
(arc_epilogue_uses): Check for arc_tp_regno.
(arc_eh_uses, insn_is_tls_gd_dispatch): New function.
* config/arc/arc.h [DEFAULT_LIBC != LIBC_UCLIBC] (EXTRA_SPECS):
Define.
[DEFAULT_LIBC != LIBC_UCLIBC] (ARC_TLS_EXTRA_START_SPEC):
Likewise.
[DEFAULT_LIBC != LIBC_UCLIBC] (STARTFILE_SPEC): Add
%(arc_tls_extra_start_spec).
(TARGET_CPU_CPP_BUILTINS): Define __ARC_TLS_REGNO__.
(REGNO_OK_FOR_BASE_P): Check for arc_tp_regno.
(EH_USES): Define.
(INSN_REFERENCES_ARE_DELAYED): Use insn_is_tls_gd_dispatch.
* config/arc/arc.md (UNSPEC_TLS_GD, UNSPEC_TLS_LD, UNSPEC_TLS_IE)
(UNSPEC_TLS_OFF): Add.
(R10_REG): Define.
(tls_load_tp_soft, tls_gd_load, tls_gd_get_addr, tls_gd_dispatch)
(get_thread_pointersi): New patterns.
* config/arc/arc.opt (mtp-regno): New option.
* config/arc/predicates.md (move_src_operand): Handle TLS symbols.
(move_dest_operand): Likewise.
* configure: Regenerate.
* configure.ac: Add arc*-*-* case to test for tls.
* doc/invoke.texi (ARC options): Document mtp-regno.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235559 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arc/arc.opt')
-rw-r--r-- | gcc/config/arc/arc.opt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index 2227b7554c3..76f66a2988b 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -456,3 +456,10 @@ Enum(arc_fpu) String(fpus_all) Value(FPU_SP | FPU_SC | FPU_SF | FPU_SD) EnumValue Enum(arc_fpu) String(fpud_all) Value(FPU_SP | FPU_SC | FPU_SF | FPU_SD | FPU_DP | FPU_DC | FPU_DF | FPU_DD) + +mtp-regno= +Target RejectNegative Joined UInteger Var(arc_tp_regno) Init(25) +Specify thread pointer register number + +mtp-regno=none +Target RejectNegative Var(arc_tp_regno,-1) |