From patchwork Tue Oct 23 09:42:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Shawcroft X-Patchwork-Id: 193408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DD76A2C007E for ; Tue, 23 Oct 2012 20:44:38 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351590279; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=m+FXN+ZgZf74cpa3UE7UWg96YP4=; b=oDCvgNo8I+nq4B+ 36VMSl9YIUAgksRsZraHFSa5so36OyEGcwZtsQ5P7Jqf0eOf9YvIhI47Jq0ZCioC L8lisWDCb4bDSP+6obpDQ1yDdZf8HOG5Zj/O0xvQCHVlmJdWBmQBnN3pLO4+79Gn QZT2zq8zh9eScG3f+B+VnbnPzm6M= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:X-MC-Unique:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rxv6A+e9L7rhA4NLGQQeh+j0PFXhP9O9Y/TXicTOL5M/UY/9aCz9Im5nPM9YI0 6gtacACBtrN+LWUIBBLKxY3rXJx0dftmXbuNcWwT468BklzxlbglqLQ358osf/sg 4hLU1wFDk5fo87FjVZ3cir7ruG/0tM3LhLJ9xpVHuVcWs=; Received: (qmail 8956 invoked by alias); 23 Oct 2012 09:43:01 -0000 Received: (qmail 8921 invoked by uid 22791); 23 Oct 2012 09:42:59 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_FN X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 09:42:40 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 23 Oct 2012 10:42:38 +0100 Received: from [10.1.72.50] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 23 Oct 2012 10:42:37 +0100 Message-ID: <5086668D.7050702@arm.com> Date: Tue, 23 Oct 2012 10:42:37 +0100 From: Marcus Shawcroft User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [PATCH] [4/10] AArch64 Port References: <50865E58.4020507@arm.com> <50865F45.2030707@arm.com> <50865F98.8020403@arm.com> <50865FF6.4040301@arm.com> In-Reply-To: <50865FF6.4040301@arm.com> X-MC-Unique: 112102310423804101 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. 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 */ /* { 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