From nobody Wed Nov 27 14:32:56 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=1698280775; cv=none; d=zohomail.com; s=zohoarc; b=RM8X6NGvtsk29EsgJ4vnyAqeaXP7KZIRvTZYVY+vsUVesfrjPGNcu6jZst2sMDwl5Zd74MdF3PTiUrpt/V1b2N0Q8SA5Uu803fbBf8SHH1DrY2AwTbmTDhF7fF2x36BJI8Bpn6rcIFicAvLoSd0UaqJQVF+tVWAP6TbDASvgtWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698280775; 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=82K7Y1lkn8cxFHk/aj1abheMJJJzCXuFVAOpX84t3dE=; b=aPjx/kcXNG5vSRLui3VsBPw6XdYgNLd7mQ6UIeu0T06LzExisu7gHW+Rohtg3JZcr34E6e0+S1KngEvxaBeCyPv8Skehnq4EFu3v1W2Tg6MIuNVwdPehdMKksdxWtojq1aKgiEItJwjAuZhJSBtoyw7Eo2EpcbR2imC1g0jj9jY= 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 1698280775115263.77569519584165; Wed, 25 Oct 2023 17:39:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvoA5-0004uF-NB; Wed, 25 Oct 2023 20:23:45 -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 1qvo9g-000343-Nt for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:22 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo9b-0008GG-1G for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:20 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-565e54cb93aso302216a12.3 for ; Wed, 25 Oct 2023 17:23:14 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id 9-20020a17090a0cc900b0027463889e72sm499870pjt.55.2023.10.25.17.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279793; x=1698884593; 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=82K7Y1lkn8cxFHk/aj1abheMJJJzCXuFVAOpX84t3dE=; b=qXXQm/VJuc+K2SaNhwFfB+8az7cAEviCEwYd/ogt3eSLsgSaBd0Sf3IGM7GnIHwmEm d2xyYkFl9rx0S0SzM+E6XgLxr1graZDyPvmmqBJhkur2qpynM0F+4TEWH0bUiEvDen9u dE8zUghLSG6iJRkxN9btYjn/FsTn2WLlSXqBjeKp1WpZMWrIjwGnEO3EEPkdMSsaCXaC L7R+JOjbFk3Mxh52t+Paw8HfApctdP0oBA3SnpZr9Kfu8xbodS8h623VllVbLTwe2D21 Xk2lrziBXzc4hllhe4hNHXxGXptRVU4uw/qaYwGelvDXgu3TfAYoEgyE9Hpi0wuNZ/c6 UAGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279793; x=1698884593; 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=82K7Y1lkn8cxFHk/aj1abheMJJJzCXuFVAOpX84t3dE=; b=Zsy+4AqucRFdiHI2Zo+fLvv6TCwqe1uGquxlsl+Z+NBACMtJcwtdEJudzEgoTcmFU3 gzagjT6W1lqRUtCeWF1T0EsF8EPZn8DOiCUUc++en30iJFY5JEfX5XEJYefUWSSd9lkm sg3kHmM/WUGONEEmpHB07Ke1FG88gMBcZctl6DDAXpz3G46ZCcUXkws0MjyCSVCGgfea fduPQgPul17JHrSxq+VUyi89IV0L7f06rhE8CaE7Wb4wgp+f5v+w6Pwe4RP3wVVp+pcO YluL3GxXXDoIo4kH5vR2BDwLWUYwFgwwIZsv9yMfpB7iQL9ctTo/20jdF26PC/Lsgl/a EAeg== X-Gm-Message-State: AOJu0YytOhBS4RkFJl76Ygufzw5CVk13PHpqTf2kv/h7/C80V+XfYWzB 1i4oRaAz7X4EwSCfXClWRChZbceChm8cajwLJ1E= X-Google-Smtp-Source: AGHT+IEr/rqOtOQLHzF9gzsyLB9aNN/ytEkUKlg15+vZAb3amxfjQGYFo9vRmTxVVWPfhuftHxVCUg== X-Received: by 2002:a05:6a21:3b44:b0:14e:a1f0:a8ea with SMTP id zy4-20020a056a213b4400b0014ea1f0a8eamr6524053pzb.3.1698279793472; Wed, 25 Oct 2023 17:23:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 81/94] target/sparc: Move FDMULQ to decodetree Date: Wed, 25 Oct 2023 17:15:29 -0700 Message-Id: <20231026001542.1141412-111-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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: 1698280776514100005 Content-Type: text/plain; charset="utf-8" Tested-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Signed-off-by: Richard Henderson --- target/sparc/insns.decode | 1 + target/sparc/translate.c | 41 +++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 6817d52ca2..a19d191603 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -261,6 +261,7 @@ FDIVs 10 ..... 110100 ..... 0 0100 1101 ..... = @r_r_r FDIVd 10 ..... 110100 ..... 0 0100 1110 ..... @r_r_r FDIVq 10 ..... 110100 ..... 0 0100 1111 ..... @r_r_r FsMULd 10 ..... 110100 ..... 0 0110 1001 ..... @r_r_r +FdMULq 10 ..... 110100 ..... 0 0110 1110 ..... @r_r_r FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @r_r2 FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @r_r2 FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2 diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 6626042776..29643768e1 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1669,21 +1669,6 @@ static void gen_ne_fop_QQ(DisasContext *dc, int rd, = int rs, } #endif =20 -static void gen_fop_QDD(DisasContext *dc, int rd, int rs1, int rs2, - void (*gen)(TCGv_ptr, TCGv_i64, TCGv_i64)) -{ - TCGv_i64 src1, src2; - - src1 =3D gen_load_fpr_D(dc, rs1); - src2 =3D gen_load_fpr_D(dc, rs2); - - gen(tcg_env, src1, src2); - gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); - - gen_op_store_QT0_fpr(QFPREG(rd)); - gen_update_fprs_dirty(dc, QFPREG(rd)); -} - #ifdef TARGET_SPARC64 static void gen_fop_DF(DisasContext *dc, int rd, int rs, void (*gen)(TCGv_i64, TCGv_ptr, TCGv_i32)) @@ -4982,6 +4967,27 @@ TRANS(FSUBq, ALL, do_env_qqq, a, gen_helper_fsubq) TRANS(FMULq, ALL, do_env_qqq, a, gen_helper_fmulq) TRANS(FDIVq, ALL, do_env_qqq, a, gen_helper_fdivq) =20 +static bool trans_FdMULq(DisasContext *dc, arg_r_r_r *a) +{ + TCGv_i64 src1, src2; + + if (gen_trap_ifnofpu(dc)) { + return true; + } + if (gen_trap_float128(dc)) { + return true; + } + + 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); + gen_helper_fdmulq(tcg_env, src1, src2); + gen_helper_check_ieee_exceptions(cpu_fsr, tcg_env); + gen_op_store_QT0_fpr(QFPREG(a->rd)); + gen_update_fprs_dirty(dc, QFPREG(a->rd)); + return advance_pc(dc); +} + #define CHECK_IU_FEATURE(dc, FEATURE) \ if (!((dc)->def->features & CPU_FEATURE_ ## FEATURE)) \ goto illegal_insn; @@ -5048,11 +5054,8 @@ static void disas_sparc_legacy(DisasContext *dc, uns= igned int insn) case 0x4b: /* fmulq */ case 0x4f: /* fdivq */ case 0x69: /* fsmuld */ - g_assert_not_reached(); /* in decodetree */ case 0x6e: /* fdmulq */ - CHECK_FPU_FEATURE(dc, FLOAT128); - gen_fop_QDD(dc, rd, rs1, rs2, gen_helper_fdmulq); - break; + g_assert_not_reached(); /* in decodetree */ case 0xc6: /* fdtos */ gen_fop_FD(dc, rd, rs2, gen_helper_fdtos); break; --=20 2.34.1