From patchwork Thu Oct 26 00:14:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 738268 Delivered-To: patch@linaro.org Received: by 2002:adf:f842:0:b0:32d:baff:b0ca with SMTP id d2csp558895wrq; Wed, 25 Oct 2023 17:37:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzJzaD+WqAhTXyqHR8suq9/7MlMBsCes6uB9CMfYcmrsdBmBTWxP9tTp83AWeWYfBsSoWz X-Received: by 2002:a5d:4147:0:b0:319:72f8:7249 with SMTP id c7-20020a5d4147000000b0031972f87249mr12800918wrq.66.1698280658796; Wed, 25 Oct 2023 17:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698280658; cv=none; d=google.com; s=arc-20160816; b=tinU0X6vP/tK2XiHMfuGqaUozBSrLwFNwf36HCwqLh4l+aqmRIU1o7Y4ZvXXUaAX3W OizlZNj0YoYLVbl4CD4/uhJd2+0h9YicQG7Kb08JKIfvHQtg/r0PpPMCatQlxR89rIy6 nWXt9xs4UTgmRg8hEi4iUhvMacI2ShdXFG5bfuQKOkJBkdmH1/0fzzOymmgi52Cv/oQH wSfBR8NdNYpa+l6S2JPzwBL9QJKAJ7koe+h3uii3KpInyejn5w4gST207ov54K8sPPez cnfOQHjauSXwFQKmzug74OvLHlB/lXk5SlAhTBcSdjbSxIXcikaz+vBfIyP3bdyxyW5r FzZQ== 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=NTjsxTEB+wSbTivrTvElIlgrS7SAqTr5YpOJzPS1BFA=; fh=rYI8DiHAAFX3O5g969KmOAQ7d45Sb8OxQX1+DywGDk4=; b=OQGCKhuiVxSXUlO1WdT0hjVjdcucW4mCiCqXMJSW71faF4wnDXEZG1LfW8mTdH2nwn 5UnEGEZNhJkChCAllMjJ2IZUPm1TWEZgB+8wEjhYpVF+Kqo7dE4OGF7GFXbNyzXytGDp 1zVoNu1tdmBi117XPKEUPemHS8/hSB8Qx+aLKqH4q0tWI/29Sb67iJxDqeLvXf+t6BdI aY0gPAUDcafgr3Pe0rWcBrSiPb55x/9ctw95E9TkBzHCAON7/axg5XjPPlksZmdpK/Hm x+V/bMy+a7bYYqTfsqjxBS+eiL+LvCgS7+ddzz99k4S+8kiZoy8wl/X7R7hUYc7ZzkAv ZdaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L99mEGsb; 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 n10-20020a5d484a000000b003263b56683asi7866094wrs.48.2023.10.25.17.37.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2023 17:37:38 -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=L99mEGsb; 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 1qvo6n-0002GH-Sb; Wed, 25 Oct 2023 20:20:21 -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 1qvo6L-0001RS-1w for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:19:53 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvo6E-0006tB-OO for qemu-devel@nongnu.org; Wed, 25 Oct 2023 20:19:52 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ca6809fb8aso2284235ad.1 for ; Wed, 25 Oct 2023 17:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698279584; x=1698884384; 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=NTjsxTEB+wSbTivrTvElIlgrS7SAqTr5YpOJzPS1BFA=; b=L99mEGsb5GzXKVrRAE2AfNlXRqxcnzt5Ttbhu/rsE/Fs6cy4ezqCuqDXxFNj/5MTDR 17OuAPp7budrCOOXDaUdQnddhsubGBPV6BtMjEzQ9PGXCjhgWEatnD2HBvpGtESjazhS p0XRrwZJSOUf6blumGy/sjo8iI0fELngCiZgIhHsrYul31IbUxy0u9nc6pJd7+6NCDaz X5Subr+2/ZfB5yjLDt5ulGHpasponf90tU9xiXZMVDA5W9V3c9AMVXTkNcf8gCc5qvA/ y+vJfBoT4GE0iPQ6vota56FqCk9W0EVbxdjkPMf6JJsnhwHD6C+HuJC8tvOS0r+KjyEN /p3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698279584; x=1698884384; 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=NTjsxTEB+wSbTivrTvElIlgrS7SAqTr5YpOJzPS1BFA=; b=bAmX935jPdlgbJ+YYQqVZDP+nuevrMzVHRKNTunZQXMmKXHcLSr/qSqE719LidOERB lpGXDygaD9EgKENT0C21EX9+eWJ2eaFD/cZEXZEeemklM/wR/bpWcQUez2UvharSoehU Cxa5KhoaRPEwKpdotVk4vkJon1H25exsjMpH++6xB87PNBtJ0ngaoiH7iTT35kxnLX21 bA4clrScgxWshkjPt5bmfTpbf9r7G/QZ5ChJsmp7F6w6IIm3am84bbxPL6q7YR8h13sA uQcScyIMGVWAToO2Qv4YNEqESF1KwXydUOSzbRDy9/iSDlqMo+fAE38C9w5ruUFVqbeh eoGw== X-Gm-Message-State: AOJu0Yw2/jd7exBOqDm7C+A021+O+iYLUffv/ilI/56nms4oMzh1gcjs iK4PsW6t+f521IoAy8JjcYHgXPwayss6yls8mG0= X-Received: by 2002:a17:902:7407:b0:1ca:86db:1d31 with SMTP id g7-20020a170902740700b001ca86db1d31mr14926194pll.7.1698279584487; Wed, 25 Oct 2023 17:19:44 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id jh1-20020a170903328100b001c5fc291ef9sm9754655plb.209.2023.10.25.17.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 17:19:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland Subject: [PULL 44/94] target/sparc: Convert remaining v8 coproc insns to decodetree Date: Wed, 25 Oct 2023 17:14:52 -0700 Message-Id: <20231026001542.1141412-74-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::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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 | 11 +++++++++++ target/sparc/translate.c | 32 ++++++-------------------------- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index a596b0fc85..8de986f0bb 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -216,3 +216,14 @@ Tcc_r 10 0 cond:4 111010 rs1:5 0 cc:1 0000000 rs2:5 MOVcc 10 rd:5 101100 1 cond:4 imm:1 cc:1 0 rs2_or_imm:s11 MOVfcc 10 rd:5 101100 0 cond:4 imm:1 cc:2 rs2_or_imm:s11 MOVR 10 rd:5 101111 rs1:5 imm:1 cond:3 rs2_or_imm:s10 + +NCP 10 ----- 110110 ----- --------- ----- # v8 CPop1 +NCP 10 ----- 110111 ----- --------- ----- # v8 CPop2 + +NCP 11 ----- 110000 ----- --------- ----- # v8 LDC +NCP 11 ----- 110001 ----- --------- ----- # v8 LDCSR +NCP 11 ----- 110011 ----- --------- ----- # v8 LDDC +NCP 11 ----- 110100 ----- --------- ----- # v8 STC +NCP 11 ----- 110101 ----- --------- ----- # v8 STCSR +NCP 11 ----- 110110 ----- --------- ----- # v8 STDCQ +NCP 11 ----- 110111 ----- --------- ----- # v8 STDC diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 9122f82844..7cd1af1014 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4727,8 +4727,9 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) } } else if (xop < 0x36) { goto illegal_insn; /* in decodetree */ - } else if (xop == 0x36) { /* UltraSparc shutdown, VIS, V8 CPop1 */ + } else if (xop == 0x36) { #ifdef TARGET_SPARC64 + /* VIS */ int opf = GET_FIELD_SP(insn, 5, 13); rs1 = GET_FIELD(insn, 13, 17); rs2 = GET_FIELD(insn, 27, 31); @@ -5168,14 +5169,11 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) goto illegal_insn; } #else - goto ncp_insn; -#endif - } else if (xop == 0x37) { /* V8 CPop2, V9 impdep2 */ -#ifdef TARGET_SPARC64 - goto illegal_insn; -#else - goto ncp_insn; + g_assert_not_reached(); /* in decodetree */ #endif + } else if (xop == 0x37) { + /* V8 CPop2, V9 impdep2 */ + goto illegal_insn; /* in decodetree */ #ifdef TARGET_SPARC64 } else if (xop == 0x39) { /* V9 return */ save_state(dc); @@ -5391,13 +5389,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) cpu_src1 = gen_load_gpr(dc, rd); gen_swap_asi(dc, cpu_val, cpu_src1, cpu_addr, insn); break; - -#ifndef TARGET_SPARC64 - case 0x30: /* ldc */ - case 0x31: /* ldcsr */ - case 0x33: /* lddc */ - goto ncp_insn; -#endif #endif #ifdef TARGET_SPARC64 case 0x08: /* V9 ldsw */ @@ -5658,12 +5649,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) cpu_src2 = gen_load_gpr(dc, rs2); gen_casx_asi(dc, cpu_addr, cpu_src2, insn, rd); break; -#else - case 0x34: /* stc */ - case 0x35: /* stcsr */ - case 0x36: /* stdcq */ - case 0x37: /* stdc */ - goto ncp_insn; #endif #if !defined(CONFIG_USER_ONLY) || defined(TARGET_SPARC64) case 0x3c: /* V9 or LEON3 casa */ @@ -5703,11 +5688,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) gen_op_fpexception_im(dc, FSR_FTT_SEQ_ERROR); return; #endif -#ifndef TARGET_SPARC64 - ncp_insn: - gen_exception(dc, TT_NCP_INSN); - return; -#endif } static void sparc_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)