From patchwork Tue Apr 26 16:30:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 566039 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp3765450map; Tue, 26 Apr 2022 09:53:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz32+qgz2hTZrjrX//s/ncIbuwlirKjN4MTvK1qjUwy4GY7nfdcjr7d1woywfWD1PdlRaYM X-Received: by 2002:a25:e0c4:0:b0:648:75aa:2b6e with SMTP id x187-20020a25e0c4000000b0064875aa2b6emr8633072ybg.468.1650991991315; Tue, 26 Apr 2022 09:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650991991; cv=none; d=google.com; s=arc-20160816; b=lF8WBCkL47cMcBqupqhqI6l9jotFY3VMSEF+3aaMFhF+LKfXt1YNSRd3CJ3cvQh8BS RXGyOyOzDPAZdBmm7vc0eFwqo1fjn0G2tP5BfjB//CFqTN9E9jGJhJ2UnjjNmRaJGKcM SlwQ25QxToxU1eeeK1VpcdYJSmINpscsrR4VSlt93OCGullzFkNSxJOQJhpqAQQuKOco /NO41l+Fzeeq3H3k2gDpF8Us/bpyGHR0tHVVQNhTjEQgX00FH3wfgWfPe4woEM1QD12L 4RdkmEKVm1JMEhifxiZia6rQgqTtjdXiVtiowGcluFr+BJI9C025nkQAQaaVKe44TfpM kM5Q== 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=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=YyB4dhnHONF0VMFdZ6324Fa35mLdCO46Xmnb08DLelf4SqXwP1556wTu6KdUvrqYIF X0IAnqYH7GJSQBJfgTiWlzIDLIRjTU404kwSACLtuYsJIuYQc+0FTeTzNv2rjQbH1W3I rl5xVG+5vKasXRQcI0BsLdDRzWsgEdGh5GGe3YUzuY7yW3p0eyqX1niemqegjYnp4BoJ /wslx/SogjDxKL7c+WxPs1B78szDsaKGd/bO69QYiD/EqmxL7jEls7QTyhfLdEzzAsmY ZnwVCovFcU3XMmTe0Zhd7R2wmXy6iFHusZUm3l0Pd83RVZvs2X88C3yy8n4fSbla72Oo 8a6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WoLXpdwG; 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 f5-20020a253805000000b00648a43987f1si2674352yba.400.2022.04.26.09.53.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Apr 2022 09:53:11 -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=WoLXpdwG; 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]:60928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njOR4-0004xp-Oc for patch@linaro.org; Tue, 26 Apr 2022 12:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njO5v-00036N-92 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:23 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]:44924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njO5s-0003ud-K0 for qemu-devel@nongnu.org; Tue, 26 Apr 2022 12:31:18 -0400 Received: by mail-pl1-x632.google.com with SMTP id j8so30704656pll.11 for ; Tue, 26 Apr 2022 09:31:15 -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=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=WoLXpdwGRb2nL1ysk4INTaM1lP8ndGyl7aus2HzolylQSxLcjOn56VXsRKsb6Km87Q l0lqiSWhdld+5pQN0efcEaLIo0Nw3UuKP03spBrZc+NtSp+WS5OeRYy5pfSZJ5+Fatp7 Y+30BuRMLRJ2LuKdI6cWxevBhCB1ONqvNO4MApaxIOUsZluKOdLugOMbaDw7+m6cQw2m JMFqpt7cmT1QNj5EeW+lb6ub/kRVr2B8zAheDzu2p4r14gVkYxjb6FpayQYtPTOj/s07 dQOl0WBqgLneEdWEE/gsyQj+KqxD0dgSFfWqPfYYEGeA8v96st/YBcK89gWMarvMQx/L R3KQ== 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=j8ZzQJaFsLEhBqWaL0qX7yYVNAnc01NjxlTahTgdBew=; b=biSipIrursEfIz5Kt7OVLnpAHgDp2Yvk+CoXEdU9YR03c7oqkH1/hRnIDHrMlxR7Ru pLYaAgkIQWCZjaAg6YoPYQpRMIbWI256KpwS4i2MA04GtkRCg1bHSEq4rQMOgPZtAoc9 NukzuLL3Fc8QWde+K19BbUSdmmajhzzS8D/wutgCEIvbB7ltiMRqa1kMoDf7de4rEeN3 mxUN0nWnQe3uvYMWXOlMND7NyVZDmWmOmR9pEA/HA0rhUsoHd9xuHOFmzK462QgdvNzo w1Smb7amfH85ZVAKtJvqg7HCupsu+v1A6c6jKlGcve/1gAQg9vbAg7yiUH0X1NojkpNo ay9g== X-Gm-Message-State: AOAM532ROtQJJpnMIcF8Gf9vc89bKUWqy+mE2UajIUDtxuAhlLMmB+9+ uT+beozxE13ckAq7Gpsv11Xje1WfMdDFxA== X-Received: by 2002:a17:90a:ba15:b0:1c6:7873:b192 with SMTP id s21-20020a17090aba1500b001c67873b192mr27873659pjr.76.1650990674784; Tue, 26 Apr 2022 09:31:14 -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.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 09:31:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 32/47] target/arm: Use tcg_constant in LDM, STM Date: Tue, 26 Apr 2022 09:30:28 -0700 Message-Id: <20220426163043.100432-33-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::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 24e522e1d6..e0469da0a1 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -8050,7 +8050,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n) { int i, j, n, list, mem_idx; bool user = a->u; - TCGv_i32 addr, tmp, tmp2; + TCGv_i32 addr, tmp; if (user) { /* STM (user) */ @@ -8080,9 +8080,7 @@ static bool op_stm(DisasContext *s, arg_ldst_block *a, int min_n) if (user && i != 15) { tmp = tcg_temp_new_i32(); - tmp2 = tcg_const_i32(i); - gen_helper_get_user_reg(tmp, cpu_env, tmp2); - tcg_temp_free_i32(tmp2); + gen_helper_get_user_reg(tmp, cpu_env, tcg_constant_i32(i)); } else { tmp = load_reg(s, i); } @@ -8123,7 +8121,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n) bool loaded_base; bool user = a->u; bool exc_return = false; - TCGv_i32 addr, tmp, tmp2, loaded_var; + TCGv_i32 addr, tmp, loaded_var; if (user) { /* LDM (user), LDM (exception return) */ @@ -8166,9 +8164,7 @@ static bool do_ldm(DisasContext *s, arg_ldst_block *a, int min_n) tmp = tcg_temp_new_i32(); gen_aa32_ld_i32(s, tmp, addr, mem_idx, MO_UL | MO_ALIGN); if (user) { - tmp2 = tcg_const_i32(i); - gen_helper_set_user_reg(cpu_env, tmp2, tmp); - tcg_temp_free_i32(tmp2); + gen_helper_set_user_reg(cpu_env, tcg_constant_i32(i), tmp); tcg_temp_free_i32(tmp); } else if (i == a->rn) { loaded_var = tmp;