From patchwork Thu Mar 9 20:04:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 661108 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp501570wrb; Thu, 9 Mar 2023 12:19:23 -0800 (PST) X-Google-Smtp-Source: AK7set96cQ4j6HhAhy1+8hXTDjb0t0bItg0dbGWdJb1zZWpEbxzIMax52hr4xfcEOw023EOnv0E0 X-Received: by 2002:a05:600c:35c9:b0:3e2:1f00:bff7 with SMTP id r9-20020a05600c35c900b003e21f00bff7mr136627wmq.12.1678393163133; Thu, 09 Mar 2023 12:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678393163; cv=none; d=google.com; s=arc-20160816; b=dMwCQBJgFAKWjKJSR1Jbt+ZL9iRPvrpObKnBv4GOChIRqXhkq1R8wqDCVrR6J1dnVK ycrZP8SkNqiJhXex4qFMD0RmuKoAlyNZGCSYKi28wZ1DoxVU3aeynvgwHynHaiqN1dv4 kkOvsPKtQvo7gsueqWD6HX4hSLFqqHdbkjT5nsUevy6jfLn/fBF22Ar0Ueonp/g716OX aqL6UW+DQSIujR/MtyhImX/OTcN1WgowIQG1CFn6HodoAMVH4CHdyL28xvSzRgkZQiJL D/4Z8chNfVjJmPGi2FZ5b0QxeyReIUheeyjslr+TRZoXG/PFZcdLPIyy+PNdd6oMnOL0 VbDA== 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=+dzaTq4Hk7e5zysi1fCZtiBija1HdA1vnsnzcrh5iSw=; b=Bq8hisHifwVGfRmZdDIxmxva5jIFzN+d+n5KkZR5np5+hM1wACWK61SJ9yeu1IRQcR YnQUYDXN4s++Qp48AwGfz+tk4vj2Zdjaio3sBJMDdGYMlvi5yEb/aqEeGwPh2W9nM5GA wQ83mAP+WzlVzvaFkDgkc1FHlIl5nlun5Umvd5fqERIvNrtssBaNR6tQK4svb6so9Ueg 6L3M3NE1wDfhhqjS28DJG16ew7JnUGClPYX9bhT+ikuD05TX3EX3thNAuYoViFeeJ0AN 2Fd2pOdTdzJAs9M8JpN2sDvk1Lv6PgLrvK6sEQ0DAsnXx5LO9R3gDfctFk8Lq0B+qQbw 0h5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qWWZzLzy; 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 m15-20020a05600c3b0f00b003eb4b4ca47csi898464wms.41.2023.03.09.12.19.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Mar 2023 12:19:23 -0800 (PST) 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=qWWZzLzy; 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 1paMX2-0004sP-96; Thu, 09 Mar 2023 15:06:32 -0500 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 1paMWz-0004ji-BV for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:06:29 -0500 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paMWx-0000p2-QV for qemu-devel@nongnu.org; Thu, 09 Mar 2023 15:06:29 -0500 Received: by mail-pj1-x1030.google.com with SMTP id y15-20020a17090aa40f00b00237ad8ee3a0so3012898pjp.2 for ; Thu, 09 Mar 2023 12:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678392386; 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=+dzaTq4Hk7e5zysi1fCZtiBija1HdA1vnsnzcrh5iSw=; b=qWWZzLzyjdTq6u+okw+af900gxC2+RqOC5yg1P+E84joHyZYpbrBp4P1gtACq+7wgx gTFJSMpF7CcLLnbiBYrnJl3MwZ6zdUKT7a81aVpcxlq52KMIhE9hEGjFqkNjEsZjqqTx qjJ4TQnt86cKvs1PHydkcoyncWVhNrSFMzAKJvEhSBI4Ah//Bz9rbNHASd+LQ0l52oSm YIXD6SwOiDTGXsmMPIwGM0aDMZa9HIVmFt0B82eidlI+3GQ8OklOv06BluZXoU8JCDwF yk/bR4TftxRjBkzzQgdwLRUV+PN4uwezIcRiHgv8vtFnMVAgMYzpCkU0Zb4xAdcTT8+O qeoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678392386; 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=+dzaTq4Hk7e5zysi1fCZtiBija1HdA1vnsnzcrh5iSw=; b=UJ0zqNvpQOHlNn8cmieb5juEhSoNq5rNcZsTjqiMlkhGASxBhdehwplcDGqjMhvRmp G6gi60fE2A57DlXOtTeuRBX5zSQLNXsNKVZZRL9l/xlWz9VX9rQCe+5Eg3s80rIxldPM QxqMvvs/EPm5uZAt/dtflNXtrry2r7jEr+LDtl/LqRUqLbz6xncY2HtqOFkHmenJOW9A xx5IFWnfA6TTNjPyLxdyqGJ8V3vvy0p/7jxZnOa34SCutvxZOyj6YR/H/7B+UDSS4W4K dc8I67qG3HkMWjRLtuf/SUhEHpie7gkS/CwneHxgler3ADnk/GKwNJ+IXhYddOVr9URp oeKw== X-Gm-Message-State: AO0yUKXQ+e7NDgviAukll1ot2HLsOUBrP2ZW80pD8bcNJahwcCvdzyck GcIObkBWURIbYvEUyDcWk8NKT5NOkP6+Zne5uDI= X-Received: by 2002:a17:90b:38c7:b0:234:b03:5a70 with SMTP id nn7-20020a17090b38c700b002340b035a70mr23919769pjb.35.1678392386427; Thu, 09 Mar 2023 12:06:26 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:bf7f:79a0:a976:bdaf]) by smtp.gmail.com with ESMTPSA id t20-20020a17090ad15400b002340f58e19bsm308083pjw.45.2023.03.09.12.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 12:06:26 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL v2 39/91] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS Date: Thu, 9 Mar 2023 12:04:58 -0800 Message-Id: <20230309200550.3878088-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230309200550.3878088-1-richard.henderson@linaro.org> References: <20230309200550.3878088-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1030.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=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The use of separate data/port variables is existing practice elsewhere, e.g. SBI, CBI. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/avr/translate.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/target/avr/translate.c b/target/avr/translate.c index b9506a8d86..190d0c3f97 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -1288,12 +1288,13 @@ static bool trans_SBRS(DisasContext *ctx, arg_SBRS *a) */ static bool trans_SBIC(DisasContext *ctx, arg_SBIC *a) { - TCGv temp = tcg_const_i32(a->reg); + TCGv data = tcg_temp_new_i32(); + TCGv port = tcg_constant_i32(a->reg); - gen_helper_inb(temp, cpu_env, temp); - tcg_gen_andi_tl(temp, temp, 1 << a->bit); + gen_helper_inb(data, cpu_env, port); + tcg_gen_andi_tl(data, data, 1 << a->bit); ctx->skip_cond = TCG_COND_EQ; - ctx->skip_var0 = temp; + ctx->skip_var0 = data; return true; } @@ -1305,12 +1306,13 @@ static bool trans_SBIC(DisasContext *ctx, arg_SBIC *a) */ static bool trans_SBIS(DisasContext *ctx, arg_SBIS *a) { - TCGv temp = tcg_const_i32(a->reg); + TCGv data = tcg_temp_new_i32(); + TCGv port = tcg_constant_i32(a->reg); - gen_helper_inb(temp, cpu_env, temp); - tcg_gen_andi_tl(temp, temp, 1 << a->bit); + gen_helper_inb(data, cpu_env, port); + tcg_gen_andi_tl(data, data, 1 << a->bit); ctx->skip_cond = TCG_COND_NE; - ctx->skip_var0 = temp; + ctx->skip_var0 = data; return true; }