From nobody Tue Nov 26 14:17:27 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=1706853378; cv=none; d=zohomail.com; s=zohoarc; b=VQfQTp92oihUfEb3nn3MKvNA/XMMT7+9OTPZDmMZTBgdBEAfEvQ6UeP/qwv9mv1FzPcF6J+FVy0uZY/KJKb7EDH3HNy+aoQylqNq5BBNkN4XelhxwfqW67v38T27yVeXJeYBFRMZo6/P8fCkqEBpREHJ8bZVqV2x6h9PgQB5VPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706853378; 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=xswm8Y4EVntAPydwJ8PJUaf0qkJ0h3e6mOU1vrp0dGE=; b=DErHx91ZnMyyVtY8eaFrMAAh6J1jpAjXcOiai1ikNV6GOxtAuDb9hTq2TgBh41xuhDaJDkqTxP8rJY99Zryhqy5AroyDtxfpsPyDHCePpPU9Ns+pIFTeNCrPvu8ZlyzR9ZF+RQBFdUyVw5+N0uo/xiuPvHhs+arJb4h0+38fZro= 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 17068533786531018.6892024013035; Thu, 1 Feb 2024 21:56:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVmWb-00073U-HR; Fri, 02 Feb 2024 00:55:41 -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 1rVmWa-00071Z-Hn for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:40 -0500 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVmWY-00039V-UX for qemu-devel@nongnu.org; Fri, 02 Feb 2024 00:55:40 -0500 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1d9607f2b3aso3073395ad.0 for ; Thu, 01 Feb 2024 21:55:38 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id je5-20020a170903264500b001d8a80cbb15sm752059plb.238.2024.02.01.21.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 21:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706853337; x=1707458137; 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=xswm8Y4EVntAPydwJ8PJUaf0qkJ0h3e6mOU1vrp0dGE=; b=w5AMC/ZOg5b62eUEol6KHNgHQNHD1NyRUNVwhecLG+AtKsqkmBGjgrZcbmhiOZ534G +TdhdERVbNoM4Su/rOdw8CqJGraU8BEymHZmEOQRS+5z5UjZNhXDdC98CTbDBeQr9TVm Oh+nbRV3FMqxiEVrfQB1cTptquldnlsYKTnJ0VMlWbjOXykY9dhJsllClC8fe3Ro5laT R+7OaMZqngcflm6hsYEi8U4Cw5AzS5I+VB21HqB0wc7Al7OZfme8DcERQuJcp1SviqN+ 1AaldRQ9d7/6Mk2jf6vlhgOvQGurPr9nwv7WnjqXTx+0mu8GJCg17XxOWQ6bBnTSzs7k PmpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706853337; x=1707458137; 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=xswm8Y4EVntAPydwJ8PJUaf0qkJ0h3e6mOU1vrp0dGE=; b=CBPR3oDUHjYGsUgwTV8tRqKTy+X9R3I+ADgviWsGKyn4YJ/hZhosPSCHMbZlCynQ2G l7/TMnhgGWrbW7F0q7g0pJjQYHefkMgITamn04wiUpGBcXLQTDqEKokKaiNwHpENrH0d 2ECvlj7NqkKtDiyXgoNQaqHGkfJYRAzny1dnefE5y5Ljl2hxQgWh+LWWJ6LuBp4yWD8Y 7cK+Ir6aiI5dIJK0AhF39MAnpNVr756DpMrdmQK3j824+hoB7RZBPMqbvJzZyMf7uvYb hc+UthjlQMkknzTkQpC08qQp7rHsz38OuBVj5zeLgNUxocmazThCv8r2mS/EQricnUSk uh+w== X-Gm-Message-State: AOJu0Yw5Alh6pv1WzMgGZRmWLdtVQl+Y1N1athYaaL65KlFx8OqJ9UCZ GjknJVXJFeJqsrv0owGgnEBS2FfbCCFgzt4wfPSl/DgghV3T+RWmb3+lm0BUdBt1737Qd2IxROp eCSI= X-Google-Smtp-Source: AGHT+IFWaA1tkgiiwjpkrvC5aXlOkD8ksLnbC5TFsGreY06/8Gg9EyEeO36++IEhFOG84C/TqFKBzA== X-Received: by 2002:a17:903:32c5:b0:1d7:19ec:2eaf with SMTP id i5-20020a17090332c500b001d719ec2eafmr1943574plr.6.1706853337693; Thu, 01 Feb 2024 21:55:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 52/57] target/sparc: Clear cexc and ftt in do_check_ieee_exceptions Date: Fri, 2 Feb 2024 15:50:31 +1000 Message-Id: <20240202055036.684176-54-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240202055036.684176-1-richard.henderson@linaro.org> References: <20240202055036.684176-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::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: , 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: 1706853379337100001 Content-Type: text/plain; charset="utf-8" Don't do the clearing explicitly before each FPop, rather do it as part of the rest of exception handling. Signed-off-by: Richard Henderson Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20231103173841.33651-18-richard.henderson@linaro.org> --- target/sparc/fop_helper.c | 2 ++ target/sparc/translate.c | 16 ---------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/target/sparc/fop_helper.c b/target/sparc/fop_helper.c index 22b412adb5..64f20e78f1 100644 --- a/target/sparc/fop_helper.c +++ b/target/sparc/fop_helper.c @@ -50,6 +50,8 @@ static target_ulong do_check_ieee_exceptions(CPUSPARCStat= e *env, uintptr_t ra) target_ulong status =3D get_float_exception_flags(&env->fp_status); target_ulong fsr =3D env->fsr; =20 + fsr &=3D FSR_FTT_CEXC_NMASK; + if (unlikely(status)) { /* Keep exception flags clear for next time. */ set_float_exception_flags(0, &env->fp_status); diff --git a/target/sparc/translate.c b/target/sparc/translate.c index da4f167fa6..67bac6f65f 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4524,7 +4524,6 @@ static bool do_env_ff(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); tmp =3D gen_load_fpr_F(dc, a->rs); func(tmp, tcg_env, tmp); gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); @@ -4546,7 +4545,6 @@ static bool do_env_fd(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); dst =3D tcg_temp_new_i32(); src =3D gen_load_fpr_D(dc, a->rs); func(dst, tcg_env, src); @@ -4590,7 +4588,6 @@ static bool do_env_dd(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); dst =3D gen_dest_fpr_D(dc, a->rd); src =3D gen_load_fpr_D(dc, a->rs); func(dst, tcg_env, src); @@ -4613,7 +4610,6 @@ static bool do_env_df(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); dst =3D gen_dest_fpr_D(dc, a->rd); src =3D gen_load_fpr_F(dc, a->rs); func(dst, tcg_env, src); @@ -4661,8 +4657,6 @@ static bool do_env_qq(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); - t =3D gen_load_fpr_Q(dc, a->rs); func(t, tcg_env, t); gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); @@ -4685,7 +4679,6 @@ static bool do_env_fq(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src =3D gen_load_fpr_Q(dc, a->rs); dst =3D tcg_temp_new_i32(); func(dst, tcg_env, src); @@ -4710,7 +4703,6 @@ static bool do_env_dq(DisasContext *dc, arg_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src =3D gen_load_fpr_Q(dc, a->rs); dst =3D gen_dest_fpr_D(dc, a->rd); func(dst, tcg_env, src); @@ -4808,7 +4800,6 @@ static bool do_env_fff(DisasContext *dc, arg_r_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_F(dc, a->rs1); src2 =3D gen_load_fpr_F(dc, a->rs2); func(src1, tcg_env, src1, src2); @@ -4903,7 +4894,6 @@ static bool do_env_ddd(DisasContext *dc, arg_r_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); dst =3D gen_dest_fpr_D(dc, a->rd); src1 =3D gen_load_fpr_D(dc, a->rs1); src2 =3D gen_load_fpr_D(dc, a->rs2); @@ -4930,7 +4920,6 @@ static bool trans_FsMULd(DisasContext *dc, arg_r_r_r = *a) return raise_unimpfpop(dc); } =20 - gen_op_clear_ieee_excp_and_FTT(); dst =3D gen_dest_fpr_D(dc, a->rd); src1 =3D gen_load_fpr_F(dc, a->rs1); src2 =3D gen_load_fpr_F(dc, a->rs2); @@ -4972,7 +4961,6 @@ static bool do_env_qqq(DisasContext *dc, arg_r_r_r *a, return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_Q(dc, a->rs1); src2 =3D gen_load_fpr_Q(dc, a->rs2); func(src1, tcg_env, src1, src2); @@ -4998,7 +4986,6 @@ static bool trans_FdMULq(DisasContext *dc, arg_r_r_r = *a) return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_D(dc, a->rs1); src2 =3D gen_load_fpr_D(dc, a->rs2); dst =3D tcg_temp_new_i128(); @@ -5087,7 +5074,6 @@ static bool do_fcmps(DisasContext *dc, arg_FCMPs *a, = bool e) return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_F(dc, a->rs1); src2 =3D gen_load_fpr_F(dc, a->rs2); if (e) { @@ -5112,7 +5098,6 @@ static bool do_fcmpd(DisasContext *dc, arg_FCMPd *a, = bool e) return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_D(dc, a->rs1); src2 =3D gen_load_fpr_D(dc, a->rs2); if (e) { @@ -5140,7 +5125,6 @@ static bool do_fcmpq(DisasContext *dc, arg_FCMPq *a, = bool e) return true; } =20 - gen_op_clear_ieee_excp_and_FTT(); src1 =3D gen_load_fpr_Q(dc, a->rs1); src2 =3D gen_load_fpr_Q(dc, a->rs2); if (e) { --=20 2.34.1