diff options
author | bwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-19 00:18:42 +0000 |
---|---|---|
committer | bwilson <bwilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-09-19 00:18:42 +0000 |
commit | c656b8fda2b22fa00e7aacf132702ddef2a140f3 (patch) | |
tree | a196eef4130a81ffbab10ca6a0aa591ab52731ad /gcc/config/xtensa/xtensa.h | |
parent | cc04a47dd74aa6268875f088eb29da97d45e6322 (diff) | |
download | gcc-c656b8fda2b22fa00e7aacf132702ddef2a140f3.tar.gz |
* configure.ac: Add HAVE_AS_TLS check for Xtensa.
* config/xtensa/predicates.md (tls_symbol_operand): New.
* config/xtensa/xtensa.c (TARGET_HAVE_TLS): Define.
(TARGET_CANNOT_FORCE_MEM): Define.
(xtensa_tls_symbol_p): New.
(xtensa_emit_move_sequence): Check for and legitimize TLS addresses.
(xtensa_legitimate_address_p): Disallow constant pool TLS references.
(xtensa_tls_module_base): New.
(xtensa_call_tls_desc): New.
(xtensa_legitimize_tls_address): New.
(xtensa_legitimize_address): Handle TLS symbols.
(xtensa_tls_referenced_p_1): New.
(xtensa_tls_referenced_p): New.
(xtensa_output_addr_const_extra): Handle UNSPEC_TPOFF and UNSPEC_DTPOFF.
(XTENSA_BUILTIN_THREAD_POINTER): New.
(XTENSA_BUILTIN_SET_THREAD_POINTER): New.
(xtensa_init_builtins): Set NOTHROW and READONLY for umulsidi3 builtin.
Add declarations for __builtin_thread_pointer and
__builtin_set_thread_pointer.
(xtensa_fold_builtin): Recognize new builtins.
(xtensa_expand_builtin): Expand new builtins.
* config/xtensa/xtensa.h (XCHAL_HAVE_THREADPTR): Define default value.
(TARGET_THREADPTR): Define.
(HAVE_AS_TLS): Define default value.
(LEGITIMATE_CONSTANT_P): Disallow TLS references.
* config/xtensa/xtensa.md (UNSPEC_TPOFF, UNSPEC_DTPOFF): New.
(UNSPEC_TLS_FUNC, UNSPEC_TLS_ARG, UNSPEC_TLS_CALL, UNSPEC_TP): New.
(UNSPECV_SET_TP): New.
(sym_TPOFF, sym_DTPOFF): New.
(load_tp, set_tp, tls_func, tls_arg, tls_call): New.
* config/xtensa/xtensa-protos.h (xtensa_tls_referenced_p): Declare.
* configure: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140482 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/xtensa/xtensa.h')
-rw-r--r-- | gcc/config/xtensa/xtensa.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index ab3b648ffa4..1427fd0e3da 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -51,6 +51,9 @@ extern unsigned xtensa_current_frame_size; #ifndef XCHAL_HAVE_S32C1I #define XCHAL_HAVE_S32C1I 0 #endif +#ifndef XCHAL_HAVE_THREADPTR +#define XCHAL_HAVE_THREADPTR 0 +#endif #define TARGET_BIG_ENDIAN XCHAL_HAVE_BE #define TARGET_DENSITY XCHAL_HAVE_DENSITY #define TARGET_MAC16 XCHAL_HAVE_MAC16 @@ -72,11 +75,16 @@ extern unsigned xtensa_current_frame_size; #define TARGET_RELEASE_SYNC XCHAL_HAVE_RELEASE_SYNC #define TARGET_S32C1I XCHAL_HAVE_S32C1I #define TARGET_ABSOLUTE_LITERALS XSHAL_USE_ABSOLUTE_LITERALS +#define TARGET_THREADPTR XCHAL_HAVE_THREADPTR #define TARGET_DEFAULT \ ((XCHAL_HAVE_L32R ? 0 : MASK_CONST16) | \ MASK_SERIALIZE_VOLATILE) +#ifndef HAVE_AS_TLS +#define HAVE_AS_TLS 0 +#endif + #define OVERRIDE_OPTIONS override_options () /* Reordering blocks for Xtensa is not a good idea unless the compiler @@ -791,7 +799,7 @@ typedef struct xtensa_args /* Nonzero if the constant value X is a legitimate general operand. It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */ -#define LEGITIMATE_CONSTANT_P(X) 1 +#define LEGITIMATE_CONSTANT_P(X) (! xtensa_tls_referenced_p (X)) /* A C expression that is nonzero if X is a legitimate immediate operand on the target machine when generating position independent |