From patchwork Wed Jul 6 17:58:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janis Johnson X-Patchwork-Id: 103558 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 0E87DB6EDF for ; Thu, 7 Jul 2011 03:58:05 +1000 (EST) Received: (qmail 20082 invoked by alias); 6 Jul 2011 17:58:04 -0000 Received: (qmail 20072 invoked by uid 22791); 6 Jul 2011 17:58:03 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 17:57:50 +0000 Received: (qmail 24613 invoked from network); 6 Jul 2011 17:57:49 -0000 Received: from unknown (HELO ?192.168.1.5?) (janisjo@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Jul 2011 17:57:49 -0000 Message-ID: <4E14A231.7050303@codesourcery.com> Date: Wed, 06 Jul 2011 10:58:09 -0700 From: Janis Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" Subject: [testsuite] fixes for gcc.target/arm/mla-1.c 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 Test gcc.target/arm/mla-1.c scans the assembly file for a string that is part of the name, which always succeeds. This patch adds a tab to the search target to avoid that. It also removes the -march option and pruning of warnings about conflicts, and restricts the tests to targets that support Thumb-2, with support for new effective target arm_thumb2. Changes to the comment for arm_thumb1 support clarify the difference between it and arm_thumb1_ok. OK for trunk, and for 4.6 in a few days if no problems? 2011-07-06 Janis Johnson * lib/target-supports.exp (check_effective_target_arm_thumb1): New. (check_effective_target_arm_thumb2): Clarify comment, add valid code. * gcc.target/arm/mla-1.c: Skip for arm_thumb1, don't specify -march, add tab to scan target. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 175921) +++ lib/target-supports.exp (working copy) @@ -2027,13 +2039,27 @@ } "-mthumb"] } -# Return 1 is this is an ARM target where is Thumb-2 used. +# Return 1 if this is an ARM target where Thumb-1 is used without options +# added by the test. +proc check_effective_target_arm_thumb1 { } { + return [check_no_compiler_messages arm_thumb1 assembly { + #if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__) + #error not thumb1 + #endif + int i; + } ""] +} + +# Return 1 if this is an ARM target where Thumb-2 is used without options +# added by the test. + proc check_effective_target_arm_thumb2 { } { return [check_no_compiler_messages arm_thumb2 assembly { #if !defined(__thumb2__) #error FOO #endif + int i; } ""] } Index: gcc.target/arm/mla-1.c =================================================================== --- gcc.target/arm/mla-1.c (revision 175921) +++ gcc.target/arm/mla-1.c (working copy) @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv5te" } */ -/* { dg-prune-output "switch .* conflicts with" } */ +/* { dg-skip-if "" { arm_thumb1 } { "*" } { "" } } */ +/* { dg-options "-O2" } */ int @@ -19,4 +19,4 @@ return accum; } -/* { dg-final { scan-assembler "mla" } } */ +/* { dg-final { scan-assembler "mla\\t" } } */