From patchwork Sat Oct 21 05:31:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 736634 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp633648wrl; Fri, 20 Oct 2023 22:41:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqrhYux9FWxD/EszWf7FzK1nOpvn1VkyKmzgYfH9kW+dQdrjfb4r1C3vw/7DLWKE6j/Ljq X-Received: by 2002:a05:6871:8909:b0:1e9:b550:c05a with SMTP id ti9-20020a056871890900b001e9b550c05amr5156603oab.53.1697866865187; Fri, 20 Oct 2023 22:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697866865; cv=none; d=google.com; s=arc-20160816; b=1FOwKsU7b1RPoTHGPH9d9I3N+WXrOz2RBvpwwCWxiH8DGVhaOdDWZgxkpwr7KqWiv3 Ro08ev7YoAaxncLpC2boqVvgoSx3oS8tXJcXdAf8TXCzdbcvtRsYeVdCLMmqXjoGu2aX JW8y6MePff/lDKsuIIQrPn3Dp/gZwrSq5xgBwqgolOzVV5TJTGZpKzEOtzd+UPD7BLMl 6mfmtG0ToRwe27qkz+dc9vqZnXiLb93ydg31RY+ttSlGupNlOE5cJ/2kjjdPQI7sE+nt 5oEH0i7om798z/GIOcKrjD1UADbbzrAcXI+dgwY828q5Pj8vx8EgCJSGosQxzRbz6nUH YIdg== 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=cQauA42ukOEfv4/p0Y5GO/oTAcUVJILosfHC4tqX3BU=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=l3Zfe5i9DYmTWQSkq/0cnV4XTogBIN8kJWO8LSWDboU7x7Ne7U1V2f/8o14xELCohL oRM8MJm1ZzXGP2hRkyvs6wKjJmXs6mIYgHdC/QIOUsQWm5M+Pr3mLi2k6qXEqBS0K0YC M+PaSQIRZxIxFr70TPB0koapa1GvTC1Oq24r1X3lndgaZP6QinGk2A5hSOdl92LxJbHN Zsp/O3y8wSokaIwaY2ufcqSuwTCUKJCgD5VcXVDu+oUwOCbSKu2eTYvmf445vloVLjvx RcHznDxe4+bb/yxcgDzopgHunyt+DPMtJ3M1hChe5ufCeHUhNX8DlzEuqfnrgzD2Cnmk 7XJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VP4+C3Is; 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 cp9-20020ad44ae9000000b00658976d69e1si2362871qvb.443.2023.10.20.22.41.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 22:41:05 -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=VP4+C3Is; 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 1qu4eV-0003AW-62; Sat, 21 Oct 2023 01:35:59 -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 1qu4eN-0002fP-2t for qemu-devel@nongnu.org; Sat, 21 Oct 2023 01:35:51 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qu4eH-00016x-J4 for qemu-devel@nongnu.org; Sat, 21 Oct 2023 01:35:50 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-565334377d0so1123588a12.2 for ; Fri, 20 Oct 2023 22:35:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697866544; x=1698471344; 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=cQauA42ukOEfv4/p0Y5GO/oTAcUVJILosfHC4tqX3BU=; b=VP4+C3IsR8efYerz5UElu/stmKoLDDBCPZYsgHlW2uNs8H38tNvAEEETZR0MlrgfWz 8BqO8cJDI88uaPdePpjhiOTQ+yLXipIy3BXJ7fwAYIqQrnkkpNr8sng+DzkPxW9UEMab hiF0E5OXGAFwHaWVqLlwhjEXZiJ679dF9Kg57Yz0os7tQvfdvXSZ6Lh7LeYTsvjp/ffq QFNTcaalKZ3uN6/GYercXRq5A7O/4yVXNT4JTfR/rKgnZc6e686Hh5MTds0yVRKVExvc x1PJBVrGp9XkMS5UJCuE36qU2hEJ1OWu6PbhyEe9zPuLNc/61npJr6Puiv3bHOfxGlPP HrQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697866544; x=1698471344; 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=cQauA42ukOEfv4/p0Y5GO/oTAcUVJILosfHC4tqX3BU=; b=jqQ69iaF/Pdyzd/ByEAX3zHNCJvDB5OlIR/Y5REEw8kcCNY2yyAzCpUFbOIWxmR679 HUv7Ltr94K2EGoL7YEkDPoyaYzrb+k3PPefUgUyuoXuRE1ODgf47q21a5iCmsTSaowai sUCrhic446CpuZVA9XoB9OfK3TgJB7jG0D2l0ehORphdRnQELQwtD4OXdxkajOEdcDp1 3sbb92RPV468dQMWFh+G1tOVhLSv7/03gbJHQINPYz6NULVpNvAh9mS9f6E22LkDLFwg upR8hS2AuDYG+5P5BNg2qnoXTDTQsoxTF7/9wQEeSZ1nmgOUGRzH1enZwFx2vMZ3dBeG pZKg== X-Gm-Message-State: AOJu0YwpIy3DYRuhZdwWTNpWK7XZvSilqL8GS5h84NREHXsC8KIatG2N TzrQU0quEDfg0UwY/7e+OnhXFDt8F+N68bLD2vc= X-Received: by 2002:a05:6a20:6a28:b0:155:2359:2194 with SMTP id p40-20020a056a206a2800b0015523592194mr4693521pzk.46.1697866543980; Fri, 20 Oct 2023 22:35:43 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id h1-20020a62b401000000b00690d255b5a1sm2427978pfn.217.2023.10.20.22.35.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 22:35:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v3 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree Date: Fri, 20 Oct 2023 22:31:21 -0700 Message-Id: <20231021053158.278135-54-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231021053158.278135-1-richard.henderson@linaro.org> References: <20231021053158.278135-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.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, T_SPF_TEMPERROR=0.01 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 | 8 ++++++-- target/sparc/translate.c | 14 ++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index f4c55db313..96c6e19fc9 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -231,6 +231,9 @@ RESTORE 10 ..... 111101 ..... . ............. @r_r_ri DONE 10 00000 111110 00000 0 0000000000000 RETRY 10 00001 111110 00000 0 0000000000000 +NCP 10 ----- 110110 ----- --------- ----- # v8 CPop1 +NCP 10 ----- 110111 ----- --------- ----- # v8 CPop2 + ## ## Major Opcode 11 -- load and store instructions ## @@ -299,8 +302,9 @@ CASA 11 ..... 111100 ..... . ............. @casa_imm CASXA 11 ..... 111110 ..... . ............. @r_r_r_asi CASXA 11 ..... 111110 ..... . ............. @casa_imm -NCP 10 ----- 110110 ----- --------- ----- # v8 CPop1 -NCP 10 ----- 110111 ----- --------- ----- # v8 CPop2 +NOP_v9 11 ----- 101101 ----- 0 00000000 ----- # PREFETCH +NOP_v9 11 ----- 101101 ----- 1 ------------- # PREFETCH +NOP_v9 11 ----- 111101 ----- - ------------- # PREFETCHA NCP 11 ----- 110000 ----- --------- ----- # v8 LDC NCP 11 ----- 110001 ----- --------- ----- # v8 LDCSR diff --git a/target/sparc/translate.c b/target/sparc/translate.c index e1749ec12c..9053cafd47 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4135,6 +4135,14 @@ static bool trans_NOP_v7(DisasContext *dc, arg_NOP_v7 *a) return false; } +static bool trans_NOP_v9(DisasContext *dc, arg_NOP_v9 *a) +{ + if (avail_64(dc)) { + return advance_pc(dc); + } + return false; +} + static bool do_arith(DisasContext *dc, arg_r_r_ri_cc *a, int cc_op, void (*func)(TCGv, TCGv, TCGv), void (*funci)(TCGv, TCGv, target_long)) @@ -5568,10 +5576,10 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) case 0x0b: /* V9 ldx */ case 0x18: /* V9 ldswa */ case 0x1b: /* V9 ldxa */ + case 0x2d: /* V9 prefetch */ + case 0x3d: /* V9 prefetcha */ goto illegal_insn; /* in decodetree */ #ifdef TARGET_SPARC64 - case 0x2d: /* V9 prefetch, no effect */ - goto skip_move; case 0x30: /* V9 ldfa */ if (gen_trap_ifnofpu(dc)) { goto jmp_insn; @@ -5586,8 +5594,6 @@ static void disas_sparc_legacy(DisasContext *dc, unsigned int insn) gen_ldf_asi(dc, cpu_addr, insn, 8, DFPREG(rd)); gen_update_fprs_dirty(dc, DFPREG(rd)); goto skip_move; - case 0x3d: /* V9 prefetcha, no effect */ - goto skip_move; case 0x32: /* V9 ldqfa */ CHECK_FPU_FEATURE(dc, FLOAT128); if (gen_trap_ifnofpu(dc)) {