From patchwork Thu Oct 20 09:26:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsukasa OI X-Patchwork-Id: 6092 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp155894wrs; Thu, 20 Oct 2022 02:34:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4h1FHcTXLbB+xPD1oJ5Cre7ZQabBYshugkeLFSy294xlmXUrs/uVl39IukjC+yXud9Zru5 X-Received: by 2002:a05:6402:2489:b0:454:11de:7698 with SMTP id q9-20020a056402248900b0045411de7698mr11610361eda.214.1666258494572; Thu, 20 Oct 2022 02:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666258494; cv=none; d=google.com; s=arc-20160816; b=jZwJrDaOAnARbCAjjQaiFb3MPep9I6aJqR15+Ah6CHlX96bsWHqxp6493hro9AzRMx mXFDrPF57pyne7JTh9PCoyBru7/KKLvdDGKEawM15Wz8MSIm2Gy0ZvUAuYEH+ARDcxLo bPM+ufxPWwCOceHz2xYkzKpxIE+KTY+W3OdCDGUlQ9s8e8qB4AIxEFzvJNmgqwM0RlOm MvSeDGE45E6VRtCvMOi1KHlgu1lJ5aY5pLZQg8Au1ixwuFkrjocEr6A9+Inm6fe8Ba1U ynI3NKHKbkumsBt0pCZzNQKUtaq00lML3gELr+I9fsEsvTNy/mtUL5vTYr2thFngJE23 822A== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=+O/2Nf3yFN+IfPKXi+OoTC8HAxlnanxuy/DRnN1lGKA=; b=iIyzSITYAPE8Ix80XsxnvT1Zuld9lXd7OkssYpYd7IEgbt4MmLsHo4QuNPQpIScPRR CTCnTqxXYQ7hZhWqQyaJOBPJk4X6Z2dS1rRmWzJXCwe09wbYED2L3UxysaDBS8UmHrIp pfzEJjXjHlwL3UN+zLnJS+e8bATv02b2f1aSEXm5aMH3cevWnPk9vh+vxPyu98CTfuK4 2xl0mTxW+ebE3c4x9aYkEwreznOXNzJmU2BCAIKWrABOW0hn59XrgGGscrDD0Hxgu7Ca RGEzoht/fTqwT97doYVoxNXlEbWIKK4imygcgvKaAieGlAv/r7UqipHjHB4HDbrTqy9D sM1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZvkJRAQ7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t4-20020a056402020400b00458b42ff246si14369255edv.236.2022.10.20.02.34.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 02:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ZvkJRAQ7; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9DEFA384BC3C for ; Thu, 20 Oct 2022 09:30:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DEFA384BC3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666258228; bh=+O/2Nf3yFN+IfPKXi+OoTC8HAxlnanxuy/DRnN1lGKA=; 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=ZvkJRAQ7F0B2ZxNFw0tyfQONXAR2e7pVB+RWRQ9qDRSzjR2lO9Qhfdj94JWAg3vyq wrtetWPvpQXTxbseJ1eHqRNxn3Gx5P+c2RHZdKDZ1MC5yMqCF/54FUV9Kg6MjFDsdk K7BpFdazmdgLZKlhdm6E/wq5dxjh+7imBAZgcmiU= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id E0FB33839DD8 for ; Thu, 20 Oct 2022 09:29:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E0FB33839DD8 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 41F4F300089; Thu, 20 Oct 2022 09:29:04 +0000 (UTC) To: Tsukasa OI , Andrew Burgess , Mike Frysinger , Nick Clifton Subject: [PATCH 14/40] sim/frv: Add explicit casts Date: Thu, 20 Oct 2022 09:26:00 +0000 Message-Id: In-Reply-To: References: Mime-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 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: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tsukasa OI via Binutils From: Tsukasa OI Reply-To: Tsukasa OI Cc: binutils@sourceware.org Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747198667501341219?= X-GMAIL-MSGID: =?utf-8?q?1747198667501341219?= Clang generates a warning if there is an enum value with a mismatching type without an explicit cast ("-Wenum-conversion"). On the default configuration, it causes a build failure (unless "--disable-werror" is specified). This commit adds explicit casts on the FR-V instruction decoder. Note: This commit touches CGEN-generated files directly. Modifying CGEN is the best way to prevent this issue from happening again but there is another known regression in CGEN to resolve. --- sim/frv/decode.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sim/frv/decode.c b/sim/frv/decode.c index 307b593e148..9c4a97833ad 100644 --- a/sim/frv/decode.c +++ b/sim/frv/decode.c @@ -39,12 +39,12 @@ static IDESC frvbf_insn_data[FRVBF_INSN__MAX]; static const struct insn_sem frvbf_insn_sem[] = { - { VIRTUAL_INSN_X_INVALID, FRVBF_INSN_X_INVALID, FRVBF_SFMT_EMPTY }, - { VIRTUAL_INSN_X_AFTER, FRVBF_INSN_X_AFTER, FRVBF_SFMT_EMPTY }, - { VIRTUAL_INSN_X_BEFORE, FRVBF_INSN_X_BEFORE, FRVBF_SFMT_EMPTY }, - { VIRTUAL_INSN_X_CTI_CHAIN, FRVBF_INSN_X_CTI_CHAIN, FRVBF_SFMT_EMPTY }, - { VIRTUAL_INSN_X_CHAIN, FRVBF_INSN_X_CHAIN, FRVBF_SFMT_EMPTY }, - { VIRTUAL_INSN_X_BEGIN, FRVBF_INSN_X_BEGIN, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_INVALID, FRVBF_INSN_X_INVALID, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_AFTER, FRVBF_INSN_X_AFTER, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_BEFORE, FRVBF_INSN_X_BEFORE, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_CTI_CHAIN, FRVBF_INSN_X_CTI_CHAIN, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_CHAIN, FRVBF_INSN_X_CHAIN, FRVBF_SFMT_EMPTY }, + { (CGEN_INSN_TYPE) VIRTUAL_INSN_X_BEGIN, FRVBF_INSN_X_BEGIN, FRVBF_SFMT_EMPTY }, { FRV_INSN_ADD, FRVBF_INSN_ADD, FRVBF_SFMT_ADD }, { FRV_INSN_SUB, FRVBF_INSN_SUB, FRVBF_SFMT_ADD }, { FRV_INSN_AND, FRVBF_INSN_AND, FRVBF_SFMT_ADD }, @@ -792,7 +792,7 @@ static const struct insn_sem frvbf_insn_sem[] = static const struct insn_sem frvbf_insn_sem_invalid = { - VIRTUAL_INSN_X_INVALID, FRVBF_INSN_X_INVALID, FRVBF_SFMT_EMPTY + (CGEN_INSN_TYPE) VIRTUAL_INSN_X_INVALID, FRVBF_INSN_X_INVALID, FRVBF_SFMT_EMPTY }; /* Initialize an IDESC from the compile-time computable parts. */