Remove __seg_tls before first release.

* 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.
testsuite/
  * gcc.target/i386/addr-space-3.c: Remove test.

From-SVN: r233639
This commit is contained in:
Richard Henderson 2016-02-23 10:05:14 -08:00 committed by Richard Henderson
parent 196440f844
commit 162cc7e383
7 changed files with 16 additions and 79 deletions

View File

@ -1,3 +1,14 @@
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

View File

@ -591,7 +591,6 @@ ix86_target_macros (void)
cpp_define (parse_in, "__SEG_FS");
cpp_define (parse_in, "__SEG_GS");
cpp_define (parse_in, "__SEG_TLS");
}
@ -608,7 +607,6 @@ ix86_register_pragmas (void)
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 ();

View File

@ -332,4 +332,3 @@ struct ix86_first_cycle_multipass_data_
const addr_space_t ADDR_SPACE_SEG_FS = 1;
const addr_space_t ADDR_SPACE_SEG_GS = 2;
const addr_space_t ADDR_SPACE_SEG_TLS = 3;

View File

@ -17395,8 +17395,6 @@ ix86_print_operand_address_as (FILE *file, rtx addr,
{
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)
@ -54256,54 +54254,8 @@ ix86_optab_supported_p (int op, machine_mode mode1, machine_mode,
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. */

View File

@ -1473,23 +1473,6 @@ that it installed previously.
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

View File

@ -1,3 +1,7 @@
2016-02-23 Richard Henderson <rth@redhat.com>
* gcc.target/i386/addr-space-3.c: Remove test.
2016-02-23 David Malcolm <dmalcolm@redhat.com>
PR preprocessor/69126

View File

@ -1,10 +0,0 @@
/* { dg-do compile } */
/* { dg-options "-O" } */
/* { dg-final { scan-assembler "\[fg]s:0" } } */
void test(int *y)
{
int *x = (int __seg_tls *)0;
if (x == y)
asm("");
}