From patchwork Tue Oct 17 06:12:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 734339 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp326785wro; Mon, 16 Oct 2023 23:29:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGq0lbmqpgiExlzykfms90/4mSVBgkCGEBWhHyJr56Laj4NqF0ajo/CvEjvaomJQSe1DmYH X-Received: by 2002:a05:620a:15bb:b0:767:2471:c880 with SMTP id f27-20020a05620a15bb00b007672471c880mr1271334qkk.28.1697524159564; Mon, 16 Oct 2023 23:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697524159; cv=none; d=google.com; s=arc-20160816; b=bcI+J2M5umM1cbaIGJux8h2QaO2NbeF+SqY4k1H9Mdy+I69bgfd5onJlhF8TXmPUJu ppojNH9PcTk0yx8VFESyUbC3sOdBgw8pbhSTZcj2QPjpBj3M5aWXmic56vRr7ccEM1Tk eh/S53PhgzC+dVxWJQJLpf5tu1cp32uVK0nFXn+DAVjNhDLqRJmfUTOi3iV3eUmGkO4M uOfg9zfWh5e78KtrIzeiMvqHEf1vIsCXzRTFUeAALPRceRm1lh0Lt+10vEb9At2dZY8v 82a767LgV82FcEpQOcCashUbW4LABIgMCu+PhaL4xEzlQZBEzAtjQ6Wb2fI3ypgSwHH6 vhKg== 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=Rm7z9mYq9FPEIcvf5xAJUJvg0gWyaJ4v7z2/vituMlg=; fh=TYrED6TOMxGX0VC4GtjviASLbYyJe19+7/tKWjN44KQ=; b=MkyHViKrjeE3zI7FUvlMSIDflXuapN3N8Te8Sful8I7B8fvK09fXJwbUywFux9oIfr cXMGaGK6sW7EsXo3qyISGpMhpbxVwn4Qlp5ECZ/tsjwm5LC1qRyY/nWsZD+C8PW+zNOi 2fzrhgR+4GUppZsRkav/U/ew9Nw/iaiyRUMygbLy/xOnWMubx9i3/AbqTUCLFawi7Ydd Ti0w5wLmXWGDPbVIVD9i0swahiErCyJpNOd/+VpE7xTQCS9mGqlo6x6a743lZ5+kd8Hv +6LJvReEqlW8wqrZwDE5k3lcyrFyJav1gAzJKlqpG0eWvnJLTkokgy1EpRYzvyn2lSrq M2Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e8oAQXz9; 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 az17-20020a05620a171100b00775a6554b41si641509qkb.285.2023.10.16.23.29.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2023 23:29:19 -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=e8oAQXz9; 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 1qsdNr-0003U0-0j; Tue, 17 Oct 2023 02:16:51 -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 1qsdNY-0002sI-Sh for qemu-devel@nongnu.org; Tue, 17 Oct 2023 02:16:33 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qsdNX-0004iB-6g for qemu-devel@nongnu.org; Tue, 17 Oct 2023 02:16:32 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6b89ab5ddb7so2952826b3a.0 for ; Mon, 16 Oct 2023 23:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697523390; x=1698128190; 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=Rm7z9mYq9FPEIcvf5xAJUJvg0gWyaJ4v7z2/vituMlg=; b=e8oAQXz9otL0F+IbDLLcnUgePgVLmFlJewaqGSjp8I+FVIeylPGweB5Weu7FCJsJ3p 4/S2yrJT3tX7+8WbFgnd6Y3HDC9h/TJmg9X1PlsMccdoeh6DOQw1PBE2M1UWChiqY9d+ eNoufJFGp3JV8olF8wZQI2jrYCIMgcKPF6z1F9ORt+srv++X5MMV82ebEFJOoACpqH5l x/4cvvyq5UyPD13B7hhfNgCaWMv2uBCTkoWjzlpi7zY8VS8YrQfAh8Ipzs/HDBHrXt9B ub4LsjpDCJiR7h7HJ3A7Lkru0Bthyk8tXvCni/AuTiwwJ/MYUWAMQ/iSF2/vrKWWLxBx 8CrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697523390; x=1698128190; 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=Rm7z9mYq9FPEIcvf5xAJUJvg0gWyaJ4v7z2/vituMlg=; b=urxz70x1lORrCx736Cv7kDfE74PP3/m7kXom1H+1r2kAI7UR7l86LUJwON70YgWjMu qr2lc3yODIeJecYYDsicpAhybW7rOQ97nA1EkWFr00mcl/dYnFgv1nBc9DTCFv/WJTUo /0+PSdekKa0iglS187AoLZ8KMye4N9Irn6+t2I88q3oKQgVbhbbPKJIIneGXsmly3og6 1vYhcZxUiL7PUYgwsFj+Q43I1Z/C0urQd5AbBtR8VXfuKxTPAsKAOA0+FXzpu/D8jSxn MvCSsiYEyGEj3BrNTgKKpwz27XLMakbDfTgmUGp0r89bF+XttpLCV74Z7JAzgvWBKwdH DRnQ== X-Gm-Message-State: AOJu0Yzn9KNvKWnf8U5dC+nQBSfwqxXC595OMbcr84ErQexmUJKDIIs1 ox2hTT98nO5u6InIqL9CNBIy0bapkJ+N3po9ruw= X-Received: by 2002:a05:6a00:1ad2:b0:6b8:f7ed:4deb with SMTP id f18-20020a056a001ad200b006b8f7ed4debmr1367119pfv.13.1697523389757; Mon, 16 Oct 2023 23:16:29 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id m10-20020a056a00080a00b00690ca4356f1sm579280pfk.198.2023.10.16.23.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 23:16:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk Subject: [PATCH v2 53/90] target/sparc: Move PREFETCH, PREFETCHA to decodetree Date: Mon, 16 Oct 2023 23:12:07 -0700 Message-Id: <20231017061244.681584-54-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017061244.681584-1-richard.henderson@linaro.org> References: <20231017061244.681584-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.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 | 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 8e6a24e094..86108679eb 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -224,6 +224,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 ## @@ -292,8 +295,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 6b860dbd75..1b402de49f 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4101,6 +4101,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_cc_arith(DisasContext *dc, arg_r_r_ri *a, int cc_op, void (*func)(TCGv, TCGv, TCGv), void (*funci)(TCGv, TCGv, target_long)) @@ -5534,10 +5542,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; @@ -5552,8 +5560,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)) {