+2012-09-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/54445
+ * config/i386/predicates.md (x86_64_immediate_operand): Allow
+ negative offset for UNSPEC_DTPOFF/UNSPEC_NTPOFF.
+
2012-09-12 Jan Hubicka <jh@suse.cz>
* common.opt (flto-partition): Add "max".
{
case UNSPEC_DTPOFF:
case UNSPEC_NTPOFF:
- if (offset > 0
- && trunc_int_for_mode (offset, SImode) == offset)
+ if (trunc_int_for_mode (offset, SImode) == offset)
return true;
}
break;
+2012-09-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/54445
+ * gcc.target/i386/pr54445-1.c: New file.
+ * gcc.target/i386/pr54445-2.c: Likewise.
+
2012-09-12 Tobias Burnus <burnus@net-b.de>
PR fortran/54225
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+__thread unsigned char tls_array[64];
+
+unsigned char
+__attribute__ ((noinline))
+tls_array_lookup_with_negative_constant(long long int position) {
+ return tls_array[position - 1];
+}
+
+int
+main ()
+{
+ int i;
+
+ for (i = 0; i < sizeof (tls_array) / sizeof (tls_array[0]); i++)
+ tls_array[i] = i;
+
+ for (i = 0; i < sizeof (tls_array) / sizeof (tls_array[0]); i++)
+ if (i != tls_array_lookup_with_negative_constant (i + 1))
+ __builtin_abort ();
+ return 0;
+}
--- /dev/null
+/* { dg-do compile { target { *-*-linux* && { ! { ia32 } } } } } */
+/* { dg-options "-O2 -fno-pic" } */
+
+__thread unsigned char tls_array[64];
+
+unsigned char
+tls_array_lookup_with_negative_constant(long long int position) {
+ return tls_array[position - 1];
+}
+
+/* { dg-final { scan-assembler "mov(b|zbl)\[ \t\](%fs:)?tls_array@tpoff-1\\(%" } } */