From patchwork Fri Dec 8 14:53:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 846297 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-468794-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dRxcP6aD"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ytb2T3hGPz9sPm for ; Sat, 9 Dec 2017 01:53:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=HdPTY3AFKcdgp2Y4e82Nbn6++WEmnLvqWIM7kUbMD0ByfGiNk6 FLIzlYdDw4k/fe9el6dJHvQT0HiM7hkvf7sm7EMiT0atISppamp9QtJyPqbZyqDY bI6GUIfulE2HbiZeKlzJQ3eYqP7yegXOsLEm6aCAMmF8xrWlRaAuD+OPM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=8YXGdv8NBpYf7irst4Tg3WFz1Jo=; b=dRxcP6aDBp2U+pooUxG3 HdV+ghnrlMqtsi6FZ1xdOINPhWpfXEgXksP7jQDs9OnyiT1vFLeRAtFbCvwxi4oY chAUum8fO27c0fMhfSXkTdooYD2AiONtexB5JnRDnP2ojOuQTokVf7HzOW+Eq7wd KU9U2JMfVBHeWV8ZaUrRLE0= Received: (qmail 61537 invoked by alias); 8 Dec 2017 14:53:29 -0000 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 Received: (qmail 61526 invoked by uid 89); 8 Dec 2017 14:53:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR01-HE1-obe.outbound.protection.outlook.com Received: from mail-he1eur01on0079.outbound.protection.outlook.com (HELO EUR01-HE1-obe.outbound.protection.outlook.com) (104.47.0.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 Dec 2017 14:53:27 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Tamar.Christina@arm.com; Received: from arm.com (217.140.96.140) by DB5PR08MB0503.eurprd08.prod.outlook.com (2a01:111:e400:5813::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.260.4; Fri, 8 Dec 2017 14:53:22 +0000 Date: Fri, 8 Dec 2017 14:53:19 +0000 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, Ramana.Radhakrishnan@arm.com, Richard.Earnshaw@arm.com, nickc@redhat.com, Kyrylo.Tkachov@arm.com, christophe.lyon@linaro.org Subject: [PATCH][GCC][ARM] Fix failing testcase pragma_fpu_attribute.c Message-ID: <20171208145315.GA25009@arm.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-ClientProxiedBy: CWLP265CA0019.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:10::31) To DB5PR08MB0503.eurprd08.prod.outlook.com (2a01:111:e400:5813::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e5c74510-3e77-4d98-5b66-08d53e4b6de3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(49563074); SRVR:DB5PR08MB0503; X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0503; 3:wMIrnRDtWnzWZC1Fi+oMujaHLGq7fEYgXFDrsQwj4mlz5dQp5H5DkV64g3XBqBDIdWNfweqjwNgoBYolnd0Glh4pvcAsx5tJZmkpKEzbXHSODSesaIqUjqnAT6yZUWrLTDHtFTvnsTIFCoA35UJNchWPXhIGEByn2IeYWBchMI4BiCjQ7/nM7vO9r7eiWey15WsO9976Qi9lTduDGhRuN5tLSKPd/xLSPwBirdH4y609XpDVsRpB/UyzNddrI0Q2; 25:K2aaS88omTeIKlUhD+s7dyClq2VeJDSKsKXvqZO2QgDk1ciIxBGwGTcZuuk6WPN1q+9uqgvVWTBZ50gdGPcSL3aOnrc/5AaUlGBCdHPPZDEUCO5AaMVjoB1PLeOH+J955Xxu/dZ3GsB6xJ3RId7DrSBhdc6oXDLYkEuLLYdIneCMyVfdKWkL0QKzDZA+kUgfhYxhngva+lZmnn5Hbab997jhZgU4Pl/pVdUkvnGXmV/JjK55bDc89Vb73Fji6Q/hppxRg0d/R3JVmayOPEc3q6MpWjvmuSGcFI47FPZnXdfUu6Ln1C14f0YMpzwYRu/sEQUYndcZO8NeIZovopaASw==; 31:VihFIoBxNMtvJmRxGZ/JQVomFr92kwcHh/ubxFmXCshfsfGN4M6VS0suP7bdcb0KYNZtyYJYipHtXl3SqVPzTCpbnswx/tSSfzKRLAqjl6JDFEFlkus66iFBsJEKXqBO0ji95zvX0TjifRE2oG+YaR2NQlB6SM6F++sRiLeGma14VBo1Z/FHIbECly6mDjWNFEdkvWgquHz8p5E8KWqcUz8ytWW/5drVZQ3KSu2s3ew= X-MS-TrafficTypeDiagnostic: DB5PR08MB0503: X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0503; 20:OCqtVcdogsz7L7Rf2haoci6pdcL9xqal/hJzMIpY845mEKAClihjC70bq7EMLmUBiWVBmBq3Scn7A+r70tbhtgFih1I7RIRoBjngnGEDenkpJ8tSq/VuSmysWFtCPlxjzT31usmwMGwzYto8Z53MsijVhmDrUcwb0TnxYOSaX2A=; 4:PrAXRNMxj3A4NHKdSaxIyLVIZ6YRJ/iK40Mn8URQ0JHZ3alXBHxsSte6yp+P/0Q5bA8CLEv714uY8voEu6H4UVjwNsN9YZo6qVa04W/R0yGuwoPVSFEuhFkGbVdutJk6PyQfajMoiUxXWlBngjrF/2bzrf+Gmj9yfZm9ZiFjYJU5kmNOliDs8+GpeTC4AzaxfDsX1tRGybQrIv9VdK7d+eYn9JbUXjBYjf4TyeBxK3iSDikC1ZKd22/TiQjLYtY7FQdXi+fiENaGNwGRJ+vjc6SvtnMrxpzqz7/apiyNF1DNv+ydbvmU5zek1cCHKvGx X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231022)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(6072148)(201708071742011); SRVR:DB5PR08MB0503; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DB5PR08MB0503; X-Forefront-PRVS: 0515208626 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(376002)(346002)(53754006)(189003)(199004)(377424004)(478600001)(81166006)(16526018)(3846002)(305945005)(6116002)(66066001)(68736007)(86362001)(4610100001)(81156014)(8676002)(84326002)(58126008)(8936002)(7736002)(16586007)(6666003)(2906002)(6916009)(33964004)(36756003)(44144004)(21086003)(7696005)(25786009)(106356001)(2351001)(4326008)(2361001)(5660300001)(97736004)(83506002)(72206003)(5890100001)(1076002)(568964002)(55016002)(2476003)(105586002)(5000100001)(316002)(33656002)(52116002)(53936002)(18370500001)(2700100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR08MB0503; H:arm.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; DB5PR08MB0503; 23:d7nWViPK9t70dUGPaW9ljs6hdsn1/Hxtbr3YCEfN/5w4Z44MB7H4m2I9uaw6XIQSFjrUk5ubbawDw3n4OtjoYI5LBDD5dqaDM9CU0/UG0m/SAq80sJIU2aEMn8Dbvb5TA3Wxw0XOhGhEShMjb5pGfdq06eJZcIv7xpuQELZAScTwriGoEMcdUJ2Hud4w5SPx2IzsG5kI9Yn16o60EWUQ6uI7Leztg3l/q8Kxs2Evy1kZGgExkzHs2OUQtG71cF12iviI2NiT79wftu05ySK2RtW1Og4zf/KZB0mLbbBcWWNIkH9MVy/J1Ms75CViVv1uk+wWLkoLDsEsbILh12UW/AKksS5M9MxMgdtHYGNa4dIwlpdd8sIfb833Sd1xSPIniHj3tmtbBAcTXW7Ca4HRkOmCfphkn8gjud9wGO1PUSziAwpTARAEfpdINOCKO96l0mDaDZ0x1hgWvYyIy78mK/lzz1kZCjpesPPjZ/4CtoGG0KXahk2IxXLQ6DkjWWJLjW4pEw0vnkm/yt6Ox86sgfris7Pky5qIhIaxwX0STIWTyNd7S6PR5yuv8NF0w5FWLo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WKJZTzTX14a//QyJ2FSDgGIKFn2hZNvbEoyHUsNWq7lI=; 5:mwaZKikwO4mrZ3XHbHQGjmZiSnkZ+A97lE8BKA/ooS0dD4XmUSsBgW/bZvl/Fj9r+cpc12xec+KP0wJw6toSaVGDZASUY7u8Rk6nactI3+poz1JPDzkCu8+pwLFa3cMuogUI7BdecpM+yS6i6xRdFQMmc3qRNcT0MwfIDKULovs=; 24:iWnzbjx5tSjkqyWWmXIYo1gCyZX3+taBd2HuxtqfmNaA7QXdG369iu54lnddL/lPoTtQsMkDzaA8KE2RI+qhAiz9hOZiSK1FbpQ8cR7sliQ=; 7:R66K2Nsw2cuOCBaUL82A/8LPGfsEre+TobP1vVtMQvWnQ+hWqVulkZJLPlum7Pob3fCNbp5Xg7mq+jbAe/lXgoRIEfOU9b61M1/TD/OhPHL9nVViiTtxptPLd/sIBlHeoB3wkJ51mrvjZtUiuHasW8pNJxRkfLOkx0mL6m8gNRi0u+g04x2zoqkcd39jIbviRaGwikZODcD3EI+lpkQsQDeODlAClrI9ISFSzR0Id2GNpxhmQ+X3uOvzpjMK56nn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2017 14:53:22.4566 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e5c74510-3e77-4d98-5b66-08d53e4b6de3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB0503 X-IsSubscribed: yes Hi All, My previous patch had two issues with the new test cases. It seems that depending on which DejaGnu version you have dg-additional-options will add the options before or after the ones added by the test suite. Which means I can't use it to override the default options. For this I use a pragma now and place the pragma before GCC needs to emit any code. Which in turn means it doesn't emit the .fpu directive for the first switching of fpus. Secondly, because of the usage of neon I also need to guard against arm_neon_ok. Regtested on arm-none-eabi and no regressions. Ok for trunk? gcc/testsuite/ 2017-12-08 Tamar Christina PR target/82641 * gcc.target/arm/pragma_fpu_attribute.c: New. * gcc.target/arm/pragma_fpu_attribute_2.c: New. diff --git a/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c b/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c index f47c745855e4acc099afd554838dcf7d031f798c..5f039d9bfb2b14f9134f138527fc395b8e273bbb 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c +++ b/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute.c @@ -1,11 +1,14 @@ /* Test for target attribute assembly extension generations. */ /* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-additional-options "-std=gnu99 -mfpu=vfpv3-d16" } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-additional-options "-std=gnu99" } */ #include #include +#pragma GCC target("fpu=vfpv3-d16") + extern uint32_t bar(); __attribute__((target("fpu=crypto-neon-fp-armv8"))) poly64x1_t vsricw(poly64x1_t crc, uint32_t val) diff --git a/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c b/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c index f23fd83779e57e48c0035b6688a21850d12cb4ab..b710de38612707b9109966f7bbc694a913121cb6 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c +++ b/gcc/testsuite/gcc.target/arm/pragma_fpu_attribute_2.c @@ -1,11 +1,14 @@ /* Test for #pragma assembly extension generations. */ /* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v8a_ok } */ -/* { dg-additional-options "-std=gnu99 -mfpu=vfpv3-d16" } */ +/* { dg-require-effective-target arm_neon_ok } */ +/* { dg-additional-options "-std=gnu99" } */ #include #include +#pragma GCC target("fpu=vfpv3-d16") + extern uint32_t bar(); #pragma GCC push_options