From nobody Wed Nov 27 14:46:10 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=1698280962; cv=none; d=zohomail.com; s=zohoarc; b=Vq25mr+dm3mEyNMKRIb6MvtJND0ZiKYiwMTzgCYROYxHDtTwamLkGGIuFlQbOZGNO+RcFQgycyTJKBH6BEEH9l4oMT1KTLCD5Chbr3xKjXtXQiwqCGQsZPEKqNiI7Kutl+sXpdt8Nnz8FHpNB3XJAARGHsWNPEJgdDZUcEiVkwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698280962; 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=5r4ilrU9iHcD4mE02FqIHVSwcLuS8iY4OK6WJcyFSZw=; b=a2wAxjFBf5eHmda42147R8RCdthsdSnd/wx+/zNcrbOzEkLTjqHgwtbxWeC+/XQ/qPXBirQfxSFBPaqrMad8iXaxl6KeIOUwuW1jQj+hHcTEzx68lpcum9W6m8z1QQMtea82ov77qRxv1YZFW/jvCc3OkNfEG6ijb77ghtWlSIg= 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 1698280962077611.2820159699932; Wed, 25 Oct 2023 17:42:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvoA4-0004jr-4O; Wed, 25 Oct 2023 20:23:44 -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 1qvo9c-0002tU-Mq for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:19 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo9Y-0008F6-06 for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:23:16 -0400 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-27d0251d305so222082a91.2 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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279789; x=1698884589; 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=5r4ilrU9iHcD4mE02FqIHVSwcLuS8iY4OK6WJcyFSZw=; b=WPDZ5QeTJSaHC/ootlYmbu5YwrjtlKIXVPWaeoWzBPDhCDiEZnJh4vbtp1mmClwsNp 97caF9/hB6rKnc/SoeBrVoijil0GXmVjMcK6mIGiJqKf4M4NsSfZ20ftb0yXBrtKruZ0 OGPNsyead+fgbw87G1OF/4uuSTf65cMRaNra2uTMS2JOc1yFaAM8FZ63uricGfmXtCyc BrP/AS+PXQfmWk68TPW+fId2mBBJUPpLGut6PRkMofwOnKWfLm1hsJaKu4bbXpW8PQ69 Vxzs0j/bTubFWCwSjoV4g1aemNnJzWLBwqYLYUf9eYJnDPObjN7kMrKrbdQNDSx47Owx AYzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279789; x=1698884589; 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=5r4ilrU9iHcD4mE02FqIHVSwcLuS8iY4OK6WJcyFSZw=; b=oOGZ9sZPvd2VGqRpU0Ab2XaZLyP80xxqG/9YNU8c3QCooEVZw9xuhozgwkYGvo8BoU bdID7CNueXbOOa0tBb/K2Kti2bxAJMBQb1JCXmrh8dzSEQjQaYuegCTaEJJ9wEu3lmBU irW95rtG3c7dmBqjjuFPyx+oCqhFGYnla2BBRoq2f9055jIotWCBpOS7JBT8igKjvyWR 8L2gNWnxXA70yO4up2i9rmLRYaGiNQ0wh/Znx7hu/NyBr2YyuOVe1YLe9dq9pSvwhbVB TUlm9SArq+g0Fo98uP/XlvyW0OBABGBa6YHsON6/YftYTBbGIrz1nWa3/RsdMymtUvnp Ul0w== X-Gm-Message-State: AOJu0Yyx8ItSQTBhlH3xL+G2bKiShwEywFHnuMIFv6BmtcYZ5BRa2cPO KmdrUsdKQJuPkuCX0Q3scL+kk4vFPsOoc34/0MU= X-Google-Smtp-Source: AGHT+IGDeNa5Cu/XWvdMygFd4LbcpGAdEs8kGOK38Uwup0bpufHU7MyIDP8CyAKMY5xobSbEEPGKfg== X-Received: by 2002:a17:90b:2b4d:b0:27d:9b7:cc7 with SMTP id rr13-20020a17090b2b4d00b0027d09b70cc7mr13713260pjb.24.1698279789652; Wed, 25 Oct 2023 17:23:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 76/94] target/sparc: Move FSQRTq to decodetree Date: Wed, 25 Oct 2023 17:15:24 -0700 Message-Id: <20231026001542.1141412-106-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::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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: 1698280963124100002 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 | 38 ++++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 1d766fab21..4cb250265d 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -247,6 +247,7 @@ 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 FSQRTd 10 ..... 110100 00000 0 0010 1010 ..... @r_r2 +FSQRTq 10 ..... 110100 00000 0 0010 1011 ..... @r_r2 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 307fbc4628..93efdf3383 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -1686,18 +1686,6 @@ static void gen_fop_DDD(DisasContext *dc, int rd, in= t rs1, int rs2, gen_store_fpr_D(dc, rd, dst); } =20 -static void gen_fop_QQ(DisasContext *dc, int rd, int rs, - void (*gen)(TCGv_ptr)) -{ - gen_op_load_fpr_QT1(QFPREG(rs)); - - gen(tcg_env); - 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_ne_fop_QQ(DisasContext *dc, int rd, int rs, void (*gen)(TCGv_ptr)) @@ -4845,6 +4833,27 @@ TRANS(FSQRTd, ALL, do_env_dd, a, gen_helper_fsqrtd) TRANS(FxTOd, 64, do_env_dd, a, gen_helper_fxtod) TRANS(FdTOx, 64, do_env_dd, a, gen_helper_fdtox) =20 +static bool do_env_qq(DisasContext *dc, arg_r_r *a, + void (*func)(TCGv_env)) +{ + if (gen_trap_ifnofpu(dc)) { + return true; + } + if (gen_trap_float128(dc)) { + return true; + } + + gen_op_clear_ieee_excp_and_FTT(); + gen_op_load_fpr_QT1(QFPREG(a->rs)); + func(tcg_env); + 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); +} + +TRANS(FSQRTq, ALL, do_env_qq, a, gen_helper_fsqrtq) + static bool do_fff(DisasContext *dc, arg_r_r_r *a, void (*func)(TCGv_i32, TCGv_i32, TCGv_i32)) { @@ -4990,11 +4999,8 @@ static void disas_sparc_legacy(DisasContext *dc, uns= igned int insn) case 0x2a: /* fsqrtd */ case 0x82: /* V9 fdtox */ case 0x88: /* V9 fxtod */ - g_assert_not_reached(); /* in decodetree */ case 0x2b: /* fsqrtq */ - CHECK_FPU_FEATURE(dc, FLOAT128); - gen_fop_QQ(dc, rd, rs2, gen_helper_fsqrtq); - break; + g_assert_not_reached(); /* in decodetree */ case 0x41: /* fadds */ gen_fop_FFF(dc, rd, rs1, rs2, gen_helper_fadds); break; --=20 2.34.1