From patchwork Thu Jul 9 09:58:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamar Christina X-Patchwork-Id: 1325868 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=Mk7Azbbp; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=Mk7Azbbp; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B2WpH4527z9sSn for ; Thu, 9 Jul 2020 19:58:31 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 626323846034; Thu, 9 Jul 2020 09:58:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70078.outbound.protection.outlook.com [40.107.7.78]) by sourceware.org (Postfix) with ESMTPS id 0CDFF3861962 for ; Thu, 9 Jul 2020 09:58:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0CDFF3861962 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tamar.Christina@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spxQBUbt0/VGS3bcHQvimQ2hTgfxFVMkTgHL46DQg7U=; b=Mk7AzbbplGGV6Mq6alwCiZLWCTUhv9k9iNW+wD3y9SkGzWgNhVLoB2VpABKp/lzYawPR4Uh32j+Yv5I47C4GJtZcACYKLCzZibe3FEPwjRYSSOl1pyeYkQg365znPbJdYtzNFQxK58d5Qa1JHp0WfJJ55tFAqpz8eAHQMff7v80= Received: from AM5PR0601CA0032.eurprd06.prod.outlook.com (2603:10a6:203:68::18) by HE1PR08MB2843.eurprd08.prod.outlook.com (2603:10a6:7:37::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.29; Thu, 9 Jul 2020 09:58:21 +0000 Received: from VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:68:cafe::2e) by AM5PR0601CA0032.outlook.office365.com (2603:10a6:203:68::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.22 via Frontend Transport; Thu, 9 Jul 2020 09:58:21 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT032.mail.protection.outlook.com (10.152.18.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Thu, 9 Jul 2020 09:58:21 +0000 Received: ("Tessian outbound 73b502bf693a:v62"); Thu, 09 Jul 2020 09:58:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dd20eebe0f66c22b X-CR-MTA-TID: 64aa7808 Received: from 30f51e4b9d67.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3B572FBE-46F9-4732-A87D-C86118AAB1EF.1; Thu, 09 Jul 2020 09:58:15 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 30f51e4b9d67.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Jul 2020 09:58:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b8GymYDiMq7bfCB4IKVd9Vnp0r7ssIYI+tic9ilNHzQXRBoPwxREzAMLipp0z2l8KAfGQslqF4HRs64bO/zt1nRwTSd9USOrOwZlgzdGKxHVRTbxZT74iFuBT+mrYM9p2j5yNAMNUFfDzs28LN37fmPdA0V/MfeeUTDMDgC9GgoINUmoQPjLb2v+Y8KS9Aa2uEoD6W77NwGrqbp0UkGjHIKzifwFi/qmvflwnPmJZWvg+A9e134ird5vIpZogya+U82aLRy5B7X0us0Fn7Ll/SOoke+h9IjdiulGCRHnG/YcPdufDMUrPO63MleJ/39KYdyR3bViDSaJYrTRofanUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spxQBUbt0/VGS3bcHQvimQ2hTgfxFVMkTgHL46DQg7U=; b=C1/2IYWAo9WezxRP4cM7HdepjNvhD/uA/BKrNALniRR8WcQxKmcxO+lsQ6sg7a3PPC8COZkVftOSyiMqLQzUrYJuCismA9lMNBEip6SlUkNuzO2nnNP+mzwlrqpPTXXEXjTylOIkwFIo1+Fem8f8LoYlIO0BbYfHTMpkolS9+Q0RSr2mTHCfJwWzB/yfXLFSDgEYWDqzjHRdsM2PCl+6bo5GFuY/pRXvZDzynSqei6Soqii7IuTnaYDuU9kEiejc0HZ6oiIb/xJcoGlJHp6U4N7cNr3hIxyuB6yv4f6m32pbzb0djehVHgnxqq8lZFTBBviPGtB3VAY8b93luitsDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spxQBUbt0/VGS3bcHQvimQ2hTgfxFVMkTgHL46DQg7U=; b=Mk7AzbbplGGV6Mq6alwCiZLWCTUhv9k9iNW+wD3y9SkGzWgNhVLoB2VpABKp/lzYawPR4Uh32j+Yv5I47C4GJtZcACYKLCzZibe3FEPwjRYSSOl1pyeYkQg365znPbJdYtzNFQxK58d5Qa1JHp0WfJJ55tFAqpz8eAHQMff7v80= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by VI1PR08MB4111.eurprd08.prod.outlook.com (2603:10a6:803:ed::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Thu, 9 Jul 2020 09:58:13 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9107:803e:1353:db21]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::9107:803e:1353:db21%3]) with mapi id 15.20.3174.022; Thu, 9 Jul 2020 09:58:13 +0000 Date: Thu, 9 Jul 2020 10:58:11 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Subject: [PATCH 6/6] AArch64: Add test for -mcpu=native Message-ID: <20200709095809.GA18602@arm.com> Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0036.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::24) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.49) by LO2P265CA0036.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Thu, 9 Jul 2020 09:58:13 +0000 X-Originating-IP: [217.140.106.49] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 93069890-d62c-4ceb-1a3e-08d823ee9cb6 X-MS-TrafficTypeDiagnostic: VI1PR08MB4111:|HE1PR08MB2843: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: OkrMpTxr4rgWYtkhSSJLlkste8zmiKLj6OBMG7nq65VT7fs8BxaOOFgJOOVOaR+73CnFqcRhbpOQ3quKaVvCNGg+MhnEjEkup826jCplSRY4aLk7CFfs4hp7+zHz0x5VtgH5k8Tn0cm/4LosxrPSKr5ux8alziKiG8F3J6LpdxZAY7VHioamQuzHFqSO339sjwGFwZykX1TPD+dkEMLkvoAzMLtAMRAy+49llykWHrhvufeCHMUaawtEl16Io/B97mEZVfAsCugBSG9KFWDsT9QvxcIvZYXa+OQ2n8gIHOV+lzEI2vRH0Xy62t5lD+vYLcB5FxiPoxKuX7ZT9mpzpP3v1/0+/uKDcgcP7KRK2W+ecrqn2AE3OIcwoNyCd3aY X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB5325.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(39860400002)(366004)(396003)(346002)(376002)(66616009)(956004)(8886007)(2616005)(7696005)(4743002)(55016002)(52116002)(33656002)(4326008)(5660300002)(26005)(235185007)(44832011)(44144004)(16526019)(186003)(66946007)(6916009)(1076003)(33964004)(36756003)(2906002)(66476007)(66556008)(316002)(478600001)(8936002)(8676002)(86362001)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: vFskINUngZyVKu7y2rDW6e7Atxd9p1SLTstF7Tk8afj9CvNFeCdxqWYELKoye2422b4kYxsAEjL+7FC7Loax6FrkuFo4KzyrhCnpyMj/hgz1eZ6eqPcEXsJY4V3jYiK6NSVntlgxTnsRhAUx+T1WtsC1hWiRYgsnyItdtho4uFl9P/xRFu+UyJ/najBGQJS2k0Y3yTOB+w3DMARyEV6C4yxOJ8dc8DLGl2rUy+xV00m7uH2XWqsHgtdcFQES6rm7/T17StMxThGNPB7x+9MH4wUWM8rTrpihUTsb+Z2E6PW1dLWuks+QFr6yn2dCcx/ueKT0OU+43CTUuj9XKVQ/gC467hw21JROGYXwTkWV7aaGP6QsBLov4d5X80tW2bxMVGsex5wiAS3OQFSoPUKiCOs4m53kDouXfmdte7S1r31qHao+BHNFralms7Wcx2X+MmtxoiAS6WDJcWC17W3mAOADMgzgrV8TFzLtUxYvlIyASD7foU+N1/VMk1ZNSRMS X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4111 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(396003)(39860400002)(376002)(46966005)(8886007)(1076003)(4326008)(70206006)(8676002)(66616009)(70586007)(36756003)(44832011)(33656002)(956004)(2616005)(336012)(8936002)(4743002)(7696005)(47076004)(82740400003)(33964004)(44144004)(36906005)(316002)(478600001)(86362001)(81166007)(235185007)(356005)(16526019)(26005)(2906002)(186003)(55016002)(6916009)(5660300002)(82310400002)(2700100001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 15365224-5d0d-4371-5b54-08d823ee982e X-Forefront-PRVS: 04599F3534 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gHp2Zj/NB+f0sw5Na8jnzS2Wox5V43mlNk/jbsP5WfinllA5Gueql4v7Qou3leLdpa+Ggbp+JNEgdc9mY4xHJN9mFh68cGImAm6xJ5ttT0+BLD+DFQRPYMJBSSwYpQ6r8IoIIOzbvJQMxTze18W6ZRSZy+/h0+urjssmWZ7JZuFKnFSo0CIKUetKHifTq2PMldCRytNY2I+ea7Mi7p4I55I374iTyuOQgpzVTqanCw+yXWYSySm4x0KkDSVJQMWYUX+UvDIifzMQ7/RUBRl8kv8zzaxCQtibhbGhe3MMSmLplTNHacmAlJxoLuwZ+xKtqV7OCQyMfnlcRk55C3llAuCrKIsdgyXHEfPt5TRP4aXRkFfmD9YILtm+bMFmJy7VlgPDOhtTGn/OGQW/ASna2hPpPIxtNpTqtvddjONqqWQ= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jul 2020 09:58:21.0184 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93069890-d62c-4ceb-1a3e-08d823ee9cb6 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2843 X-Spam-Status: No, score=-16.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard.Earnshaw@arm.com, nd@arm.com, Marcus.Shawcroft@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi All, This adds some tests to the GCC testsuite for testing the -mcpu=native code. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master, GCC 10, 9 and 8? Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.target/aarch64/cpunative/aarch64-cpunative.exp: New test. * gcc.target/aarch64/cpunative/info_0: New test. * gcc.target/aarch64/cpunative/info_1: New test. * gcc.target/aarch64/cpunative/info_10: New test. * gcc.target/aarch64/cpunative/info_11: New test. * gcc.target/aarch64/cpunative/info_12: New test. * gcc.target/aarch64/cpunative/info_13: New test. * gcc.target/aarch64/cpunative/info_14: New test. * gcc.target/aarch64/cpunative/info_15: New test. * gcc.target/aarch64/cpunative/info_2: New test. * gcc.target/aarch64/cpunative/info_3: New test. * gcc.target/aarch64/cpunative/info_4: New test. * gcc.target/aarch64/cpunative/info_5: New test. * gcc.target/aarch64/cpunative/info_6: New test. * gcc.target/aarch64/cpunative/info_7: New test. * gcc.target/aarch64/cpunative/info_8: New test. * gcc.target/aarch64/cpunative/info_9: New test. * gcc.target/aarch64/cpunative/native_cpu_0.c: New test. * gcc.target/aarch64/cpunative/native_cpu_1.c: New test. * gcc.target/aarch64/cpunative/native_cpu_10.c: New test. * gcc.target/aarch64/cpunative/native_cpu_11.c: New test. * gcc.target/aarch64/cpunative/native_cpu_12.c: New test. * gcc.target/aarch64/cpunative/native_cpu_13.c: New test. * gcc.target/aarch64/cpunative/native_cpu_14.c: New test. * gcc.target/aarch64/cpunative/native_cpu_15.c: New test. * gcc.target/aarch64/cpunative/native_cpu_2.c: New test. * gcc.target/aarch64/cpunative/native_cpu_3.c: New test. * gcc.target/aarch64/cpunative/native_cpu_4.c: New test. * gcc.target/aarch64/cpunative/native_cpu_5.c: New test. * gcc.target/aarch64/cpunative/native_cpu_6.c: New test. * gcc.target/aarch64/cpunative/native_cpu_7.c: New test. * gcc.target/aarch64/cpunative/native_cpu_8.c: New test. * gcc.target/aarch64/cpunative/native_cpu_9.c: New test. diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp b/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp new file mode 100644 index 0000000000000000000000000000000000000000..ce80ca04b8d095c96acf0bda4d5b16a6460c4cbd --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/aarch64-cpunative.exp @@ -0,0 +1,35 @@ +# Copyright (C) 2014-2020 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# GCC testsuite that uses the `dg.exp' driver. + +# Exit immediately if this isn't an AArch64 target. +if ![istarget aarch64*-*-*] then { + return +} + +# Load support procs. +load_lib gcc-dg.exp + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \ + "" "" + +# All done. +dg-finish diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_0 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_0 new file mode 100644 index 0000000000000000000000000000000000000000..ef4a3f606fa56bc7ef1e951c1896737f013f78a6 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_0 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_1 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_1 new file mode 100644 index 0000000000000000000000000000000000000000..0f434bca28521f678bcee9f407f34ef813e7f1f1 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_1 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : fp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_10 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_10 new file mode 100644 index 0000000000000000000000000000000000000000..c6e9d7ca9e274a0be8a75bd7056dad958aa53cb4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_10 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_11 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_11 new file mode 100644 index 0000000000000000000000000000000000000000..fb76f7d45bcd8238e49d3dedb1dab5265cbae982 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_11 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp sb +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_12 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_12 new file mode 100644 index 0000000000000000000000000000000000000000..9b6aa7bc248530eb794dad5d874a78dc9c06851b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_12 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp ssbs +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_13 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_13 new file mode 100644 index 0000000000000000000000000000000000000000..ef4a3f606fa56bc7ef1e951c1896737f013f78a6 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_13 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 asimddp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_14 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_14 new file mode 100644 index 0000000000000000000000000000000000000000..338975715132ed6e55c2d34514ad20294b7018ee --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_14 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : Lorem ipsum dolor sit ametd rebum expetendis per at Dolor lucilius referrentur ei mei virtute eruditi eum ne Iisque verterem tacimates eu mea ei autem asimd fp asimddp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_15 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_15 new file mode 100644 index 0000000000000000000000000000000000000000..bc6453945561044ab09ec2dba851eb88829c483b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_15 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : Lorem ipsum dolor sit ametd rebum expetendis per at Dolor lucilius referrentur ei mei virtute eruditi eum ne Iisque verter svesm4 asimd fp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_2 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_2 new file mode 100644 index 0000000000000000000000000000000000000000..965d37760ac34a456a6463c9e1baae152e966040 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_2 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_3 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_3 new file mode 100644 index 0000000000000000000000000000000000000000..0c276f884a8365b8aa66b7c08f12f3e6cfead497 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_3 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_4 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_4 new file mode 100644 index 0000000000000000000000000000000000000000..716210c14175ef5af956af2e40ecd188451bf54b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_4 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp aes pmull sha1 sha2 +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_5 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_5 new file mode 100644 index 0000000000000000000000000000000000000000..7a002e1c4c8192fcb541de8f90603bd27e793e72 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_5 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp fphp asimdhp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_6 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_6 new file mode 100644 index 0000000000000000000000000000000000000000..d341dfe86f4c6d68a085389954197d29f32d5992 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_6 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp aes pmull sha1 sha2 fphp asimdhp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_7 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_7 new file mode 100644 index 0000000000000000000000000000000000000000..ccb784915d517b44cdfba7dec01047ad085e685b --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_7 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd pmull sha1 fp aes sha2 fphp asimdhp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_8 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_8 new file mode 100644 index 0000000000000000000000000000000000000000..d6d9d03a2a26c2196ddae770411479bf71725d59 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_8 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd sve fp +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/info_9 b/gcc/testsuite/gcc.target/aarch64/cpunative/info_9 new file mode 100644 index 0000000000000000000000000000000000000000..c9aa4a9a07df4df4a7a4642fed6f664cdf8da4b3 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/info_9 @@ -0,0 +1,8 @@ +processor : 0 +BogoMIPS : 100.00 +Features : asimd fp svesm4 +CPU implementer : 0x41 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0xd08 +CPU revision : 2 diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c new file mode 100644 index 0000000000000000000000000000000000000000..f155f51bae734a62b39867fc1a0adec65fb552de --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_0.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_0" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */ + +/* Test a normal looking procinfo. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_1.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_1.c new file mode 100644 index 0000000000000000000000000000000000000000..2cf0e89994b1cc0dc9fac67f4dc431c003498048 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_1.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_1" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+nosimd} } } */ + +/* Test one where fp is on by default so turn off simd. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c new file mode 100644 index 0000000000000000000000000000000000000000..6a753965c527fd7f27851c5e8e474ec900a1a75a --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_10.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_10" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+nofp\+nosimd} } } */ + +/* Test one with no entry in feature list. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_11.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_11.c new file mode 100644 index 0000000000000000000000000000000000000000..96b9ca434ebbf007ddaa45d55a8c2b8e7a19a715 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_11.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_11" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+sb} } } */ + +/* Test one with a feature name that overlaps with another one. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_12.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_12.c new file mode 100644 index 0000000000000000000000000000000000000000..c3b44adbf6c8a02c5003049eed2ed453587b8ad4 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_12.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_12" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+ssbs} } } */ + +/* Test one where the longer feature overlaps with a shorter one. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c new file mode 100644 index 0000000000000000000000000000000000000000..b7b3a8e13dfbda887f80b9e5c8f5416c153e0d65 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_13.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_13" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+crc\+dotprod} } } */ + +/* Test one with mixed order of feature bits. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_14.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_14.c new file mode 100644 index 0000000000000000000000000000000000000000..781ab1ebbfb46901ea38cd0063d984e372839ecd --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_14.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_14" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+dotprod} } } */ + +/* Test one where valid feature bits are at a boundary > buffer size. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_15.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_15.c new file mode 100644 index 0000000000000000000000000000000000000000..c9205d95b793c27cd61982b9262bbbcc4912ec6d --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_15.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_15" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+sve2-sm4} } } */ + +/* Test one where the bounary of buffer size would cut off and leave + a valid feature in the first full buffer. e.g. this will cut off at + sve leaving 2-sm4 to yet be read. Check that this doesn't enable + +sve by mistake. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c new file mode 100644 index 0000000000000000000000000000000000000000..aad71f4347d2f8e8bb7270db2f8534bf3a198e9e --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_2.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_2" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+nofp\+nosimd} } } */ + +/* Test one where asimd is provided byt no fp. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_3.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_3.c new file mode 100644 index 0000000000000000000000000000000000000000..50685c297dbd7549ee1ea190dbfdb9dd90f3af12 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_3.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_3" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a} } } */ + +/* Test where asimd and fp are the only ones provided, these are default + and so shouldn't emit anything. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_4.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_4.c new file mode 100644 index 0000000000000000000000000000000000000000..91ae809757a4e31bf946fc27ec33f51001b0d3e8 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_4.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_4" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+crypto} } } */ + +/* Test one where all crypto bits are given so crypto should be enabled. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_5.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_5.c new file mode 100644 index 0000000000000000000000000000000000000000..84139e58ee0000816c4ea24f27bc28f5f6563bac --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_5.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_5" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+fp16} } } */ + +/* Test one where fp16 is available and so should be emitted. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c new file mode 100644 index 0000000000000000000000000000000000000000..da72052e62385c9251d25f792b679263a18d9e61 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_6.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_6" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */ + +/* Test one where the feature bits for crypto and fp16 are given in + same order as declared in options file. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c new file mode 100644 index 0000000000000000000000000000000000000000..96ad4c14db16468df30cc0a00d709ed5e2f32ed9 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_7.c @@ -0,0 +1,13 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_7" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+crypto\+fp16} } } */ + +/* Test one where the crypto and fp16 options are specified in different + order from what is in the options file. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_8.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_8.c new file mode 100644 index 0000000000000000000000000000000000000000..7a5a2144a3973406b9ba7d268029a6940fb0be48 --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_8.c @@ -0,0 +1,12 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_8" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+sve} } } */ + +/* Test one where sve is enabled. */ diff --git a/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_9.c b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_9.c new file mode 100644 index 0000000000000000000000000000000000000000..528b5d029f1a21c8388a30120590c1b8d5b4a81f --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/cpunative/native_cpu_9.c @@ -0,0 +1,14 @@ +/* { dg-do compile { target { { aarch64*-*-linux*} && native } } } */ +/* { dg-set-compiler-env-var GCC_CPUINFO "$srcdir/gcc.target/aarch64/cpunative/info_9" } */ +/* { dg-additional-options "-mcpu=native" } */ + +int main() +{ + return 0; +} + +/* { dg-final { scan-assembler {\.arch armv8-a\+sve2-sm4} } } */ + +/* Test one here a feature that is a prefix of another is enabled. + In this case sve is a prefix to svesm4, but sve2-sm4 should be + enabled. */