+2016-02-23 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386-c.c (ix86_target_macros): Remove __SEG_TLS.
+ (ix86_register_pragmas): Remove __seg_tls.
+ * config/i386/i386-protos.h (ADDR_SPACE_SEG_TLS): Remove.
+ * config/i386/i386.c (ix86_print_operand_address_as): Don't handle it.
+ (ix86_addr_space_subset_p, TARGET_ADDR_SPACE_SUBSET_P): Remove.
+ (ix86_addr_space_convert, TARGET_ADDR_SPACE_CONVERT): Remove.
+ (ix86_addr_space_debug, TARGET_ADDR_SPACE_DEBUG): Remove.
+ * doc/extend.texi (__seg_tls): Remove item.
+
2016-02-23 Richard Biener <rguenther@suse.de>
* alloc-pool.h (struct allocation_object): Make id member
cpp_define (parse_in, "__SEG_FS");
cpp_define (parse_in, "__SEG_GS");
- cpp_define (parse_in, "__SEG_TLS");
}
\f
c_register_addr_space ("__seg_fs", ADDR_SPACE_SEG_FS);
c_register_addr_space ("__seg_gs", ADDR_SPACE_SEG_GS);
- c_register_addr_space ("__seg_tls", ADDR_SPACE_SEG_TLS);
#ifdef REGISTER_SUBTARGET_PRAGMAS
REGISTER_SUBTARGET_PRAGMAS ();
{
const char *string;
- if (as == ADDR_SPACE_SEG_TLS)
- as = DEFAULT_TLS_SEG_REG;
if (as == ADDR_SPACE_SEG_FS)
string = (ASSEMBLER_DIALECT == ASM_ATT ? "%fs:" : "fs:");
else if (as == ADDR_SPACE_SEG_GS)
without resorting to a system call, we cannot convert a
non-default address space to a default address space.
Therefore we do not claim %fs or %gs are subsets of generic.
- (e) However, __seg_tls uses UNSPEC_TP as the base (which itself is
- stored at __seg_tls:0) so we can map between tls and generic. */
-static bool
-ix86_addr_space_subset_p (addr_space_t subset, addr_space_t superset)
-{
- return (subset == superset
- || (superset == ADDR_SPACE_GENERIC
- && subset == ADDR_SPACE_SEG_TLS));
-}
-#undef TARGET_ADDR_SPACE_SUBSET_P
-#define TARGET_ADDR_SPACE_SUBSET_P ix86_addr_space_subset_p
-
-static rtx
-ix86_addr_space_convert (rtx op, tree from_type, tree to_type)
-{
- addr_space_t from_as = TYPE_ADDR_SPACE (TREE_TYPE (from_type));
- addr_space_t to_as = TYPE_ADDR_SPACE (TREE_TYPE (to_type));
-
- /* Conversion between SEG_TLS and GENERIC is handled by adding or
- subtracting the thread pointer. */
- if ((from_as == ADDR_SPACE_GENERIC && to_as == ADDR_SPACE_SEG_TLS)
- || (from_as == ADDR_SPACE_SEG_TLS && to_as == ADDR_SPACE_GENERIC))
- {
- machine_mode mode = GET_MODE (op);
- if (mode == VOIDmode)
- mode = ptr_mode;
- rtx tp = get_thread_pointer (mode, optimize || mode != ptr_mode);
- return expand_binop (mode, (to_as == ADDR_SPACE_GENERIC
- ? add_optab : sub_optab),
- op, tp, NULL, 1, OPTAB_WIDEN);
- }
-
- return op;
-}
-#undef TARGET_ADDR_SPACE_CONVERT
-#define TARGET_ADDR_SPACE_CONVERT ix86_addr_space_convert
-
-static int
-ix86_addr_space_debug (addr_space_t as)
-{
- /* Fold __seg_tls to __seg_fs or __seg_gs for debugging. */
- if (as == ADDR_SPACE_SEG_TLS)
- as = DEFAULT_TLS_SEG_REG;
- return as;
-}
-#undef TARGET_ADDR_SPACE_DEBUG
-#define TARGET_ADDR_SPACE_DEBUG ix86_addr_space_debug
+ Therefore we can (mostly) use the default hooks. */
/* All use of segmentation is assumed to make address 0 valid. */
The preprocessor symbols @code{__SEG_FS} and @code{__SEG_GS} are
defined when these address spaces are supported.
-
-@item __seg_tls
-@cindex @code{__seg_tls} x86 named address space
-Some operating systems define either the @code{%fs} or @code{%gs}
-segment as the thread-local storage base for each thread. Objects
-within this address space are accessed with the appropriate
-segment override prefix.
-
-The pointer located at address 0 within the segment contains the
-offset of the segment within the generic address space. Thus this
-address space is considered a subspace of the generic address space,
-and the known segment offset is applied when converting addresses
-to and from the generic address space.
-
-The preprocessor symbol @code{__SEG_TLS} is defined when this
-address space is supported.
-
@end table
@node Zero Length