Patchwork [4/10] AArch64 Port

login
register
mail settings
Submitter Marcus Shawcroft
Date Oct. 23, 2012, 9:42 a.m.
Message ID <5086668D.7050702@arm.com>
Download mbox | patch
Permalink /patch/193408/
State New
Headers show

Comments

Marcus Shawcroft - Oct. 23, 2012, 9:42 a.m.
This patch contains the adjustments to the existing test suite to
support AArch64.

Proposed ChangeLog:

          * lib/target-supports.exp
          (check_profiling_available): Add AArch64.
          (check_effective_target_vect_int): Likewise.
          (check_effective_target_vect_shift): Likewise.
          (check_effective_target_vect_float): Likewise.
          (check_effective_target_vect_double): Likewise.
          (check_effective_target_vect_widen_mult_qi_to_hi): Likewise.
          (check_effective_target_vect_widen_mult_hi_to_si): Likewise.
          (check_effective_target_vect_pack_trunc): Likewise.
          (check_effective_target_vect_unpack): Likewise.
          (check_effective_target_vect_hw_misalign): Likewise.
          (check_effective_target_vect_short_mult): Likewise.
          (check_effective_target_vect_int_mult): Likewise.
          (check_effective_target_vect_stridedN): Likewise.
          (check_effective_target_sync_int_long): Likewise.
          (check_effective_target_sync_char_short): Likewise.
          (check_vect_support_and_set_flags): Likewise.
          (check_effective_target_aarch64_tiny): New.
          (check_effective_target_aarch64_small): New.
          (check_effective_target_aarch64_large): New.
          * g++.dg/other/PR23205.C: Enable aarch64.
          * g++.dg/other/pr23205-2.C: Likewise.
          * g++.old-deja/g++.abi/ptrmem.C: Likewise.
          * gcc.c-torture/execute/20101011-1.c: Likewise.
          * gcc.dg/20020312-2.c: Likewise.
          * gcc.dg/20040813-1.c: Likewise.
          * gcc.dg/builtin-apply2.c: Likewise.
          * gcc.dg/stack-usage-1.c: Likewise.
Jeff Law - Oct. 23, 2012, 3:13 p.m.
On 10/23/2012 03:42 AM, Marcus Shawcroft wrote:
> This patch contains the adjustments to the existing test suite to
> support AArch64.
>
> Proposed ChangeLog:
>
>           * lib/target-supports.exp
>           (check_profiling_available): Add AArch64.
>           (check_effective_target_vect_int): Likewise.
>           (check_effective_target_vect_shift): Likewise.
>           (check_effective_target_vect_float): Likewise.
>           (check_effective_target_vect_double): Likewise.
>           (check_effective_target_vect_widen_mult_qi_to_hi): Likewise.
>           (check_effective_target_vect_widen_mult_hi_to_si): Likewise.
>           (check_effective_target_vect_pack_trunc): Likewise.
>           (check_effective_target_vect_unpack): Likewise.
>           (check_effective_target_vect_hw_misalign): Likewise.
>           (check_effective_target_vect_short_mult): Likewise.
>           (check_effective_target_vect_int_mult): Likewise.
>           (check_effective_target_vect_stridedN): Likewise.
>           (check_effective_target_sync_int_long): Likewise.
>           (check_effective_target_sync_char_short): Likewise.
>           (check_vect_support_and_set_flags): Likewise.
>           (check_effective_target_aarch64_tiny): New.
>           (check_effective_target_aarch64_small): New.
>           (check_effective_target_aarch64_large): New.
>           * g++.dg/other/PR23205.C: Enable aarch64.
>           * g++.dg/other/pr23205-2.C: Likewise.
>           * g++.old-deja/g++.abi/ptrmem.C: Likewise.
>           * gcc.c-torture/execute/20101011-1.c: Likewise.
>           * gcc.dg/20020312-2.c: Likewise.
>           * gcc.dg/20040813-1.c: Likewise.
>           * gcc.dg/builtin-apply2.c: Likewise.
>           * gcc.dg/stack-usage-1.c: Likewise.
This is good.  Please install.
jeff

Patch

diff --git a/gcc/testsuite/g++.dg/abi/aarch64_guard1.C b/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
index ...af82ad2ec36998135e67a25f47d19b4e977fd8d2 100644
--- a/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
+++ b/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
@@ -0,0 +1,17 @@ 
+// Check that the initialization guard variable is an 8-byte aligned,
+// 8-byte doubleword and that only the least significant bit is used
+// for initialization guard variables.
+// { dg-do compile { target aarch64*-*-* } }
+// { dg-options "-O -fdump-tree-original" }
+
+int bar();
+
+int *foo ()
+{
+  static int x = bar ();
+  return &x;
+}
+
+// { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 } }
+// { dg-final { scan-tree-dump "_ZGVZ3foovE1x & 1" "original" } }
+// { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/g++.dg/other/PR23205.C b/gcc/testsuite/g++.dg/other/PR23205.C
index a31fc1d773ddf0b21bdb219be2646c574923d7a5..e55710b40f0a0a69528ca4e27facff742ff2e4ad 100644
--- a/gcc/testsuite/g++.dg/other/PR23205.C
+++ b/gcc/testsuite/g++.dg/other/PR23205.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks } { "*" } { "" } } */
 /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types" } */
 
 const int foobar = 4;
diff --git a/gcc/testsuite/g++.dg/other/pr23205-2.C b/gcc/testsuite/g++.dg/other/pr23205-2.C
index fbd16dfab5836e4f0ceb987cbf42271d3728c63f..607e5a2b4e433a0fec79d3fda4dc265f1f8a39ae 100644
--- a/gcc/testsuite/g++.dg/other/pr23205-2.C
+++ b/gcc/testsuite/g++.dg/other/pr23205-2.C
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* } { "*" } { "" } } */
 /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */
 
 const int foobar = 4;
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C b/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
index 077fa50840c978f9c0dda8c0e7071eda514395b5..341735879c59d517edb1fc49edfb78c6e2e01846 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
@@ -7,7 +7,7 @@ 
    function.  However, some platforms use all bits to encode a
    function pointer.  Such platforms use the lowest bit of the delta,
    that is shifted left by one bit.  */
-#if defined __MN10300__ || defined __SH5__ || defined __arm__ || defined __thumb__ || defined __mips__
+#if defined __MN10300__ || defined __SH5__ || defined __arm__ || defined __thumb__ || defined __mips__ || defined __aarch64__
 #define ADJUST_PTRFN(func, virt) ((void (*)())(func))
 #define ADJUST_DELTA(delta, virt) (((delta) << 1) + !!(virt))
 #else
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
index b98454e253ef074b6219a83f0f9473f9dbc0188d..76b9f068723994dd3f0543a9a4ece4538cb676de 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -12,6 +12,10 @@ 
 #elif defined (__sh__)
   /* On SH division by zero does not trap.  */
 # define DO_TEST 0
+#elif defined (__aarch64__) && !defined(__linux__)
+  /* AArch64 divisions do trap by default, but libgloss targets do not
+     intercept the trap and raise a SIGFPE. So restrict the test to
+     AArch64 systems that use the Linux kernel.  */
 #elif defined (__TMS320C6X__)
   /* On TI C6X division by zero does not trap.  */
 # define DO_TEST 0
diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c
index 768e17e64cda63d12b75f3f40bbddffe4b1b1266..47c2d0fc64895d6ebd0691d49c28d981d29e1b10 100644
--- a/gcc/testsuite/gcc.dg/20020312-2.c
+++ b/gcc/testsuite/gcc.dg/20020312-2.c
@@ -92,6 +92,8 @@  extern void abort (void);
 # else
 #  define PIC_REG "gr17"
 #endif
+#elif defined (__aarch64__)
+/* No pic register -- yet.  */
 #else
 # error "Modify the test for your target."
 #endif
diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c
index e16344164d59f5a09a7e083669132eaac4c54d7e..c1a9fd0409abf4fee7b47c632c6decb4c8fd6a45 100644
--- a/gcc/testsuite/gcc.dg/20040813-1.c
+++ b/gcc/testsuite/gcc.dg/20040813-1.c
@@ -2,7 +2,7 @@ 
 /* Contributed by Devang Patel  <dpatel@apple.com>  */
 
 /* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks* } { "*" } { "" } } */
 /* { dg-options "-gstabs" } */
 
 int
diff --git a/gcc/testsuite/gcc.dg/builtin-apply2.c b/gcc/testsuite/gcc.dg/builtin-apply2.c
index c5b841a849689648d32e11eb9a7530350bd1a57e..7061b1041ce371b742e746313b141a20d1f5491c 100644
--- a/gcc/testsuite/gcc.dg/builtin-apply2.c
+++ b/gcc/testsuite/gcc.dg/builtin-apply2.c
@@ -1,5 +1,5 @@ 
 /* { dg-do run } */
-/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "avr-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "aarch64*-*-* avr-*-* " } { "*" } { "" } } */
 /* { dg-skip-if "Variadic funcs use Base AAPCS.  Normal funcs use VFP variant." { "arm*-*-*" } { "-mfloat-abi=hard" } { "" } } */
 
 /* PR target/12503 */
diff --git a/gcc/testsuite/gcc.dg/stack-usage-1.c b/gcc/testsuite/gcc.dg/stack-usage-1.c
index d5cf487979f1d655c645e902163cfe75ce5cc469..b6524f9a1255566d70eee6afcd206381867e88ed 100644
--- a/gcc/testsuite/gcc.dg/stack-usage-1.c
+++ b/gcc/testsuite/gcc.dg/stack-usage-1.c
@@ -7,7 +7,9 @@ 
    function FOO is reported as 256 or 264 in the stack usage (.su) file.
    Then check that this is the actual stack usage in the assembly file.  */
 
-#if defined(__i386__)
+#if defined(__aarch64__)
+#  define SIZE 256 /* No frame pointer for leaf functions (default) */
+#elif defined(__i386__)
 #  define SIZE 248
 #elif defined(__x86_64__)
 #  ifndef _WIN64