[3/3] Fix PR 106690: enable effective_target_bswap for RISCV targets with ZBB enabled by default
Message ID | 1661015666-14659-4-git-send-email-apinski@marvell.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f406:0:0:0:0:0 with SMTP id g6csp290481wro; Sat, 20 Aug 2022 10:16:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR54fQnA5IHLfKZC8iVxJpUW3VI9MO20zgyxG7LVtkv5WOW7GRyU8Sad9kZJv39m5zCf3Uvi X-Received: by 2002:a17:907:a059:b0:73d:62cf:cbc9 with SMTP id gz25-20020a170907a05900b0073d62cfcbc9mr2680978ejc.394.1661015796175; Sat, 20 Aug 2022 10:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661015796; cv=none; d=google.com; s=arc-20160816; b=oQYiw3BbY5g0W54mBILC9B3+90CfOP862NGMtBBjSbPYwfyGIeuwU7gVB18vPZZ4He SPiacoRRmSJulZg//1r/HIlg0Li/ha/MclhfwN5yxE/7t6WQDjmCga7smw+n73i3Js/+ 8ZegdIqEwZfb4tfDWH3nFjYEUV6/Q+/e2/2rH6V15856ux+WlaI/Z3TvnWX0dviqj5Ev +IGWtvoREDx9sqp7TA/Yv5AX72Wv3tQkGsU33F50VUskF6lBozNh7wuPoLTha9jMIb0S mAmIF6ydjS5oC+06XlkYIQCTrkFJPxEUmNCFJzXS3NcMy+jKriBpUoGXWB2EFrJnC31E 04jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:references:in-reply-to:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=q3klz6QZw8n8Uu8mTANecr1sX3xVr+ROapETnYP5wMA=; b=tS6QXJWHB+5G079420BszydWe/zxJtheUsd/rxp8Rd2YCOu4mJZC6bjw+UZ8HhkJB3 pk+Mv5eHHH5UbRbUfp4VEy+vDsHmtVqbmvasE+4ewCc4HYjewG0vlb13GoU4KzKq1HqR SWu2niBEdLO54eLH9cchtez4cWMTt91wW6RMrx6sozbsZwhLWdBInMMSDZi75aCQ7uLg CwYpRNoL8vhsEDhygNXUfjZ0vCUdn4IglVgYkiCaauv4CHxW3TJQIDCSLyQP+I4XzYMF rtpqT5c458FAi4yyfBrNni1uXzp4veVmZy+sekISKIByHBx9erWD+viVmSlMVudS+dtm d8Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BIDZzSQQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id dz18-20020a0564021d5200b0043c45284ef9si6069320edb.562.2022.08.20.10.16.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 10:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BIDZzSQQ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB1BB3857C4E for <ouuuleilei@gmail.com>; Sat, 20 Aug 2022 17:16:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EB1BB3857C4E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661015780; bh=q3klz6QZw8n8Uu8mTANecr1sX3xVr+ROapETnYP5wMA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=BIDZzSQQHJ3ORbDaw5LCEZwq/USRY/BiFjASGQ3epeb15dP86KtqcBzMPOcnYga3V lLV4/UmjVArVI99QOP1085wWBVx4miibwmYnnQqd0GP/547Uy2bqEi94cWsSNseqGF 1fbDuPc/y1GjEY22P/ul1iTrfAlSw1Ja10tYuDDY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id EB8FC3858CDA for <gcc-patches@gcc.gnu.org>; Sat, 20 Aug 2022 17:14:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB8FC3858CDA Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27KFl5L5006946 for <gcc-patches@gcc.gnu.org>; Sat, 20 Aug 2022 10:14:34 -0700 Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3j2x2x0rb0-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Sat, 20 Aug 2022 10:14:34 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 20 Aug 2022 10:14:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Sat, 20 Aug 2022 10:14:32 -0700 Received: from linux.wrightpinski.org.com (unknown [10.69.242.198]) by maili.marvell.com (Postfix) with ESMTP id AF6AA5B693C; Sat, 20 Aug 2022 10:14:32 -0700 (PDT) To: <gcc-patches@gcc.gnu.org> Subject: [PATCH 3/3] Fix PR 106690: enable effective_target_bswap for RISCV targets with ZBB enabled by default Date: Sat, 20 Aug 2022 10:14:26 -0700 Message-ID: <1661015666-14659-4-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1661015666-14659-1-git-send-email-apinski@marvell.com> References: <1661015666-14659-1-git-send-email-apinski@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: C2i6I0jGWAZjz61AREfaifIAGAfhWIdC X-Proofpoint-ORIG-GUID: C2i6I0jGWAZjz61AREfaifIAGAfhWIdC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-20_08,2022-08-18_01,2022-06-22_01 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: apinski--- via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: apinski@marvell.com Cc: Andrew Pinski <apinski@marvell.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1741701299491140886?= X-GMAIL-MSGID: =?utf-8?q?1741701299491140886?= |
Series |
Improve bswap for ZBB
|
|
Commit Message
Li, Pan2 via Gcc-patches
Aug. 20, 2022, 5:14 p.m. UTC
From: Andrew Pinski <apinski@marvell.com>
While looking for testcases to quickly test, I Noticed that
check_effective_target_bswap was not enabled for riscv when
ZBB is enabled. This patch checks if ZBB is enabled when
targeting RISCV* for bswap.
OK? Ran the testsuite for riscv32-linux-gnu both with and without ZBB enabled.
PR testsuite/106690
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_bswap):
Return true if riscv and ZBB ISA extension is enabled.
Change-Id: I521c91e7fc1a54faa0c8399b685248690022278b
---
gcc/testsuite/lib/target-supports.exp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 04a2a8e8659..0f1e1af31e9 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -8646,6 +8646,13 @@ proc check_effective_target_bswap { } { || [istarget powerpc*-*-*] || [istarget rs6000-*-*] || [istarget s390*-*-*] + || ([istarget riscv*-*-*] + && [check_no_compiler_messages_nocache riscv_zbb object { + #if __riscv_zbb <= 0 + #error ZBB is not enabled + #endif + int i; + } ""]) || ([istarget arm*-*-*] && [check_no_compiler_messages_nocache arm_v6_or_later object { #if __ARM_ARCH < 6