From patchwork Tue Apr 26 16:30:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566021 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3753676map; Tue, 26 Apr 2022 09:36:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFqNDOV2QCFDc0dVfrxLGYXOgWeEwatpa6lhYY3ZS3YocYKdXKjsPqMHTgsD+Lu9h+NZOk X-Received: by 2002:a05:6902:1083:b0:624:6892:5495 with SMTP id v3-20020a056902108300b0062468925495mr22844780ybu.379.1650990986214; Tue, 26 Apr 2022 09:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650990986; cv=none; d=google.com; s=arc-20160816; b=RWNwFg4AgzGbXGlv6tWtJaoIErWe4df+/arfxbpM8k5gMBud9ot2ujAqhKFFDlwwGW y6GjxHaCx/vCz/0YDfy7JgJ27QCDZiqNvGogKVL8861nDzdSbDhf33t327VXrCrLA6SE zpVkFZs+GCB9RIpKBJQNVMhVGslDOcCtkM2Zn3deatP/oL6l8G/vsv/rG9wmBXxfKL5X jh7mLDR2cgv7wuTkQBRt5RhmXGNLVMTJ2qkfBq5paAnNKHhRiQDB0B8W7M6+lHeNFxqt SMHJBRte06fBtbsyoyOFb90EnSKMGEiW6FdIGPpkcBXXa8bQU8vRpsSYOYZFwXM8sfTQ 2/wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:from :dkim-signature; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=MaZSsGzgEiPGKtvKPxEAIH1NzLWu0BuYaygr0s5rAAb9g08zmYoAi01hM9+f3rFDKD 7SUNbN1aPdoqVHlqPBUhz4/bpMh64u542BUQGlVJPB2Nal2AZJ1U0VC1hZcFns1fpAb1 miIIdSqWQUj2CNJ3WUNHV6yr7Sn2Gr3ggUc8RDRrrBWbmLzeniBC6bGNpnzWTtqmqwd3 td9rkqpXqRHC83Sq7miQhvlRgPu9afjoyG611haTrZArc+Xv/EO6zCajRKH5q+GAkj7R wfA9i/n2TvzeM3fI+XG2RYWYXiMiyJdChVf27yq8N//+7t/2zzAHCzlNqGXWB9Yu5vIF 8FpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ncY5yoLu; 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 w10-20020a0dd40a000000b002f4e5b031bfsi11210051ywd.125.2022.04.26.09.36.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:36:26 -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=ncY5yoLu; 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]:38862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOAr-0003Ne-NW for patch@linaro.org; Tue, 26 Apr 2022 12:36:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5f-0002xU-3w for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:04 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:45666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5c-0003nR-4W for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:02 -0400 Received: by mail-pl1-x630.google.com with SMTP id h12so27010424plf.12 for ; Tue, 26 Apr 2022 09:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=ncY5yoLujCFy3hnVOiZOY1fjkRRlP6lxgeND3uivk2cNkfWQLUr8co2rHUdReRL/aq Yprj9caZ/DBw8MVpdnh/U/vhlww7Hq1aoI/iIOwtufuHenPy1etg3j5u5Ory3TI1Ii+c aBu10NQSvhweTsSBDP9rhBYyVPaW3qqaVF7owPQrJ2k1Kf2uOcsEPRW2da+JkcbpfhhV VrAECkSrN8Snx+38D5uho1wPLUBBmopeTAPTOzvNcGoE4d1DGS3D9gAOCFADxZietp0l DpbK+IHFf7j9M+4st3fvrLnuIZ0YA4Nx28FvwvXX+4TJGaL086W14cViRg6lyF4Nbd44 JSeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DozsVFM8TLDnuoUizPakS5ZW3NXzpPygo/avvBFMmuk=; b=zqxggzQj2suTkF+AETJCPaiHeIM0LkDtArDvVZobRUB+Yd0UnQ+u/CV9okYxyvdpz5 1R0g2zkR3mi70QMM75LsB4KHSdD9dBCGXY1UETBfSzMOpvnZLNBd929A3xHNS/xCi8Z7 V7/j/x07os+Ag0Dpso4y3P8nOmxvrj17mZxitHrk6KrSVzTyFx5tjFrgGKs26arxISav J6PPI0mMm1jA48U4z/hh48WcjPj4OS1ZcVssbaYaDr2VhIiVcNAfrv8o5m7ZvMascPkS Eo2+VEcbRNVke4dAp4NyF0D98kYLbjNCFUGQUuXsFjoNiTJmC5qjoy0QbFVFLepZv3+o VFIg== X-Gm-Message-State: AOAM530NCtIqo81nEXvTs+wb0pE95EU416dGB5ijsDqgY+Z69qamfTV2 2+tuQc2krxZO9ZYzA1r0hXh9VhtfJiTxlQ== X-Received: by 2002:a17:90b:1d12:b0:1d9:8499:545d with SMTP id on18-20020a17090b1d1200b001d98499545dmr10554875pjb.96.1650990656879; Tue, 26 Apr 2022 09:30:56 -0700 (PDT) Received: from stoup.. (174-21-142-130.tukw.qwest.net. [174.21.142.130]) by smtp.gmail.com with ESMTPSA id y131-20020a626489000000b00505a8f36965sm15655813pfb.184.2022.04.26.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:30:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 11/47] target/arm: Use tcg_constant in disas_add_sum_imm* Date: Tue, 26 Apr 2022 09:30:07 -0700 Message-Id: <20220426163043.100432-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220426163043.100432-1-richard.henderson@linaro.org> References: <20220426163043.100432-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 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: , Cc: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-a64.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 4cdc869d52..6c88772eb3 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -4178,13 +4178,12 @@ static void disas_add_sub_imm(DisasContext *s, uint32_t insn) tcg_gen_addi_i64(tcg_result, tcg_rn, imm); } } else { - TCGv_i64 tcg_imm = tcg_const_i64(imm); + TCGv_i64 tcg_imm = tcg_constant_i64(imm); if (sub_op) { gen_sub_CC(is_64bit, tcg_result, tcg_rn, tcg_imm); } else { gen_add_CC(is_64bit, tcg_result, tcg_rn, tcg_imm); } - tcg_temp_free_i64(tcg_imm); } if (is_64bit) { @@ -4232,12 +4231,9 @@ static void disas_add_sub_imm_with_tags(DisasContext *s, uint32_t insn) tcg_rd = cpu_reg_sp(s, rd); if (s->ata) { - TCGv_i32 offset = tcg_const_i32(imm); - TCGv_i32 tag_offset = tcg_const_i32(uimm4); - - gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn, offset, tag_offset); - tcg_temp_free_i32(tag_offset); - tcg_temp_free_i32(offset); + gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn, + tcg_constant_i32(imm), + tcg_constant_i32(uimm4)); } else { tcg_gen_addi_i64(tcg_rd, tcg_rn, imm); gen_address_with_allocation_tag0(tcg_rd, tcg_rd);