From patchwork Wed Jun 5 17:22:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 801594 Delivered-To: patch@linaro.org Received: by 2002:adf:cf0e:0:b0:35b:5a80:51b4 with SMTP id o14csp549487wrj; Wed, 5 Jun 2024 10:23:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtur5JEKQiELHwK+Y+VMstqSV7xMs65voVCRy6v45Z4gDa7Ri7klfpSU2BBfc13ygse5EkTU0A8Uk5vd6o8JBG X-Google-Smtp-Source: AGHT+IHV4BZgWatLX9as6Z0la/8tvt/Sn8azE4lo9KTCyT2BmKDGx0jOA7+xNLtTJ6x6jOQjSHjS X-Received: by 2002:a05:6870:169e:b0:24f:d4b4:698f with SMTP id 586e51a60fabf-25121c77f82mr3764848fac.1.1717608202455; Wed, 05 Jun 2024 10:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717608202; cv=none; d=google.com; s=arc-20160816; b=pEq78Wl3ZVd/N/VQnYZ6UL9voHNDqcG2qyadSTvz+yh4Xvxrh/HdNzlQLcChAS8lM4 wGf9Uvk2GQXA3oG7dJdPM4pvqHu99JHoXELcJG75PaEX56aY0U0x25ooYhYKz5jIFWnv lngymrab6v1ziMktoHIdg4m+iRXVdYhpaVLMj7ruAYPED5ZOrQf81Oa/A1JRhIP40uIC y6V0pvfCPft4SJkmbpDJI+7e2t356ZB/V0dsKXxxsFjrYAz4AIw0FznWHezIUdOcZ5iC TA/CuxhoddDV4kjlIAqDt4Kr1aytfap9nr3Kmqc/XlkdHtMVOKznzKozE0TPRsZ0CV2D qZ3Q== 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=Fljjc+vgV8n9jaU2H17cE0qlx4ZtzSc/592LQHPcA70=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=TJ+I8dx2ujvQjScYi42njGvNPcyB1kdpm4RFvOw5f5QUIXcjPmL3M2r4WrnAWYvnC5 h4PvnRQzBzt934AMMhDcnKWkIbK8m8UbhGL75bVwz2AcjpFQ1aIBDfVnQbIqK9oAfmVv TvbFRSP3P/FS5rKh7VEOSzF7PCb3J1O8wCwoEbVG6bBVZW5wmTIrFqnAEZdnhCS8GTdB 1uqHpxUMB8CGbT8QJkkh8bRUH7SU3J9LUXwhuGLnkMlpDSC2jxzq423yW6wqkbILARAB l6XLsAj/f6y2dBFnTx3J9rEbbhPe4vzNrdqVjbv9OLNTdVtYYRCD7JwjmX/3GwpiRuuW iNjQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyXCOy+h; 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 af79cd13be357-794f317f5bbsi382845685a.445.2024.06.05.10.23.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Jun 2024 10:23:22 -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=PyXCOy+h; 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 1sEuLq-0005rx-E7; Wed, 05 Jun 2024 13:23:06 -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 1sEuLp-0005rR-2P for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:05 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEuLn-0003ob-82 for qemu-devel@nongnu.org; Wed, 05 Jun 2024 13:23:04 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-6819b3c92bbso24385a12.2 for ; Wed, 05 Jun 2024 10:23:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717608182; x=1718212982; 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=Fljjc+vgV8n9jaU2H17cE0qlx4ZtzSc/592LQHPcA70=; b=PyXCOy+hacUZgIeEgUTH17qq6diiiG4Jhw5zvD74VSAWRHQE/ubPBwoHwQGa2vBKSk GVywIfCa/ysjUvJ1wXKXQLZI2m7L/jg+jbWL4a6elsvAC3R1lyHPrlXAgcagGIwYF3uT TXa869Uw1wpGmk1RGs8rLfNZ5HBe2dM42/Av5meJvmRpjSJVsw35sIlegpsp/JPdZAMj jS0/04H1StC8MSsoQDpqCnQs3/q2dsIfCx7maCyBapRLplAgazx2m+6oQta4vqwvltgw nw0kIc0LCV8OyQSf0SW1n2GvZgNtwSNAGJej85J7cK0+nmbmJoybbcXoJsogmySvebUW Aigg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717608182; x=1718212982; 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=Fljjc+vgV8n9jaU2H17cE0qlx4ZtzSc/592LQHPcA70=; b=lGWbslF+A5ecXHSF67E0e+KcauBbP/eIiYe8GnfBVtkz2DdZUo82DOIVdtu03PmFLw Sdzat/2jR1ogrmC1J33mlSfWA2d2O6151sA6d/phZ68m5V9lERTSx6m5QLkdbp5MCnYB 35DcYdsKCmCfhvzDUskbVTJRo3Gf+9xnU4BEx2Y1UCUoWxV/xJn8DT3V3qG8qjFADmNA GUmGnfd+tkJ88/+9A8IqK8idsMiPM/WwgLDBUpBuXlFNvWhXVNoV6XYZB/HYre89+Kuy NgoReRkseZ0OG5ArTYNPkcRlAsdppUJrLH5dzQxzTRNUMCKNHCeAUHeciySITt4F+mzd 9SKA== X-Gm-Message-State: AOJu0YziQOYaWTqW/+77rCh64ps4GfHJ7sJsNH2JGt5LwQmLtxiElrwJ IrDVEyaO1I6YTo+4bd3JuJt30tf6KpD3xdywky0h7fkTPxtMzRYHl+LOHbJWzP2PTol0C4dDIDy q X-Received: by 2002:a17:90a:ba18:b0:2c2:4129:aeed with SMTP id 98e67ed59e1d1-2c27db49769mr3478487a91.33.1717608181983; Wed, 05 Jun 2024 10:23:01 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2c28066d511sm1720915a91.9.2024.06.05.10.23.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 10:23:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 07/38] target/sparc: Remove gen_dest_fpr_D Date: Wed, 5 Jun 2024 10:22:22 -0700 Message-Id: <20240605172253.356302-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240605172253.356302-1-richard.henderson@linaro.org> References: <20240605172253.356302-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Replace with tcg_temp_new_i64. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/sparc/translate.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index f3c52c7c48..750a3e6554 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -241,11 +241,6 @@ static void gen_store_fpr_D(DisasContext *dc, unsigned int dst, TCGv_i64 v) gen_update_fprs_dirty(dc, dst); } -static TCGv_i64 gen_dest_fpr_D(DisasContext *dc, unsigned int dst) -{ - return cpu_fpr[dst / 2]; -} - static TCGv_i128 gen_load_fpr_Q(DisasContext *dc, unsigned int src) { TCGv_i128 ret = tcg_temp_new_i128(); @@ -2020,7 +2015,7 @@ static void gen_fmovs(DisasContext *dc, DisasCompare *cmp, int rd, int rs) static void gen_fmovd(DisasContext *dc, DisasCompare *cmp, int rd, int rs) { #ifdef TARGET_SPARC64 - TCGv_i64 dst = gen_dest_fpr_D(dc, rd); + TCGv_i64 dst = tcg_temp_new_i64(); tcg_gen_movcond_i64(cmp->cond, dst, cmp->c1, tcg_constant_tl(cmp->c2), gen_load_fpr_D(dc, rs), gen_load_fpr_D(dc, rd)); @@ -4345,7 +4340,7 @@ static bool do_dd(DisasContext *dc, arg_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src = gen_load_fpr_D(dc, a->rs); func(dst, src); gen_store_fpr_D(dc, a->rd, dst); @@ -4367,7 +4362,7 @@ static bool do_env_dd(DisasContext *dc, arg_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src = gen_load_fpr_D(dc, a->rs); func(dst, tcg_env, src); gen_store_fpr_D(dc, a->rd, dst); @@ -4407,7 +4402,7 @@ static bool do_env_df(DisasContext *dc, arg_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src = gen_load_fpr_F(dc, a->rs); func(dst, tcg_env, src); gen_store_fpr_D(dc, a->rd, dst); @@ -4498,7 +4493,7 @@ static bool do_env_dq(DisasContext *dc, arg_r_r *a, } src = gen_load_fpr_Q(dc, a->rs); - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); func(dst, tcg_env, src); gen_store_fpr_D(dc, a->rd, dst); return advance_pc(dc); @@ -4613,7 +4608,7 @@ static bool do_dff(DisasContext *dc, arg_r_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src1 = gen_load_fpr_F(dc, a->rs1); src2 = gen_load_fpr_F(dc, a->rs2); func(dst, src1, src2); @@ -4637,7 +4632,7 @@ static bool do_dfd(DisasContext *dc, arg_r_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src1 = gen_load_fpr_F(dc, a->rs1); src2 = gen_load_fpr_D(dc, a->rs2); func(dst, src1, src2); @@ -4656,7 +4651,7 @@ static bool do_ddd(DisasContext *dc, arg_r_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src1 = gen_load_fpr_D(dc, a->rs1); src2 = gen_load_fpr_D(dc, a->rs2); func(dst, src1, src2); @@ -4721,7 +4716,7 @@ static bool do_env_ddd(DisasContext *dc, arg_r_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src1 = gen_load_fpr_D(dc, a->rs1); src2 = gen_load_fpr_D(dc, a->rs2); func(dst, tcg_env, src1, src2); @@ -4746,7 +4741,7 @@ static bool trans_FsMULd(DisasContext *dc, arg_r_r_r *a) return raise_unimpfpop(dc); } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src1 = gen_load_fpr_F(dc, a->rs1); src2 = gen_load_fpr_F(dc, a->rs2); gen_helper_fsmuld(dst, tcg_env, src1, src2); @@ -4763,7 +4758,7 @@ static bool do_dddd(DisasContext *dc, arg_r_r_r *a, return true; } - dst = gen_dest_fpr_D(dc, a->rd); + dst = tcg_temp_new_i64(); src0 = gen_load_fpr_D(dc, a->rd); src1 = gen_load_fpr_D(dc, a->rs1); src2 = gen_load_fpr_D(dc, a->rs2);