summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-15 20:35:29 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-15 20:35:29 +0000
commit93d015a03ed467148048ccb58c08622c0c5ed082 (patch)
treeb07a4b13ff1d40aa6d38d8ec735909f99ab99fc1 /gcc/config
parent611894d11cc044ebccf44b2ad2a8a63e07ecbb84 (diff)
downloadgcc-93d015a03ed467148048ccb58c08622c0c5ed082.tar.gz
* config/i386/i386.c (ix86_decompose_address): Use
DEFAULT_TLS_SEG_REG to access TLS segment register. * config/i386/i386.h (DEFAULT_TLS_SEG_REG): New define. * config/i386/rdos.h (DEFAULT_TLS_SEG_REG): Ditto. (TARGET_TLS_DIRECT_SEG_REFS_DEFAULT): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198948 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.c4
-rw-r--r--gcc/config/i386/i386.h3
-rw-r--r--gcc/config/i386/rdos.h6
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 27684f6bbb1..a4f30e8d3e0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -11698,7 +11698,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
if (XINT (op, 1) == UNSPEC_TP
&& TARGET_TLS_DIRECT_SEG_REFS
&& seg == SEG_DEFAULT)
- seg = TARGET_64BIT ? SEG_FS : SEG_GS;
+ seg = DEFAULT_TLS_SEG_REG;
else
return 0;
break;
@@ -13650,7 +13650,7 @@ ix86_delegitimize_tls_address (rtx orig_x)
if (GET_CODE (x) != PLUS || GET_MODE (x) != Pmode)
return orig_x;
if (ix86_decompose_address (x, &addr) == 0
- || addr.seg != (TARGET_64BIT ? SEG_FS : SEG_GS)
+ || addr.seg != DEFAULT_TLS_SEG_REG
|| addr.disp == NULL_RTX
|| GET_CODE (addr.disp) != CONST)
return orig_x;
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 1e03635091b..6055b99a55b 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -543,6 +543,9 @@ extern tree x86_mfence;
/* The default abi used by target. */
#define DEFAULT_ABI SYSV_ABI
+/* The default TLS segment register used by target. */
+#define DEFAULT_TLS_SEG_REG (TARGET_64BIT ? SEG_FS : SEG_GS)
+
/* Subtargets may reset this to 1 in order to enable 96-bit long double
with the rounding mode forced to 53 bits. */
#define TARGET_96_ROUND_53_LONG_DOUBLE 0
diff --git a/gcc/config/i386/rdos.h b/gcc/config/i386/rdos.h
index b67c1529037..b7242bbc445 100644
--- a/gcc/config/i386/rdos.h
+++ b/gcc/config/i386/rdos.h
@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see
#undef TARGET_EXECUTABLE_SUFFIX
#define TARGET_EXECUTABLE_SUFFIX ".exe"
+#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
+#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
+
+#undef DEFAULT_TLS_SEG_REG
+#define DEFAULT_TLS_SEG_REG SEG_GS
+
#undef TARGET_RDOS
#define TARGET_RDOS 1