From nobody Wed Feb 11 06:49:13 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695977625; cv=none; d=zohomail.com; s=zohoarc; b=LJSJuW3iQJ+ncakuS6W9Pwg/HjxC6S3VPRwKLcjF5pHz91XynLDp81tnWYSYPkId8XZ116xKAhbvNQkqbY4Va8CNujHLDCutl+aleSvM/pg/DfzeRZYAKXP8FMjkYAAyeH4+5WkxnceHjW/rcrb3S94p0MI3Cscftf2uQ5ErKCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695977625; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AMZbLYPBV1xCTpn0hbevuva2cgsCsR3rt8ss4bjxa7M=; b=LGsTjEUu+juPUJKcJUXs09qE75igyWtar3jCkb5kYUXwpz/c0LBf477pOZT53eiZJRYeiuTC3c03rCwCH8pz7Mf76g/xaweM236oE6rXn5yLY0E1bvCJpzyaLK2dwiOZfsD3iVFUJGUPvNgBNW0mh6FCDY0qQJwpjNwHO4G3hf8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695977625210422.67831248739935; Fri, 29 Sep 2023 01:53:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9DY-00056m-Al; Fri, 29 Sep 2023 04:51:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DK-0004xN-SY for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DA-0005bh-L2 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:10 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-L5gqqdaWP2WDBbIr-vM03w-1; Fri, 29 Sep 2023 04:50:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A48F6185A790; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6613740C6EC0; Fri, 29 Sep 2023 08:50:55 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 69AF821E6912; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977459; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AMZbLYPBV1xCTpn0hbevuva2cgsCsR3rt8ss4bjxa7M=; b=itqpEFpBbo0HPfBSgEdd7V7MplauhHztKSHAwcF8AeCFMLciC49u4NMuGIe8HUrIkKv7DN wx+rookXta3ONZOlqwdGfdx+MncGUbM6OpXNlyvPTXbXE5YYrPh6XMJGuDe74NsoBT/KnL Aaz1+pVHjVnqNGd+mb+mjya9xsAsgUY= X-MC-Unique: L5gqqdaWP2WDBbIr-vM03w-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 09/56] target/arm/tcg: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:06 +0200 Message-ID: <20230929085053.2789105-10-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695977626044100003 From: Philippe Mathieu-Daud=C3=A9 Fix: target/arm/tcg/translate-m-nocp.c: In function =E2=80=98gen_M_fp_sysreg_r= ead=E2=80=99: target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of =E2=80= =98tmp=E2=80=99 shadows a previous local [-Wshadow=3Dcompatible-local] 509 | TCGv_i32 tmp =3D load_cpu_field(v7m.fpdscr[M_REG_NS]); | ^~~ target/arm/tcg/translate-m-nocp.c:433:14: note: shadowed declaration is h= ere 433 | TCGv_i32 tmp; | ^~~ --- target/arm/tcg/mve_helper.c: In function =E2=80=98helper_mve_vqshlsb=E2= =80=99: target/arm/tcg/mve_helper.c:1259:19: warning: declaration of =E2=80=98r= =E2=80=99 shadows a previous local [-Wshadow=3Dcompatible-local] 1259 | typeof(N) r =3D FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, = &su32); \ | ^ target/arm/tcg/mve_helper.c:1267:5: note: in expansion of macro =E2=80=98= WRAP_QRSHL_HELPER=E2=80=99 1267 | WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp) | ^~~~~~~~~~~~~~~~~ target/arm/tcg/mve_helper.c:927:22: note: in expansion of macro =E2=80=98= DO_SQSHL_OP=E2=80=99 927 | TYPE r =3D FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); = \ | ^~ target/arm/tcg/mve_helper.c:945:5: note: in expansion of macro =E2=80=98D= O_2OP_SAT=E2=80=99 945 | DO_2OP_SAT(OP##b, 1, int8_t, FN) \ | ^~~~~~~~~~ target/arm/tcg/mve_helper.c:1277:1: note: in expansion of macro =E2=80=98= DO_2OP_SAT_S=E2=80=99 1277 | DO_2OP_SAT_S(vqshls, DO_SQSHL_OP) | ^~~~~~~~~~~~ --- target/arm/tcg/mve_helper.c: In function =E2=80=98do_sqrshl48_d=E2=80=99: target/arm/tcg/mve_helper.c:2463:17: warning: declaration of =E2=80=98ext= val=E2=80=99 shadows a previous local [-Wshadow=3Dcompatible-local] 2463 | int64_t extval =3D sextract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2443:18: note: shadowed declaration is here 2443 | int64_t val, extval; | ^~~~~~ --- target/arm/tcg/mve_helper.c: In function =E2=80=98do_uqrshl48_d=E2=80=99: target/arm/tcg/mve_helper.c:2495:18: warning: declaration of =E2=80=98ext= val=E2=80=99 shadows a previous local [-Wshadow=3Dcompatible-local] 2495 | uint64_t extval =3D extract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2479:19: note: shadowed declaration is here 2479 | uint64_t val, extval; | ^~~~~~ Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20230904161235.84651-3-philmd@linaro.org> Reviewed-by: Peter Maydell Signed-off-by: Markus Armbruster --- target/arm/tcg/mve_helper.c | 16 ++++++++-------- target/arm/tcg/translate-m-nocp.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index c666a96ba1..8b99736aad 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -925,8 +925,8 @@ DO_1OP_IMM(vorri, DO_ORRI) bool qc =3D false; \ for (e =3D 0; e < 16 / ESIZE; e++, mask >>=3D ESIZE) { = \ bool sat =3D false; \ - TYPE r =3D FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + TYPE r_ =3D FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ + mergemask(&d[H##ESIZE(e)], r_, mask); \ qc |=3D sat & mask & 1; \ } \ if (qc) { \ @@ -1250,11 +1250,11 @@ DO_2OP_SAT(vqsubsw, 4, int32_t, DO_SQSUB_W) #define WRAP_QRSHL_HELPER(FN, N, M, ROUND, satp) \ ({ \ uint32_t su32 =3D 0; \ - typeof(N) r =3D FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ + typeof(N) qrshl_ret =3D FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &= su32); \ if (su32) { \ *satp =3D true; \ } \ - r; \ + qrshl_ret; \ }) =20 #define DO_SQSHL_OP(N, M, satp) \ @@ -1292,12 +1292,12 @@ DO_2OP_SAT_U(vqrshlu, DO_UQRSHL_OP) for (e =3D 0; e < 16 / ESIZE; e++, mask >>=3D ESIZE) { = \ bool sat =3D false; \ if ((e & 1) =3D=3D XCHG) { = \ - TYPE r =3D FN(n[H##ESIZE(e)], \ + TYPE vqdmladh_ret =3D FN(n[H##ESIZE(e)], \ m[H##ESIZE(e - XCHG)], \ n[H##ESIZE(e + (1 - 2 * XCHG))], \ m[H##ESIZE(e + (1 - XCHG))], \ ROUND, &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + mergemask(&d[H##ESIZE(e)], vqdmladh_ret, mask); \ qc |=3D sat & mask & 1; \ } \ } \ @@ -2454,7 +2454,7 @@ static inline int64_t do_sqrshl48_d(int64_t src, int6= 4_t shift, return extval; } } else if (shift < 48) { - int64_t extval =3D sextract64(src << shift, 0, 48); + extval =3D sextract64(src << shift, 0, 48); if (!sat || src =3D=3D (extval >> shift)) { return extval; } @@ -2486,7 +2486,7 @@ static inline uint64_t do_uqrshl48_d(uint64_t src, in= t64_t shift, return extval; } } else if (shift < 48) { - uint64_t extval =3D extract64(src << shift, 0, 48); + extval =3D extract64(src << shift, 0, 48); if (!sat || src =3D=3D (extval >> shift)) { return extval; } diff --git a/target/arm/tcg/translate-m-nocp.c b/target/arm/tcg/translate-m= -nocp.c index 33f6478bb9..42308c4db5 100644 --- a/target/arm/tcg/translate-m-nocp.c +++ b/target/arm/tcg/translate-m-nocp.c @@ -506,7 +506,7 @@ static bool gen_M_fp_sysreg_read(DisasContext *s, int r= egno, =20 gen_branch_fpInactive(s, TCG_COND_EQ, lab_active); /* fpInactive case: reads as FPDSCR_NS */ - TCGv_i32 tmp =3D load_cpu_field(v7m.fpdscr[M_REG_NS]); + tmp =3D load_cpu_field(v7m.fpdscr[M_REG_NS]); storefn(s, opaque, tmp, true); lab_end =3D gen_new_label(); tcg_gen_br(lab_end); --=20 2.41.0