From nobody Wed Nov 27 12:58:59 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1699215234; cv=none; d=zohomail.com; s=zohoarc; b=LW9OQuL1kggM6tK+7yzSh2v4X5J3a+dMySdA9S4E+CKytKPbGN2J0cB/aJ6yKsGDiJYv6WrTqQ9iNTdefY/Zf+cUtGg5REwVHG946u1R2Nd0v5pLuMBWs9AyE9hpn4TqHGuUy7/N3Af8BcheqN187NvASR5k3VDzRECvYemRnlM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699215234; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=J1YIzqOFSgMcnN6BcwtNadmOERabr9cbQIvdlvZH1EA=; b=ctLbf/kHxGtAiWcS9pkL2Jxjk4I8TuIJb17VVJhSgeYJE/YONEZTCZt0Sh6MF9D+TRGMEQ8VcgyvoYQmkkZ48vKdqlIx7EBAhuD7pWoNJPfvD5y2FSDd8Zykde1H6jjWHJLqgXUvlJAkfRUq7O0Osy0d9AO2Wk/XFDnj+rfgTV8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1699215234531273.511708241008; Sun, 5 Nov 2023 12:13:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qzjUB-0003RA-IW; Sun, 05 Nov 2023 15:12:43 -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 1qzjU7-0003O5-Ep for qemu-devel@nongnu.org; Sun, 05 Nov 2023 15:12:39 -0500 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzjU5-0002AE-QA for qemu-devel@nongnu.org; Sun, 05 Nov 2023 15:12:39 -0500 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3b2e44c7941so2521057b6e.2 for ; Sun, 05 Nov 2023 12:12:37 -0800 (PST) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id u23-20020a056a00099700b006884549adc8sm4359777pfg.29.2023.11.05.12.12.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 12:12:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699215156; x=1699819956; 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=J1YIzqOFSgMcnN6BcwtNadmOERabr9cbQIvdlvZH1EA=; b=Ximxj220XcPmDSdnSbGF6hP7NB9DLVVuBFWM+NnqUfAvO8W6DRd+aQ5McsmNll8Z4U 0TMesuXwjErD+5iPHtMwzZvZgK8ySmkEuFcq5rj8i6HmWMFWUFx6Pz3JZI3mAvX6SHMF FTKOQ16tDzV46ShkuFhhNWc6VbrxdKqP07N5Vz98X8NmNvCe/OK+0PdMCFP9T4hraJ5a gq5pnvkZq5DK8JVYo4JPQDwX+e5M685fDH8grL8+uDzTLFH7tgbIAZSVZ+uVibyC0m5s 59j54HT7CQASKQo6vF4QrxD/DuVeMekfV7EzmJMvXGg2Ly4Zzy1sQ4ZLHB+8NYibtDV9 BwCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699215156; x=1699819956; 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=J1YIzqOFSgMcnN6BcwtNadmOERabr9cbQIvdlvZH1EA=; b=qzbB9WHiKPP93tMN6KNiocPYKvYTHDKcjMFaj3nZMqE5gYu4NXFym4RMiHESIPNrYc 3PZL8IwF9NcR8X2YPrtkj2kyVRJja333hQyPa6S0EC1BlJPHiTWE/uTNpQ8A82dpsPsJ 2/lk8BcGVz+bFCrtzH6z4salTmef+/JU0UbTeJSLEOVOc3tJwBF8RuHZpkGzYGBk6Rsv FNIAkbnhchQzicTeUcwUs2fAwrTJmYOXvrHiRWm0DljGSLm+L5ftHdnsj1y8s0N6UM1d dlGZ6Ya82DvaC6zN8zSzTjYQxnArUsuHDQOmYH99K3X+knZRloYWIrRBgDyJlAtv985f uQpw== X-Gm-Message-State: AOJu0YxPYJcWQdrx3x65tMGde2yG/GfhlIMYhikG1oES+eLyCfR5BsxQ Q0pON1RvImPBoC3cGpAfQ/p4uyRbOrm4dLaveak= X-Google-Smtp-Source: AGHT+IGs7iaONpqdFwFTIrWAmcleK/ATBn9989EsFuBS5mwzchpEDo+7zdknmgtVZy7xsA2OoFmjvw== X-Received: by 2002:aca:1a02:0:b0:398:5d57:3d08 with SMTP id a2-20020aca1a02000000b003985d573d08mr28443756oia.37.1699215156742; Sun, 05 Nov 2023 12:12:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 15/21] target/sparc: Pass displacement to advance_jump_cond Date: Sun, 5 Nov 2023 12:12:16 -0800 Message-Id: <20231105201222.202395-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231105201222.202395-1-richard.henderson@linaro.org> References: <20231105201222.202395-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x232.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1699215236868100006 Content-Type: text/plain; charset="utf-8" Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/translate.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index cbee5435a3..1233911b69 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2379,8 +2379,9 @@ static bool advance_pc(DisasContext *dc) */ =20 static bool advance_jump_cond(DisasContext *dc, DisasCompare *cmp, - bool annul, target_ulong dest) + bool annul, int disp) { + target_ulong dest =3D address_mask_i(dc, dc->pc + disp * 4); target_ulong npc; =20 if (cmp->cond =3D=3D TCG_COND_ALWAYS) { @@ -2475,11 +2476,10 @@ static bool gen_trap_float128(DisasContext *dc) =20 static bool do_bpcc(DisasContext *dc, arg_bcc *a) { - target_long target =3D address_mask_i(dc, dc->pc + a->i * 4); DisasCompare cmp; =20 gen_compare(&cmp, a->cc, a->cond, dc); - return advance_jump_cond(dc, &cmp, a->a, target); + return advance_jump_cond(dc, &cmp, a->a, a->i); } =20 TRANS(Bicc, ALL, do_bpcc, a) @@ -2487,14 +2487,13 @@ TRANS(BPcc, 64, do_bpcc, a) =20 static bool do_fbpfcc(DisasContext *dc, arg_bcc *a) { - target_long target =3D address_mask_i(dc, dc->pc + a->i * 4); DisasCompare cmp; =20 if (gen_trap_ifnofpu(dc)) { return true; } gen_fcompare(&cmp, a->cc, a->cond); - return advance_jump_cond(dc, &cmp, a->a, target); + return advance_jump_cond(dc, &cmp, a->a, a->i); } =20 TRANS(FBPfcc, 64, do_fbpfcc, a) @@ -2502,7 +2501,6 @@ TRANS(FBfcc, ALL, do_fbpfcc, a) =20 static bool trans_BPr(DisasContext *dc, arg_BPr *a) { - target_long target =3D address_mask_i(dc, dc->pc + a->i * 4); DisasCompare cmp; =20 if (!avail_64(dc)) { @@ -2513,7 +2511,7 @@ static bool trans_BPr(DisasContext *dc, arg_BPr *a) } =20 gen_compare_reg(&cmp, a->cond, gen_load_gpr(dc, a->rs1)); - return advance_jump_cond(dc, &cmp, a->a, target); + return advance_jump_cond(dc, &cmp, a->a, a->i); } =20 static bool trans_CALL(DisasContext *dc, arg_CALL *a) --=20 2.34.1