From patchwork Mon Oct 19 12:00:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinath Parvathaneni X-Patchwork-Id: 1384232 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=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=tG7LTqCn; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 4CFFjs0vRrz9sSG for ; Mon, 19 Oct 2020 23:02:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1E92E3854833; Mon, 19 Oct 2020 12:02:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E92E3854833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1603108925; bh=twoyrcUaWiv/hwctE5UIcTRH/l7iU+CI5ZqQQrihteU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tG7LTqCniPQSD4lJSF1ZNj6avMhzHeqsIjrrqXwOBIvZrGsIkN3QJ9lHzQm0+sadL BQaZkjIUOkyvv9JKY07NJuaLMFi3yBLe8mEWtN4OOHT/lImqE0faWUvKxxY9SHrcpU GiMa81XCtp5GKKxBWaX00tPD4h9SMUaVJvdlle7E= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2064.outbound.protection.outlook.com [40.107.22.64]) by sourceware.org (Postfix) with ESMTPS id 13FB43854824 for ; Mon, 19 Oct 2020 12:01:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13FB43854824 Received: from DBBPR09CA0003.eurprd09.prod.outlook.com (2603:10a6:10:c0::15) by HE1PR0801MB1738.eurprd08.prod.outlook.com (2603:10a6:3:87::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20; Mon, 19 Oct 2020 12:01:50 +0000 Received: from DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::71) by DBBPR09CA0003.outlook.office365.com (2603:10a6:10:c0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.20 via Frontend Transport; Mon, 19 Oct 2020 12:01:50 +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=pass 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 DB5EUR03FT008.mail.protection.outlook.com (10.152.20.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Mon, 19 Oct 2020 12:01:50 +0000 Received: ("Tessian outbound c189680f801b:v64"); Mon, 19 Oct 2020 12:01:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 311ee7a6527e888d X-CR-MTA-TID: 64aa7808 Received: from bb4a8541d6b0.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 104E3FD6-FDF2-43A8-ACCB-9BD30C2417DA.1; Mon, 19 Oct 2020 12:01:11 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bb4a8541d6b0.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 19 Oct 2020 12:01:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c46i1BGRHvY7JMKT65ziFdmHvaaaQR+BL9cfwMwL8xiVlYR1TXBfZ13CCJHjV8zM+TKsGcN4F/EyquYWW4F7IKBHkZq21heiKYr3Nmrth2sqoPEbQ1Y52wkWGu9sZw/HRlQ1tlEdYcHxA7e7RfoID3QYLVuqOKpDHWlcCDT7rnQm7DvbCbmfVYmpkoFd1LWRrsRXvU/2Io+J3nK+cD4IkDlfCS5T2cDk+TmTB/NvhN+vLVAMlqqGrZeUVrQ6UduiSjjg1pj9PP/XHKvbtd9suUQ9DICqeIhcuCRq9cC69wRNcfxhivETOuZ2gfRc9uFrjEgPkpmPCyBQcn0bEiq0DA== 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=twoyrcUaWiv/hwctE5UIcTRH/l7iU+CI5ZqQQrihteU=; b=WNEYUFFAHsdKBL+CsY1wEPx5SMRwxHDtJee0Cfg+j4bkJ7YbYVzq8RI1exN7Cb6RbBAldEhB0gMg/0dq/990YcE+hzEB8vG3N77rCIy7Ol0hAtMUdZ8nDnrlNK2G0JHEdN9CGHFLv5LE1vDVI7NSXg0i8p17cFBL3H8bdau7gfI+9mbk/Gf35DxQpdz/cSa0L1Tj64CTLSqTgsZtg4vq5doo3ir6l62BK5ZKdXHGn8dHeqIxucR9pE2Q0F20QQ2uqeY5oKCkC3Oo6on6TWsHk7bQcVJRVrvOZ25qTdVzsZt3yBqDQCsWRBoeISAMtmPHgQtCuOTwm2rh3GmBD4hcOA== 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 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 VI1PR0802MB2368.eurprd08.prod.outlook.com (2603:10a6:800:9d::10) by VE1PR08MB4686.eurprd08.prod.outlook.com (2603:10a6:802:af::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.25; Mon, 19 Oct 2020 12:01:08 +0000 Received: from VI1PR0802MB2368.eurprd08.prod.outlook.com ([fe80::2152:9219:a034:3547]) by VI1PR0802MB2368.eurprd08.prod.outlook.com ([fe80::2152:9219:a034:3547%11]) with mapi id 15.20.3477.028; Mon, 19 Oct 2020 12:01:08 +0000 Date: Mon, 19 Oct 2020 13:00:18 +0100 To: gcc-patches@gcc.gnu.org Subject: [PATCH][GCC-10 backport][COMMITTED] arm: Fix the warning -mcpu=cortex-m55 conflicting with -march=armv8.1-m.main (pr97327). X-Originating-IP: [217.140.106.51] X-ClientProxiedBy: LNXP265CA0018.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::30) To VI1PR0802MB2368.eurprd08.prod.outlook.com (2603:10a6:800:9d::10) Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from e120703-lin.cambridge.arm.com (217.140.106.51) by LNXP265CA0018.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5e::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Mon, 19 Oct 2020 12:01:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bf833b38-e9b8-4ca7-7562-08d87426c312 X-MS-TrafficTypeDiagnostic: VE1PR08MB4686:|HE1PR0801MB1738: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:59;OLM:59; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: QvIXlVESqXmnPQVd1QnVrqB+DGQR9yI+CD/kTQzTvuX1Sni4wfElzlQCa2Wq9SeiAckQlGyUvO60WduFG0y3G2/157Nv1s3w4r8GaHR9PFUQ8RKSr/y40RGN8OvyO3mYQz9R9v4exk8rdqxObkyXUr9DcNfPg/MdVSRQaNql+k6wGQleeOn3d3EA77O4tGDrWiqL5749cTniQTYQM1tqupVoji2UCTJF2ebdQeb1QJtEDoYbMApB2a3hFD78f2U8oIeQytKnbBUgciGm+6Zec+QDO1ofSUS1pSwbXVnCvVaTmktQEBoK6fxKg7q5Exmz1n5pQSEWgfbUvxB0hHQkpYY5ByfACnr4RpNTy6S+LCgXJlGVWKvplZIjmK66aa9FMX0uefxiHWANbmqRxPHpLw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0802MB2368.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(346002)(396003)(136003)(376002)(366004)(6666004)(6512007)(33964004)(26005)(52116002)(4326008)(8936002)(956004)(9686003)(6916009)(8676002)(66616009)(66946007)(235185007)(5660300002)(66476007)(66556008)(316002)(52536014)(44832011)(966005)(478600001)(16526019)(186003)(33656002)(6486002)(86362001)(83380400001)(2906002)(4001150100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: hDB7K7r9YvWwZzEQm9sh5qfppLfA14WqYEaBVlDr9Rf6nQIuQYGjH1QwbG+4QSgztDih5kvBMtSdTYee7b4kKJXJZSkZG4eMbvHMCUoSjaR16bGFt+/hfP/058V2AyqtrLNnHK1Kx1uE8VG14BzM4UanmisDvpij6vmi8RD2P9Xr/ACyU5SgT3aiPB+q9QRzM6BcaJNAX37OocGrat5YK+lDrXO22AF73H/3nW3hINLNen1cPHBurOyShHFEbBwG0g0/6CAmHhXMX42esM/l0qfXMyEGf4ckvM63Ynycm/1jcMR85lxDj7Q4nQMYWZq5nC8iAURPE4gEskC/idBYcA0iCvyKGCb3dRBw0ficJToxGkP875cvU4KqxZgAW8u22u4920M21qaT3xQ0Krg+fwQbGuzOrQTVex6N5DZfngy0rXW813/jRRzY99O5GM00/BCTUhfPF5hv4nK1N+TjMiv+3WBHPzCwTeu1aRZKJXSdwzcOW6PZUzRRU3X6LpbIGh4oe008yOSKV8CQZRMmwTEmnpNS/DRAP9hJZgbuinu80aVf7Sf6T9WsPLnldv1iSmwjostb6N5/tWNC3almT2pGlxsHX5wprEFgKV0y7SC9g8K6cn3x/rFufJtSlUHG3Jhe82IN/5k5h1ZuzJhKEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4686 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 115a4821-f2f6-4301-7f22-08d87426a9e7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jXnSfW0l9wyKsZDg+SlbLM4xlaftqvosXF35oPzt+EWGMIbPREE6rFPU9wUhjc+OEpKm/puwMaXR2u7EFPIx64lxpEteFu0EquQ8EK5ZgA8thw+7XYZ1ZNYJFz5M1m68/PF+KgBXVXwaEAVPTqnzA5NTZ9FKXADSm/+u3RKWX58RPlTLo0aN7EnhdTxGMNdHeXpgRgnUTDTPIm6RtTFf34g1vjXShjhAStq6NS1QslzcLWH34ds6lwoJyzwjSk06IpJ5KvNvvIWfZOHUU75erx5kLF5hlQ1GJg6VbFN0PcYBiMwLi08iUzjW8JO+v1Wv0Jzc7JPe4AHahw4Yi76qNncfzG+RE8ZzvRapIBZ4/xooKT7I5m3XK+xMzyBT1d0ixAISB6bNh803PsW5x9/WYBPrzjbNR7Kj6ryFLXs/cAXtwa0FFd8Hj74Fn62nI4Qs2O8Rhh7zxuJrpFen0XgOM15O4I2sWKAGN9V4tiGtvOg= 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; SFS:(4636009)(346002)(136003)(39860400002)(396003)(376002)(46966005)(6486002)(336012)(26005)(16526019)(186003)(8676002)(86362001)(6916009)(316002)(33656002)(235185007)(5660300002)(52536014)(966005)(9686003)(6512007)(478600001)(70586007)(33964004)(2906002)(66616009)(70206006)(82310400003)(83380400001)(4001150100001)(956004)(82740400003)(6666004)(4326008)(356005)(44832011)(47076004)(8936002)(81166007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2020 12:01:50.3111 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf833b38-e9b8-4ca7-7562-08d87426c312 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: DB5EUR03FT008.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1738 X-Spam-Status: No, score=-15.8 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: , X-Patchwork-Original-From: Srinath Parvathaneni via Gcc-patches From: Srinath Parvathaneni Reply-To: Srinath Parvathaneni Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" As this patch is approved here https://gcc.gnu.org/pipermail/gcc-patches/2020-October/556387.html , committed to releases/gcc-10 branch. This patch fixes (PR97327) the warning -mcpu=cortex-m55 conflicts with -march=armv8.1-m.main for -mfloat-abi=soft by adding the isa_bit_mve_float to clearing FP bit list. The following combination are fixed with this patch: $ cat bug.c int main(){ return 0; } $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft bug.c -c $ arm-none-eabi-gcc -mcpu=cortex-m55 -mfloat-abi=soft -march=armv8.1-m.main+mve bug.c -c Before this patch for above combinations: cc1: warning: switch '-mcpu=cortex-m55' conflicts with '-march=armv8.1-m.main' switch After this patch for above combinations no warning/errors. gcc/ChangeLog: 2020-10-16 Srinath Parvathaneni PR target/97327 * config/arm/arm.c (fp_bitlist): Add isa_bit_mve_float to FP bits array. gcc/testsuite/ChangeLog: PR target/97327 * gcc.target/arm/mve/intrinsics/pr97327.c: New test. (cherry picked from commit 90042c43a92c452a5f9f3afbfcdad511ea09a54f) ############### Attachment also inlined for ease of reply ############### diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 11292c2658c866d22962f2534b64ec13246346e6..99b1e926dc3025f8547e4bb5b98cdba02a6abe86 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3445,8 +3445,9 @@ arm_option_override (void) { static const enum isa_feature fpu_bitlist_internal[] = { ISA_ALL_FPU_INTERNAL, isa_nobit }; + /* isa_bit_mve_float is also part of FP bit list for arch v8.1-m.main. */ static const enum isa_feature fp_bitlist[] - = { ISA_ALL_FP, isa_nobit }; + = { ISA_ALL_FP, isa_bit_mve_float, isa_nobit }; static const enum isa_feature quirk_bitlist[] = { ISA_ALL_QUIRKS, isa_nobit}; cl_target_option opts; diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c new file mode 100644 index 0000000000000000000000000000000000000000..8f6d36063811607623048c0a95920b29e43f4c39 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c @@ -0,0 +1,8 @@ +/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ +/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=hard" } { "" } } */ +/* { dg-additional-options "-mcpu=cortex-m55 -mfloat-abi=soft -mfpu=auto -Werror" } */ + +int main () +{ + return 0; +} diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 11292c2658c866d22962f2534b64ec13246346e6..99b1e926dc3025f8547e4bb5b98cdba02a6abe86 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3445,8 +3445,9 @@ arm_option_override (void) { static const enum isa_feature fpu_bitlist_internal[] = { ISA_ALL_FPU_INTERNAL, isa_nobit }; + /* isa_bit_mve_float is also part of FP bit list for arch v8.1-m.main. */ static const enum isa_feature fp_bitlist[] - = { ISA_ALL_FP, isa_nobit }; + = { ISA_ALL_FP, isa_bit_mve_float, isa_nobit }; static const enum isa_feature quirk_bitlist[] = { ISA_ALL_QUIRKS, isa_nobit}; cl_target_option opts; diff --git a/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c new file mode 100644 index 0000000000000000000000000000000000000000..8f6d36063811607623048c0a95920b29e43f4c39 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/mve/intrinsics/pr97327.c @@ -0,0 +1,8 @@ +/* { dg-require-effective-target arm_v8_1m_mve_fp_ok } */ +/* { dg-skip-if "Incompatible float ABI" { *-*-* } { "-mfloat-abi=hard" } { "" } } */ +/* { dg-additional-options "-mcpu=cortex-m55 -mfloat-abi=soft -mfpu=auto -Werror" } */ + +int main () +{ + return 0; +}