From patchwork Thu Oct 26 00:15:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 738299 Delivered-To: patch@linaro.org Received: by 2002:adf:f842:0:b0:32d:baff:b0ca with SMTP id d2csp560406wrq; Wed, 25 Oct 2023 17:42:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmSRRrut6YppH922Gm9hU8YN1nfC2SGcJFvn1xF0UCA/LXc8+vpGGUt5Gsyd8P84UI78Cx X-Received: by 2002:a05:6214:3b84:b0:66d:ad78:130d with SMTP id nf4-20020a0562143b8400b0066dad78130dmr12013792qvb.21.1698280961599; Wed, 25 Oct 2023 17:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698280961; cv=none; d=google.com; s=arc-20160816; b=KcgDoPi6rM6ja9C5dnRnPmp+b1JQUxfh6aiwXw6STEnAuBoUxAK/GIj5d834s5ug2g 1TvHv8ntQiie9UtUYBpoSQuCVofPWC62a7gN4AECFeDSylz9Meri/fEthyELX9x0vTmG aKQKlOZVYXdwdNDwf78R7uhw8EPpnVyqavu8xOix6Cr0VB/vzo/bUfFMMnZMfLueXmxo s6dkwYVnUWyMlXRZBDeH+O516bcRnAm7y5surqWh0wXXbBnr1OtU/S8uMbWvI79IXRoC th7HimQxoYmlU8+o54kH1H3P1xCG2HIXespndL4srM+PePmqfPGQG6Q5Wvm8kkKMyIAX /ngA== 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=5r4ilrU9iHcD4mE02FqIHVSwcLuS8iY4OK6WJcyFSZw=; fh=rYI8DiHAAFX3O5g969KmOAQ7d45Sb8OxQX1+DywGDk4=; b=lPkyMK7zAabHlPZoVopPPoP+Gus3G73wuSktDhAIF2FcUCGSeqphCHdhWo5p2jtFcW +2uYcOS6zIaCBFrijuSlCjgTEXxgVKOLZrIGkx8yhOwf1CmPrvbrvD/QsLYRH0Iq3ASu PMc3su+xzeXMhC7o2NhNqpyZUj6sspo98BJpD2AGrIZOL7oohgCqAJY79qgYo++K5rt7 /l+/rb7BvW0ndeLNqbH4tk99vL2YcpTOKTXIRwWsBXiaGfxc6arlezeMttRMy6hkBUD9 TPw3TUBoKwErkSHGEWOBQwCy/9iGoEwFgq71QhJLSaGxwDzH7nlzo4h6HCo/E+fsBPms 5lEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WPDZ5QeT; 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 di18-20020ad458f2000000b0066d0869c6absi8874223qvb.550.2023.10.25.17.42.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2023 17:42:41 -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=WPDZ5QeT; 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 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) 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-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) 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) 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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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, int rs1, int rs2, gen_store_fpr_D(dc, rd, dst); } -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) +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, unsigned 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;