From patchwork Sun Oct 22 05:59:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 737002 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp1006381wrl; Sat, 21 Oct 2023 23:14:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHskkm/FAPytZDJ2o5+QIB1tIc72rfUOfv4UvFX5QVmyk8WTg+TiDwlWkEOQ1mj6sRi8Eg6 X-Received: by 2002:a0c:f194:0:b0:66d:2e59:4fc7 with SMTP id m20-20020a0cf194000000b0066d2e594fc7mr8470086qvl.19.1697955295911; Sat, 21 Oct 2023 23:14:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697955295; cv=none; d=google.com; s=arc-20160816; b=oBmWMTmGWQsubePd5yiZ7LAmqFj+gkyuOePuES0xHQwcb36EKo2WkSyiUbi/Fsv+wk nzTG7IQ3te/9FFxIFrlGp7czeHcJJBnyEwPlRmHu+LKU1q+pmMFNGoE1SLfBFNa+mqAk MjuouCVJ63ZlbnTpVSWQSzU1ghOUAyUKrzEj3quvH8A7ih3SzRMFJWffPSp5VeBtiqmq YEYvV5dRnZNaIitPoIs9ggzAkMrLjAuhxF161QlSBsG+hTYmgIgdwSjxcb/6GDsbJYhY J1PmRSr2j4Zl31UQxRemrsBcJRajvgtyuBf/eCZWBvJu+ezzKxSbB22dV0ORdslecLcW S76Q== 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=Qj77X/ZWz9rFPcm4wIph+0j5QZrOxK4G7bJejnWFGq4=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=Sr6oK3sF1KI1gvCeyNQgQS9yqUpjEYdZ+A4+BJroRyXBp5qNgLL3RLSf+LaVsNJjJR fp+hh8vtitacCUBs0Ere+gQjzSDjhPDunQIcpQUUiKeRb9d7868rMHuoHRcPQ3HthO+9 3aanR3HR+U4gDNRj07zQwWxvLZti+0ZW6MBmwTpc9TK9DkGeIsrfZkN00t+K8OfON2NN n9KTvV3El4eN6JNT93e41rAKZAOgRFB56ucUyY3aqTvk1+ybTHuuISoOH8lJOEtOf6K5 caDE56kl8igtqgJWjYygpWpHqhCZDEu1Owiv0rooa2Dpp25seT2tDEooUXT+q45ZT6V4 GjNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUvf1u6G; 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 b6-20020ac87fc6000000b00417d93ca9d3si3700483qtk.146.2023.10.21.23.14.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Oct 2023 23:14:55 -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=XUvf1u6G; 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 1quRZq-0008NP-Ba; Sun, 22 Oct 2023 02:04:42 -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 1quRZn-0008Hw-ND for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:04:39 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1quRZl-0002Cp-KS for qemu-devel@nongnu.org; Sun, 22 Oct 2023 02:04:39 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6b77ab73c6fso1593372b3a.1 for ; Sat, 21 Oct 2023 23:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697954676; x=1698559476; 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=Qj77X/ZWz9rFPcm4wIph+0j5QZrOxK4G7bJejnWFGq4=; b=XUvf1u6GpNb/ES2xFAM6qhiKoSakBspzxRDU0z8JEjQCtDLdu17uZg88FB2gG55SvL b6z65mgybr8gHPPyBPFRTY2VSXTPGxfS8aTGqAySn6jILBIfOBdWqgnKFksuYSfxEHRi WnpwQfNBk2+zY2E3/kcSYb8cJKfXwQCdF16fTKvSUxAv612AA+a33Wph/sM9KtqE1/lL 6x6hcXawdL4P9fSpZolpLmHCy+jpYNHmmG8Iq1TVnj30TsI2IYDPpn/3oP87aIVqBJDE 7XCycqnD+f7XQLfOXGlaobbKebOYK5mqO93Vi4EM75z8ixuQgd4uoiK//pGKQOHhU/fV XkAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697954676; x=1698559476; 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=Qj77X/ZWz9rFPcm4wIph+0j5QZrOxK4G7bJejnWFGq4=; b=VhHM+2BGsR7wnJApoVjQOxYjhufOE3rfZKT18HVDWZd4eHFDhC98LVkT5WlwOiq6mB eAySYZ+hiJMaCZEiYV1e4dKswm+gZxjmoX6T6c7I5VN+QnNL7/yHHSJTxV/94cPwLRoW JUbh2wUsJOp2EfmldvMEr9jBywGM8yRL5NQpyEEbEwHLh0kpMX8GbpTHnXyl4JZvY+yJ ZDyg+gf7j/3KXHkLLC9dY2BuRFLMzL7JvUANAROyN5C1TnHpYwYiU73G5R99yhpnaV12 O4Qu4iN9OjUfW5XupoSHHpxmXy6mnlqHZ/PIIYAGxRiTh8pQSZUXE3kjyJNK2DHvdDJo m0tQ== X-Gm-Message-State: AOJu0YyAugwae1rr3mC1AxVSSqfAcwzI8SoC3ywiJ0vra3Ef0iZH7dBt YXvWv4787f+naaZMto+ASCIijI1Sx+xWXgd5hh4= X-Received: by 2002:a05:6a00:10c5:b0:68f:b5a3:5ec6 with SMTP id d5-20020a056a0010c500b0068fb5a35ec6mr7537537pfu.0.1697954675818; Sat, 21 Oct 2023 23:04:35 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id fb13-20020a056a002d8d00b0068a46cd4120sm4007373pfb.199.2023.10.21.23.04.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 23:04:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v4 40/90] target/sparc: Convert remaining v8 coproc insns to decodetree Date: Sat, 21 Oct 2023 22:59:41 -0700 Message-Id: <20231022060031.490251-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231022060031.490251-1-richard.henderson@linaro.org> References: <20231022060031.490251-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 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 9d1307653c..7f6adf35ae 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4871,8 +4871,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); @@ -5312,14 +5313,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); @@ -5535,13 +5533,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 */ @@ -5802,12 +5793,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 */ @@ -5847,11 +5832,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)