From patchwork Mon Sep 4 16:12:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719984 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685727wrh; Mon, 4 Sep 2023 09:14:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSCB7DlZlhNUwKcwZ3JZ1eMSWGhODQOTcRHmZ93qwwJ2qLoYNMiDXWlcz+urbS1RAWI/Jl X-Received: by 2002:ac8:7d92:0:b0:412:24e6:a485 with SMTP id c18-20020ac87d92000000b0041224e6a485mr12831580qtd.2.1693844045232; Mon, 04 Sep 2023 09:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844045; cv=none; d=google.com; s=arc-20160816; b=CjvvDpmqjKlT6G6a/ZiH/1Ip9jheqN6urQRK64P0rHFzFG4LsRbn17srt3Q3wYtoNP Ey/qCvVMkTZ9bHzaxF5BFl3RIvYinx3VD4KEX8qhNuJMOseUuSmwzwQ8Hhjecus872yZ tYkEmDkeQL57W+V3MJFylXCHZXVyvPi4fR6KKJixLarS2cSGXuP+OVvKqp292dsqeTxQ x6EyN/8s+zg7zYp9IpXs0APtOQL6lWjxbwISXe5QLTtqqLxmeIla8bMoLP6B2pxn6NBF g8RMoMudZYiLM4Sc2RcOjnNbNag7dq7t84u7oMaETRznmDnibiaeKEFUWrIC5fhxfJvs GLBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; fh=9aWhNTzWuGnoulTjdeFX0+0UCLzagAXfy6/A1sUjfOQ=; b=Yfruefzi6K0J04L+WN8fN7zV06R0KAvqOp5GIOpIZ1N1L99PXdN1QT0hGR1kJQABNc 5EENwZpbdPUHZY9Cp4ACs6YotJn+NrOtVmXLY33S8gIV240c4ept1SzrM1KipSQF5gCT Z53UEuvS1GhFGsCng73S1Me1fZ18tvhpzjehu6H9VZrVbPKcedNM2KcY3gdrOZLmSrss n/3ctJSICntGkaYEocA6COKopMe1QB7P+KhVlpjmsmqEW+sWaRtqrRLqzNgxOcdUc8m/ g9PvViJAglRqVdt9vXxqku3Wshkw8ISS3PwHJWzow754N3hEWhoRVYeic6DxxUaR1bAf dyvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=js5lkQL3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t20-20020a05622a149400b0040fbc9a3257si6524893qtx.115.2023.09.04.09.14.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=js5lkQL3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdCCX-0002Zd-3Z; Mon, 04 Sep 2023 12:13:21 -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 1qdCCU-0002Xe-NB for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:18 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCQ-0007Vm-Sq for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:18 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-98377c5d53eso235544866b.0 for ; Mon, 04 Sep 2023 09:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843992; x=1694448792; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; b=js5lkQL3cJNKZ3IsTjZb7hnuCT/Ea2PDHh7Gv3IevnDVVPJ3+IsbsceqGbagQgQK4g iNrUoZk+ulEP3GDeyTECKFG2Ka7M50tLBPWuJDWMG4KcdAdAa/tscs4ZIJtS7+HjGeFU w5u1V3ev984RlxkI7hkt30xIeI3yaIaC/xQpAx1+LX+sWPPy4BaWZdGQlao55Mu/Vk8f TyDCv7JsmoqaI0pjDmqGFhb22M3KqXlR3/uluzaPDuwakjXSKiqBB1c4rPWXgJT9Pr6e 004BHCYVvoa+GK/j92UnBtgOiUr+J0e+TH+jOWHa30BL3j/i578Hs6J9XliGt7xikn3n ANew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843992; x=1694448792; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; b=C1aqBAKPEm8EGRj9MV7/ljx2p8vkCBwQBbFHRVD4fIA0p5bPwXxMR5uuJdA/DDupEh EMx07sI/rNsvaD3XJaqTpQlXf8vVBQOGGtUy0LN0Qj3P0tOtKysoyRiT71Evj2Od4bST 7ghPzdTWztafPwnc9IMWZO4ruavD2AQZKM7K5RLxY0Aq4sQFu0TGJKjGIDt41TnkYRZ5 wf2103MSy3x3lmdf3O0ANMbDGGCfOq/S6I0wrGkkqeDpFo0UIi36FfWurBa3+xgszfvL 10e2jxh9ec0mDhus0nYhBnE3apon3XQhuptskz/HcTlbHfSBBaClC5F9LfjmGltZhyZd I5Ug== X-Gm-Message-State: AOJu0YxMP1CSwKorsYSlyQRVj8QMECNEYFm6z6mDYw3+FW/GrelyXoe2 IDGHgfV4zhEEDigvd5uNzk6lsXPYYGRKmPVnxZw= X-Received: by 2002:a17:906:cc0f:b0:99e:f3b:2f78 with SMTP id ml15-20020a170906cc0f00b0099e0f3b2f78mr6530005ejb.67.1693843992290; Mon, 04 Sep 2023 09:13:12 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id e19-20020a1709067e1300b009a198078c53sm6305559ejr.214.2023.09.04.09.13.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Bastian Koppelmann Subject: [PATCH v2 06/22] target/tricore: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:18 +0200 Message-ID: <20230904161235.84651-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: target/tricore/translate.c:5016:18: warning: declaration of ‘temp’ shadows a previous local [-Wshadow=compatible-local] 5016 | TCGv temp = tcg_constant_i32(const9); | ^~~~ target/tricore/translate.c:4958:10: note: shadowed declaration is here 4958 | TCGv temp; | ^~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann --- target/tricore/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 6ae5ccbf72..9ca211b2a8 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -4962,8 +4962,6 @@ static void decode_rc_logical_shift(DisasContext *ctx) const9 = MASK_OP_RC_CONST9(ctx->opcode); op2 = MASK_OP_RC_OP2(ctx->opcode); - temp = tcg_temp_new(); - switch (op2) { case OPC2_32_RC_AND: tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], const9); @@ -4972,10 +4970,12 @@ static void decode_rc_logical_shift(DisasContext *ctx) tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], ~const9); break; case OPC2_32_RC_NAND: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nand_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; case OPC2_32_RC_NOR: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nor_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; @@ -5013,7 +5013,7 @@ static void decode_rc_logical_shift(DisasContext *ctx) break; case OPC2_32_RC_SHUFFLE: if (has_feature(ctx, TRICORE_FEATURE_162)) { - TCGv temp = tcg_constant_i32(const9); + temp = tcg_constant_i32(const9); gen_helper_shuffle(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); } else { generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC);