Message ID | 20231013212846.165724-20-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:54d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1679464wrv; Fri, 13 Oct 2023 14:35:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgW/RyurEPvrx47TDz4F8u3KNCsqrcws6OvVDygHjwgbYpFdm+iMqUjbUcmdEJYVuVSVJo X-Received: by 2002:a05:6214:1942:b0:656:1858:a178 with SMTP id q2-20020a056214194200b006561858a178mr11705444qvk.9.1697232920828; Fri, 13 Oct 2023 14:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697232920; cv=none; d=google.com; s=arc-20160816; b=ja1VTKVrsZp2YUmEuP0fff6STNmGJ0pUs2AOaAYkBxKLptyDs2N2rqRkHWXEtaz6xb di/0wF36jEP637KMImmbZiW7UcmvukfjOgAILXqU3TmnCGiYUAgtxpH2ajB1mYQKNZim GpTV5YlATF3RyzW+oEelygXD/Rcann1/Gj5N8KOD8aot3q7wfDa4SK0hI6j3VnlM64xi HbtrMfUUK6XQHEbwZFJgqu43J3XVhuDxTQbGHG2BeDPe0F/jnfR/+VIBW5PMQHB9NIXu AsSNEDScfLGmNEq7C8FY6rggYLd4sXSD6bYV1GhadcpWy9fIjkD3QXj5i+vAkUKC9oNi DQ/A== 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=6q3VzZvsaBpEMylLqymMLp6EE3lGsY1PtUwRY/mn3xM=; fh=OY/jf0qYEhT53LcIJp8d/e39mN3vEzshkseI36O8N8s=; b=bSYmROqhUCMN+8EhuIBqm6qbSbwp8h8ndifJg3hEZKRtYDa8t4Mv3LmmaTNiWQFFK3 rRe1UklhEC3iUwsjOBBECBuH0jH91OBBNmfEpRKgwIdOCVhypdKur5xvh8TCcu5WN5EO /zKybAqgrhnMFw4m855cU9xt27lRG5csZ497iZ+7jbrXss8KKWTeJmBevWPmRAwk12AG CfpdWJWhSXFgtJvsz00Kpqtz/sMjjCXrUZEnmJKiNNVJ3l0jMm1sdqc4LdADSG/cbrzU xyImBHNrv6SiUJjO6GRRad0B1zlFwMj70cXZc78wmhi/Uq4EzmDEobftsUQpHl5jfDpd fFUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g679ad9E; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j4-20020a0cc344000000b0066cfc2c8139si1846943qvi.377.2023.10.13.14.35.20 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Oct 2023 14:35:20 -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=g679ad9E; 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 <qemu-devel-bounces@nongnu.org>) id 1qrPid-0006JF-Os; Fri, 13 Oct 2023 17:29:15 -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 <richard.henderson@linaro.org>) id 1qrPib-0006HE-DI for qemu-devel@nongnu.org; Fri, 13 Oct 2023 17:29:14 -0400 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1qrPiX-0000Tn-B1 for qemu-devel@nongnu.org; Fri, 13 Oct 2023 17:29:13 -0400 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1e0ee4e777bso1495660fac.3 for <qemu-devel@nongnu.org>; Fri, 13 Oct 2023 14:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697232546; x=1697837346; 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=6q3VzZvsaBpEMylLqymMLp6EE3lGsY1PtUwRY/mn3xM=; b=g679ad9EEQT4cyqBxtRZAA63FzYrhY7I9mN4Uoesx09I53KR4WeRd0o+BV/wsgswlu K7TDm/ZbDY4f59yH5A7G29l+sw/Rj2b4suiTbYBqANuJ9puvfkBe6mAxbZOb5SlZ1hh5 QjfFr29idnM43UHEyPFoMI0fxGLyg4oNEP9vChYsPlmrCkRuRw5huJmffsgcSndqxgsp vC3l6SeBdl+8Gzi7XsqQGa+FXFB9NCBK/5ENPhiXqZrmZXa0P6Bd5oZ6INHV0LTogxy8 0zgN39p8I0aZfezrSZiLw7ND3sh/v9ERms/ABqdUkY/v+tG3nJIY7lpCElu14NIMjgi0 S3XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697232546; x=1697837346; 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=6q3VzZvsaBpEMylLqymMLp6EE3lGsY1PtUwRY/mn3xM=; b=SVh+my+mCjjWJUwCScU9eMOvhXwEk2oKcnj4E/3JAOSHCF3z+EbJkWyccCXLf/SBcq IvflQIPogB3yQ6ZLnpDbMavH52v2AjAvtW+K69WuutYw5W3Al/I2FdMKYGyQy6bR3fzy DxcTmyVOydJlxKX8sKZj4q51qWGKM109LFjBjKkyj57ZAeLDqaSb6WQAayKu3QtkLRSd yyB3AZdG4Pg6qGoqugizmonRm3UNSGxeEGPlw7bGHCtpWsaicj/P4qfnZ4ipjPlSDIxX 5vVuS5LRACYQFgydDdAArj3dDkgIqlYtj4hnXPAdq+BslJcNs0i3iAa+BFMdh5sQdH0+ yJtA== X-Gm-Message-State: AOJu0YzNkfR592tmzTzB+mshsaisuivMWHlNRSc76hLGhnM7ih3v4N/1 Y3gCjRzd67ZeMgIoLFy03z6/OW72VxfsRZKcvD0= X-Received: by 2002:a05:6870:15:b0:1e9:c315:9d66 with SMTP id a21-20020a056870001500b001e9c3159d66mr5057055oaa.40.1697232545905; Fri, 13 Oct 2023 14:29:05 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id b185-20020a6334c2000000b0058988954686sm70753pga.90.2023.10.13.14.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 14:29:05 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Subject: [PATCH 19/85] target/sparc: Move RDTBR, FLUSHW to decodetree Date: Fri, 13 Oct 2023 14:27:40 -0700 Message-Id: <20231013212846.165724-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231013212846.165724-1-richard.henderson@linaro.org> References: <20231013212846.165724-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:4860:4864:20::2e; envelope-from=richard.henderson@linaro.org; helo=mail-oa1-x2e.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
target/sparc: Convert to decodetree
|
expand
|
diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index 05329803f4..9142e0e2f0 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -78,3 +78,8 @@ RDPR_wstate 10 rd:5 101010 01110 0 0000000000000 RDPR_gl 10 rd:5 101010 10000 0 0000000000000 RDPR_strand_status 10 rd:5 101010 11010 0 0000000000000 RDPR_ver 10 rd:5 101010 11111 0 0000000000000 + +{ + FLUSHW 10 00000 101011 00000 0 0000000000000 + RDTBR 10 rd:5 101011 00000 0 0000000000000 +} diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 00264326da..26601e508f 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -3445,6 +3445,7 @@ static TCGv do_rdtba(DisasContext *dc, TCGv dst) return cpu_tbr; } +TRANS(RDTBR, 32, do_rd_special, supervisor(dc), a->rd, do_rdtba) TRANS(RDPR_tba, 64, do_rd_special, supervisor(dc), a->rd, do_rdtba) static TCGv do_rdpstate(DisasContext *dc, TCGv dst) @@ -3583,6 +3584,16 @@ static TCGv do_rdver(DisasContext *dc, TCGv dst) TRANS(RDPR_ver, 64, do_rd_special, supervisor(dc), a->rd, do_rdver) +static bool trans_FLUSHW(DisasContext *dc, arg_FLUSHW *a) +{ +#ifdef TARGET_SPARC64 + gen_helper_flushw(tcg_env); + return advance_pc(dc); +#else + return false; +#endif +} + #define CHECK_IU_FEATURE(dc, FEATURE) \ if (!((dc)->def->features & CPU_FEATURE_ ## FEATURE)) \ goto illegal_insn; @@ -3613,18 +3624,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) TCGv cpu_dst __attribute__((unused)) = tcg_temp_new(); TCGv cpu_tmp0 __attribute__((unused)); -#if defined(TARGET_SPARC64) || !defined(CONFIG_USER_ONLY) - if (xop == 0x2b) { /* rdtbr / V9 flushw */ -#ifdef TARGET_SPARC64 - gen_helper_flushw(tcg_env); -#else - if (!supervisor(dc)) - goto priv_insn; - gen_store_gpr(dc, rd, cpu_tbr); -#endif - break; - } -#endif if (xop == 0x34) { /* FPU Operations */ if (gen_trap_ifnofpu(dc)) { goto jmp_insn;
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/sparc/insns.decode | 5 +++++ target/sparc/translate.c | 23 +++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-)