2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-12-14 Wilco Dijkstra <wdijkstr@arm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78796
+ * config/aarch64/aarch64.c (aarch64_classify_symbol): Merge large
+ model checks into switch.
+
2016-11-28 Jakub Jelinek <jakub@redhat.com>
PR fortran/78298
if (GET_CODE (x) == SYMBOL_REF)
{
- if (aarch64_cmodel == AARCH64_CMODEL_LARGE)
- return SYMBOL_FORCE_TO_MEM;
-
if (aarch64_tls_symbol_p (x))
return aarch64_classify_tls_symbol (x);
return SYMBOL_SMALL_GOT;
return SYMBOL_SMALL_ABSOLUTE;
+ case AARCH64_CMODEL_LARGE:
+ return SYMBOL_FORCE_TO_MEM;
+
default:
gcc_unreachable ();
}
2017-05-30 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2016-12-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78796
+ * gcc.dg/tls/pr78796.c: New test.
+
2016-12-02 Jakub Jelinek <jakub@redhat.com>
PR c++/78649
--- /dev/null
+/* PR target/78796 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mcmodel=large" { target aarch64-*-* } } */
+/* { dg-require-effective-target tls } */
+
+struct S { int a, b, c, d, e; };
+struct S t;
+__thread struct S s;
+
+__attribute__((used, noinline, noclone)) void
+foo (int *x, int *y)
+{
+ asm volatile ("" : : "g" (x), "g" (y) : "memory");
+ if (*x != 1 || *y != 2)
+ __builtin_abort ();
+}
+
+__attribute__((used, noinline, noclone)) void
+bar (void)
+{
+ foo (&t.c, &s.c);
+}
+
+int
+main ()
+{
+ t.c = 1;
+ s.c = 2;
+ bar ();
+ return 0;
+}