From nobody Wed Nov 27 14:28:25 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=1698280721; cv=none; d=zohomail.com; s=zohoarc; b=iVPVaWREPIZpHQ5RHitPpqaz7R1uPW4GuKqseGkjydowaiKbJLqP1anKCMklI80bOnlFnIW7m1s/8/DyKodCp09KBybclhrjBm3tMtyDa8BW/itcbbPuQLOxEFlO1zc+12LtyPrHfIm6bFzS+aU2HyldShDiSZCJ87vAghQU0WY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698280721; 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=aiKlYh0ZSQ4q5RqF1EsnIe40ZaI3W0/mpHtSrRjKKnM=; b=lK2OG0OH2PJNzt3NononHlsXWvyor3gPBBzOJglofYAO7WS2//GhF/ADv6yxbmBSL0zY2SsWAhGXgfgaa95Ai3Ct9XawoVU35E9gsa4gVz7eaxkxT88dBtO3AZTzalV9coUV+2Ir6+ywuGrqYu9NmGZagADRlooZr/oGgE59kqE= 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 1698280721433801.0236492543103; Wed, 25 Oct 2023 17:38:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvoAQ-0006FM-78; Wed, 25 Oct 2023 20:24: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 1qvo9k-0003EF-3X for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:25 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo9X-0008EZ-6d for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:22 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-27e1eea2f0dso225771a91.1 for ; Wed, 25 Oct 2023 17:23:10 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a0cc900b0027463889e72sm499870pjt.55.2023.10.25.17.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:23:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279788; x=1698884588; 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=aiKlYh0ZSQ4q5RqF1EsnIe40ZaI3W0/mpHtSrRjKKnM=; b=dzcAlT3l5QTav52QML6cL6OS2kYcUBvXT53gZnqEA3bdEKozs/RHKDjXAB9gTVv8M3 u+nXl29Ve2CLSpr/LdPtuorJggQRI1+jqZ1JeKXPT6wqywQho0W1MZh7f2YJy4H4E5to LNEcqHfsXiobnQT1okVF5cvz/oyxJkBfqOoAgfFwLoIvEs7jaNnSjQaLaX9DU0Y63oV3 Eq9WvaIS7M2L05ExDvhqbLl2SDDnuQFDMKy0glQ1SuU8kvkQpybuRM4na7KizCKPVAIM txQBtUpDCTdBnSk0xSX7gLrFBoEsa1UeVrtsgrArUcCrGYffBvk4NUTtATK5O/TBu1/l Rs8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279788; x=1698884588; 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=aiKlYh0ZSQ4q5RqF1EsnIe40ZaI3W0/mpHtSrRjKKnM=; b=s2C2Xw/R4QiNGT+QZunLWSdyPAQm+AOcm/yhP+eA0OpMnkvvPgLCXyD+SYQzjmbaHq w9YNc0hsmZGxpJqLyezxcODem0IrCOlU/GmrympJLkB1YBthTYeB1V93WzFncHwxdnbA cbmGX+bSQtqjOdIIhn7JNj/qzWrZLHodEXiVIG/b88zNrU1Vt3Zxt47tKqZjE3bLQd6o Fb0YBvKOpkFWMfs/+pJjZj61g3JiLt40jt2YMDE7gxbIFYuwZdxMrEVbWSDvs1MHQ7YG mBy1tDi3jTmJREwuU9qDlb6VJz0Ig7MeWevUD/QIJ4TxLqbmj3X8OlKRj6+G7vZq0PQ8 n48g== X-Gm-Message-State: AOJu0Ywz18T0p0KQ5dezeuKuS8rqCzhJZlXpnnFtfP91TtPpPiUamgHX FSp4SYbHq1TwxlIlPvXjOJRDUTI52rK2TXAQ4ts= X-Google-Smtp-Source: AGHT+IGtO9kYFTsQWvneLGVn9T8qsRavJ7QQuhEPExiubxZG1ctORGRhRqsFkllpnvLLXHhDsiTZxQ== X-Received: by 2002:a17:90b:3654:b0:27d:22ed:8e9e with SMTP id nh20-20020a17090b365400b0027d22ed8e9emr13691032pjb.6.1698279788161; Wed, 25 Oct 2023 17:23:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 74/94] target/sparc: Move gen_fop_FF insns to decodetree Date: Wed, 25 Oct 2023 17:15:22 -0700 Message-Id: <20231026001542.1141412-104-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231026001542.1141412-1-richard.henderson@linaro.org> References: <20231026001542.1141412-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::102b; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102b.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 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: 1698280722363100001 Content-Type: text/plain; charset="utf-8" Move FSQRTs, FiTOs, FsTOi. Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 3 +++ target/sparc/translate.c | 47 ++++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 23 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index bc449023dd..85464285b7 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -245,6 +245,9 @@ FNEGs 10 ..... 110100 00000 0 0000 0101 ..... = @r_r2 FNEGd 10 ..... 110100 00000 0 0000 0110 ..... @r_r2 FABSs 10 ..... 110100 00000 0 0000 1001 ..... @r_r2 FABSd 10 ..... 110100 00000 0 0000 1010 ..... @r_r2 +FSQRTs 10 ..... 110100 00000 0 0010 1001 ..... @r_r2 +FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2 +FsTOi 10 ..... 110100 00000 0 1101 0001 ..... @r_r2 =20 { [ diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 197c0bea54..13932e087d 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1654,20 +1654,6 @@ static int gen_trap_ifnofpu(DisasContext *dc) return 0; } =20 -static void gen_fop_FF(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i32)) -{ - TCGv_i32 dst, src; - - src =3D gen_load_fpr_F(dc, rs); - dst =3D gen_dest_fpr_F(dc); - - gen(dst, tcg_env, src); - gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); - - gen_store_fpr_F(dc, rd, dst); -} - static void gen_fop_FFF(DisasContext *dc, int rd, int rs1, int rs2, void (*gen)(TCGv_i32, TCGv_ptr, TCGv_i32, TCGv_i32= )) { @@ -4806,6 +4792,27 @@ TRANS(FABSs, ALL, do_ff, a, gen_op_fabss) TRANS(FSRCs, VIS1, do_ff, a, tcg_gen_mov_i32) TRANS(FNOTs, VIS1, do_ff, a, tcg_gen_not_i32) =20 +static bool do_env_ff(DisasContext *dc, arg_r_r *a, + void (*func)(TCGv_i32, TCGv_env, TCGv_i32)) +{ + TCGv_i32 tmp; + + if (gen_trap_ifnofpu(dc)) { + return true; + } + + 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); + gen_store_fpr_F(dc, a->rd, tmp); + return advance_pc(dc); +} + +TRANS(FSQRTs, ALL, do_env_ff, a, gen_helper_fsqrts) +TRANS(FiTOs, ALL, do_env_ff, a, gen_helper_fitos) +TRANS(FsTOi, ALL, do_env_ff, a, gen_helper_fstoi) + static bool do_dd(DisasContext *dc, arg_r_r *a, void (*func)(TCGv_i64, TCGv_i64)) { @@ -4967,10 +4974,10 @@ static void disas_sparc_legacy(DisasContext *dc, un= signed int insn) case 0x2: /* V9 fmovd */ case 0x6: /* V9 fnegd */ case 0xa: /* V9 fabsd */ - g_assert_not_reached(); /* in decodetree */ case 0x29: /* fsqrts */ - gen_fop_FF(dc, rd, rs2, gen_helper_fsqrts); - break; + case 0xc4: /* fitos */ + case 0xd1: /* fstoi */ + g_assert_not_reached(); /* in decodetree */ case 0x2a: /* fsqrtd */ gen_fop_DD(dc, rd, rs2, gen_helper_fsqrtd); break; @@ -5026,9 +5033,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsi= gned int insn) CHECK_FPU_FEATURE(dc, FLOAT128); gen_fop_QDD(dc, rd, rs1, rs2, gen_helper_fdmulq); break; - case 0xc4: /* fitos */ - gen_fop_FF(dc, rd, rs2, gen_helper_fitos); - break; case 0xc6: /* fdtos */ gen_fop_FD(dc, rd, rs2, gen_helper_fdtos); break; @@ -5058,9 +5062,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsi= gned int insn) CHECK_FPU_FEATURE(dc, FLOAT128); gen_ne_fop_QD(dc, rd, rs2, gen_helper_fdtoq); break; - case 0xd1: /* fstoi */ - gen_fop_FF(dc, rd, rs2, gen_helper_fstoi); - break; case 0xd2: /* fdtoi */ gen_fop_FD(dc, rd, rs2, gen_helper_fdtoi); break; --=20 2.34.1