From patchwork Tue Jul 24 11:17:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 172832 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 EED802C007D for ; Tue, 24 Jul 2012 21:18:14 +1000 (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=1343733495; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:CC:Subject:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=kqxjkhl23AsM5JwVn0kkGlr6VqU=; b=aEO5rCMlWES+mT0 kctZA9nEf/1cfEHoL31qDXP6aI3x5c1cxrc/pN8CNwrf3qYIY4UN9CuN72N6LmXZ oo++UWd0I5Dy5ttxuno/IzZyn9Sw7/CRhYA3RLMi5omBdiVmRQEYf5YqrdZle7jl Pilqy++dMjIGfiZVJkuB8QHchj6U= 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:Received:Date:From:To:CC:Subject:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=W1tHU8Awv4z5XwLdh0hyVhwJ8RPhlaf6FPiiAgENGbd9xDR8hR0LSbJHPLLJtc 4iuq7Y41KuDnhc7P41Oibo/MdafRys1RnUkQRWezERuGh31e9G7tmrmuKFav1DhD IDhJVrMMKSfhtJABW57XeNe06q+qW/p4YRHag3vztxjZI=; Received: (qmail 11904 invoked by alias); 24 Jul 2012 11:18:10 -0000 Received: (qmail 11895 invoked by uid 22791); 24 Jul 2012 11:18:08 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, TW_VF X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Jul 2012 11:17:51 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Std7e-00029Y-8C from Julian_Brown@mentor.com ; Tue, 24 Jul 2012 04:17:50 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 24 Jul 2012 04:17:51 -0700 Received: from octopus (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Tue, 24 Jul 2012 12:17:48 +0100 Date: Tue, 24 Jul 2012 12:17:42 +0100 From: Julian Brown To: Ramana Radhakrishnan CC: Richard Earnshaw , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH, ARM] Skip gcc.dg/torture/stackalign/builtin-apply-2.c for ARM hard-float ABI Message-ID: <20120724121742.1993f20a@octopus> In-Reply-To: References: <20120723131706.1c0af756@octopus> <500D546B.4060101@arm.com> <20120723164104.3db7aa66@octopus> MIME-Version: 1.0 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 On Mon, 23 Jul 2012 17:41:03 +0100 Ramana Radhakrishnan wrote: > On 23 July 2012 16:41, Julian Brown wrote: > > On Mon, 23 Jul 2012 14:40:59 +0100 > > Richard Earnshaw wrote: > > > >> On 23/07/12 13:17, Julian Brown wrote: > >> > Hi, > >> > > >> > The test case gcc.dg/torture/stackalign/builtin-apply-2.c makes > >> > assumptions which cannot be met for __builtin_apply for the ARM > >> > hard-float ABI variant. This patch simply skips the test in that > >> > case. > >> > > >> > Tested (stackalign.exp only) for ARMv4t > >> > -marm/-mthumb/-mfloat-abi=hard. The previously-failing test gets > >> > skipped as expected with the patch. (This is another one that > >> > we've had locally for a while.) > >> > >> Hmm, I think this won't work for platforms like fedora/arm, where > >> -mfloat-abi=hard is the default. > > > > Yes, you're probably right. Here's a new version, which still seems > > to work for my test environment. I'm not prepared to test a > > compiler which has the hard-float ABI turned on by default, but I > > think this should work in theory. > > > > (I didn't find an existing check_effective_target_ function > > suitable for this purpose, so I had to add one.) > > Unfortunately arm_hard_vfp_ok doesn't serve this purpose. This should > be documented in doc/sourcebuild.texi.( I will note that a number of > new effective_targets for the ARM port haven't made it in there but > that's a subject for a future patch but it would be better if we got > this one right :) ) > > Ok with appropriate documentation to sourcebuild.texi and checking > that the documentation builds fine. Thanks, I'll apply this version. Julian ChangeLog * doc/sourcebuild.texi (arm_hf_eabi): Document effective-target check. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_arm_hf_eabi): New. * gcc.dg/torture/stackalign/builtin-apply-2.c: Skip for hard-float ARM. Index: gcc/doc/sourcebuild.texi =================================================================== --- gcc/doc/sourcebuild.texi (revision 189803) +++ gcc/doc/sourcebuild.texi (working copy) @@ -1497,6 +1497,11 @@ ARM target generates 32-bit code. @item arm_eabi ARM target adheres to the ABI for the ARM Architecture. +@item arm_hf_eabi +ARM target adheres to the VFP and Advanced SIMD Register Arguments +variant of the ABI for the ARM Architecture (as selected with +@code{-mfloat-abi=hard}). + @item arm_hard_vfp_ok ARM target supports @code{-mfpu=vfp -mfloat-abi=hard}. Some multilibs may be incompatible with these options. Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 189803) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -2341,6 +2341,19 @@ proc check_effective_target_arm_eabi { } }] } +# Return 1 if this is an ARM target that adheres to the hard-float variant of +# the ABI for the ARM Architecture (e.g. -mfloat-abi=hard). + +proc check_effective_target_arm_hf_eabi { } { + return [check_no_compiler_messages arm_hf_eabi object { + #if !defined(__ARM_EABI__) || !defined(__ARM_PCS_VFP) + #error not hard-float EABI + #else + int dummy; + #endif + }] +} + # Return 1 if this is an ARM target supporting -mcpu=iwmmxt. # Some multilibs may be incompatible with this option. Index: gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c (revision 189803) +++ gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c (working copy) @@ -5,6 +5,8 @@ with pre-pushed arguments (e.g. SPARC). */ /* { dg-do run } */ + +/* { dg-skip-if "Variadic funcs use Base AAPCS. Normal funcs use VFP variant." { arm_hf_eabi } } */ #define INTEGER_ARG 5