From patchwork Wed Nov 1 04:11:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 740047 Delivered-To: patch@linaro.org Received: by 2002:a5d:538f:0:b0:32d:baff:b0ca with SMTP id d15csp97098wrv; Tue, 31 Oct 2023 21:14:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEcHGO1LHT2lLmsMrE0aZTQJJWh/PDd9Uk3VEnnyl1jzurW1KV+BMXsH1wZIj1fRjRT7Z1x X-Received: by 2002:ac8:5c46:0:b0:418:a80:4529 with SMTP id j6-20020ac85c46000000b004180a804529mr7044296qtj.16.1698812064051; Tue, 31 Oct 2023 21:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698812064; cv=none; d=google.com; s=arc-20160816; b=dqyUHOtZLksMqKMK6iCw66jlaVHhKuFJiEKIpTAzrKJZ0NF7d4eyJducssXsZJFdZu vlObdgO8pNYzzutmanEB4vtbH6YTByjRyDTZVH4/9f/m08uR/a6i3/cVCvyWxXbI7lH4 4Eu5Sudikmk7modk9CBXU30JwbxgvDa/tB9g5Bd/mYCJZw3C1kcetJguWGjlGxQ5uL8d du2zZZSVlQlWc+opQMPEd4WBP9DSzVv8cbjGW9Nz2UtgXwRXwv042QOcDFj6J7SVSdxC jMMqy9Q+KQJnEPJ4uVxt4faQbGUS6SaE77GIA+cEsEKoQKODIExeoi0noHrjEu4Y2hU6 iMKw== 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=zI0pCBQLHasJTvgPVEjz4kIyqL9hNkSrswDbsWUPfUs=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=qKFiXb+efmytY8qY6wiReIaEbma8c3XDJI5e9cZjyGg9Fz4q80yIcp3uTLAtOYugjZ WVB+ED3Ff9tX3GXDI8Qkjwo9HM34dGIZtkekR6n2MVfNa2v5wVcCpaHlzVWs0H/GXs0z 4ZcLsLM9gRVNq7KSpPz7LY7WAFkVUmlbiqup8fRZKYF1NoPspA40TQuXc32lqqC3fyVP 8EnKqVLQ+cHnfXhid3v/aT+0TZvptrm41nFfftCHffx7EfwqjljW99sIz1iCLt4cOSLW lI2Lzv9jWVbEziYKetkca6BWqZF1nitD9ytPyijH4u75SbMc8EQP4MI+jOHKuXhwqmLX hlFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgEL0II3; 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 h15-20020ac85e0f000000b0041965cec4bdsi2275529qtx.140.2023.10.31.21.14.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Oct 2023 21:14:24 -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=dgEL0II3; 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 1qy2aC-0005ya-AG; Wed, 01 Nov 2023 00:11:56 -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 1qy2a8-0005xr-JO for qemu-devel@nongnu.org; Wed, 01 Nov 2023 00:11:52 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qy2a1-0007Yt-MX for qemu-devel@nongnu.org; Wed, 01 Nov 2023 00:11:52 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6bf03b98b9bso366622b3a.1 for ; Tue, 31 Oct 2023 21:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698811904; x=1699416704; 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=zI0pCBQLHasJTvgPVEjz4kIyqL9hNkSrswDbsWUPfUs=; b=dgEL0II3CQ40zdMptulEjiT/PdrI539jaw/v5OckCMTEIrxEoA1w98P0aVs9iW71P+ bxAGpaxV5RmH+RcxvP0q6bdK2sMV86XmgPPh4YIJdrVkp0Wj0ujtAJOxC38RxjLibWPY YsaEeDIMni5cQLFsU8y3fj5FXWxgF3x9DsOta8NJN86kwmgW4I9sVDSSUZuaGrJ5VzID lUCZfP5lxzvd9EbHISJkLecopgFQYMaYoBGMXKkCGEh/o8UJOQ5R3PgntRJRz8gDSv3+ dps0ZYrUa/6U5ZHCXtM3nLUi/d/sbiHqnC5v8X/0nKZANC+OoU7QsAj/+yyZDXwQy7rn 95ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698811904; x=1699416704; 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=zI0pCBQLHasJTvgPVEjz4kIyqL9hNkSrswDbsWUPfUs=; b=lOd4CX5v2mPC4KSVUCE0y5oQXK/j2NOno/3s1y2k2uDdj0CGCFyzDyoxOBGvICEJDz 6Fxrf8sRAaxX2nsUNKn1B7EfPi1p+/xCglvWBSIPtwE85gbe5Xffn6yg3T/cyysL4I+t kW+Ovr+hrJsw4zwzXxZGDd6JUOhYGaeJjw/CU/UvFJBLMthx8iirIbvJUHjCuZCaDBvP fkxB04NtkPUMnNuYB0LBF7xLBZyK3z0fZ3I3uG5+0MqC/aHU25vXN5jska/Un6Xzi8U3 btKiC7xVC2fzzKTPSA4UsbLEGr50BETsbD+EdfJtcg/SE4IF8r+oQMA+9Lp/6EbDnc0p aXdw== X-Gm-Message-State: AOJu0Yz7i456u+ujozFSb044QXXsgzAgc4h46Y6FBXX/JUdjs4jXIDj8 +7XMoqALzm8Zh5WhcNILqroGv+Wnrb/6oM/1Cuo= X-Received: by 2002:a05:6a21:33a1:b0:177:a131:f31c with SMTP id yy33-20020a056a2133a100b00177a131f31cmr6260887pzb.13.1698811904289; Tue, 31 Oct 2023 21:11:44 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k8-20020aa79728000000b006875df4773fsm359576pfg.163.2023.10.31.21.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 21:11:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 12/21] target/sparc: Do flush_cond in advance_jump_cond Date: Tue, 31 Oct 2023 21:11:23 -0700 Message-Id: <20231101041132.174501-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231101041132.174501-1-richard.henderson@linaro.org> References: <20231101041132.174501-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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, 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 Do this here instead of in each caller. Signed-off-by: Richard Henderson --- target/sparc/translate.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index dd6d43d1f1..2e7deb5e33 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2407,7 +2407,10 @@ static bool advance_jump_uncond_always(DisasContext *dc, bool annul, static bool advance_jump_cond(DisasContext *dc, DisasCompare *cmp, bool annul, target_ulong dest) { - target_ulong npc = dc->npc; + target_ulong npc; + + flush_cond(dc); + npc = dc->npc; if (annul) { TCGLabel *l1 = gen_new_label(); @@ -2481,8 +2484,6 @@ static bool do_bpcc(DisasContext *dc, arg_bcc *a) case 0x8: return advance_jump_uncond_always(dc, a->a, target); default: - flush_cond(dc); - gen_compare(&cmp, a->cc, a->cond, dc); return advance_jump_cond(dc, &cmp, a->a, target); } @@ -2505,8 +2506,6 @@ static bool do_fbpfcc(DisasContext *dc, arg_bcc *a) case 0x8: return advance_jump_uncond_always(dc, a->a, target); default: - flush_cond(dc); - gen_fcompare(&cmp, a->cc, a->cond); return advance_jump_cond(dc, &cmp, a->a, target); } @@ -2527,7 +2526,6 @@ static bool trans_BPr(DisasContext *dc, arg_BPr *a) return false; } - flush_cond(dc); gen_compare_reg(&cmp, a->cond, gen_load_gpr(dc, a->rs1)); return advance_jump_cond(dc, &cmp, a->a, target); }