Commit b8b3f0ca by Leif Ekblad Committed by Uros Bizjak

i386.c (ix86_decompose_address): Use DEFAULT_TLS_SEG_REG to access TLS segment register.

	* 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.

From-SVN: r198948
parent 4722d005
2013-05-15 Leif Ekblad <leif@rdos.net>
* 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.
2013-05-15 Richard Sandiford <rdsandiford@googlemail.com> 2013-05-15 Richard Sandiford <rdsandiford@googlemail.com>
PR target/57260 PR target/57260
......
...@@ -11698,7 +11698,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out) ...@@ -11698,7 +11698,7 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
if (XINT (op, 1) == UNSPEC_TP if (XINT (op, 1) == UNSPEC_TP
&& TARGET_TLS_DIRECT_SEG_REFS && TARGET_TLS_DIRECT_SEG_REFS
&& seg == SEG_DEFAULT) && seg == SEG_DEFAULT)
seg = TARGET_64BIT ? SEG_FS : SEG_GS; seg = DEFAULT_TLS_SEG_REG;
else else
return 0; return 0;
break; break;
...@@ -13650,7 +13650,7 @@ ix86_delegitimize_tls_address (rtx orig_x) ...@@ -13650,7 +13650,7 @@ ix86_delegitimize_tls_address (rtx orig_x)
if (GET_CODE (x) != PLUS || GET_MODE (x) != Pmode) if (GET_CODE (x) != PLUS || GET_MODE (x) != Pmode)
return orig_x; return orig_x;
if (ix86_decompose_address (x, &addr) == 0 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 || addr.disp == NULL_RTX
|| GET_CODE (addr.disp) != CONST) || GET_CODE (addr.disp) != CONST)
return orig_x; return orig_x;
...@@ -543,6 +543,9 @@ extern tree x86_mfence; ...@@ -543,6 +543,9 @@ extern tree x86_mfence;
/* The default abi used by target. */ /* The default abi used by target. */
#define DEFAULT_ABI SYSV_ABI #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 /* Subtargets may reset this to 1 in order to enable 96-bit long double
with the rounding mode forced to 53 bits. */ with the rounding mode forced to 53 bits. */
#define TARGET_96_ROUND_53_LONG_DOUBLE 0 #define TARGET_96_ROUND_53_LONG_DOUBLE 0
......
...@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3. If not see
#undef TARGET_EXECUTABLE_SUFFIX #undef TARGET_EXECUTABLE_SUFFIX
#define TARGET_EXECUTABLE_SUFFIX ".exe" #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 #undef TARGET_RDOS
#define TARGET_RDOS 1 #define TARGET_RDOS 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment