i386.c (x86_64_sign_extended_value): Return false from tls variables.
authorJan Hubicka <jh@suse.cz>
Fri, 7 Nov 2003 09:26:06 +0000 (10:26 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 7 Nov 2003 09:26:06 +0000 (09:26 +0000)
* i386.c (x86_64_sign_extended_value):  Return false from tls variables.
(x86_64_zero_extended_value):  likewise.

From-SVN: r73334

gcc/ChangeLog
gcc/config/i386/i386.c

index 565c30a472f862989e66678e669b12532e40b5a1..b990bc5c0a56f9bf0de2acf3abc3fc4bc5be4e9e 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-07  Jan Hubicka  <jh@suse.cz>
+
+       * i386.c (x86_64_sign_extended_value):  Return false from tls variables.
+       (x86_64_zero_extended_value):  likewise.
+
 2003-11-07  Richard Sandiford  <rsandifo@redhat.com>
 
        * config/mips/mips.md (loadgp): Take $25 as a second operand.
index 8e8785a2ac13e1e905733541972238a995014240..744f5213c9a588ce6108975dea755064d5595c60 100644 (file)
@@ -4473,6 +4473,9 @@ x86_64_sign_extended_value (rtx value)
         library.  Don't count TLS SYMBOL_REFs here, since they should fit
         only if inside of UNSPEC handled below.  */
       case SYMBOL_REF:
+       /* TLS symbols are not constant.  */
+       if (tls_symbolic_operand (value, Pmode))
+         return false;
        return (ix86_cmodel == CM_SMALL || ix86_cmodel == CM_KERNEL);
 
       /* For certain code models, the code is near as well.  */
@@ -4578,6 +4581,9 @@ x86_64_zero_extended_value (rtx value)
 
       /* For certain code models, the symbolic references are known to fit.  */
       case SYMBOL_REF:
+       /* TLS symbols are not constant.  */
+       if (tls_symbolic_operand (value, Pmode))
+         return false;
        return ix86_cmodel == CM_SMALL;
 
       /* For certain code models, the code is near as well.  */