From patchwork Sat Mar 2 05:15:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 777506 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp1695255wrn; Fri, 1 Mar 2024 21:21:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWsAvPYz2gOWiVmnlZNTfhOieCEG/8fOBX8Mc8OH8w9SHxmGiAegUNFHkxpYJVy7Zt4g3MBhzxKR0EfDR3PmIH1 X-Google-Smtp-Source: AGHT+IGQv6mMVDCtOBs8vClJrtDOEMZUwRcYmj036/IEaLUdS5XyYY1BGCiu3beJUmLPVBvSowF2 X-Received: by 2002:ac8:5cca:0:b0:42e:b8d9:4269 with SMTP id s10-20020ac85cca000000b0042eb8d94269mr4530934qta.52.1709356897073; Fri, 01 Mar 2024 21:21:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709356897; cv=none; d=google.com; s=arc-20160816; b=oMe5EZ0sbzci3OgNab57XNWXYut7xzbQTtJArbhfUP+LhY8w/0E4q8HJ9zTfnqPqAX sJjsu8BPaMeJ9YSWoWYDS/ldn6uxPkDPBtePvpUk/4HrW5mRQOezRBLomrKFNQzvNzS5 Tw/d0DPJ3daRhuIHLis9H2js82cmPYbHEyXRh2aGJM9FxIdD82lM9c0SGAMkBu8EwPzJ HpE6QpGQrxBtgnRWP6iyysUylRQ4kP93zSCAa9NLmDyzOa31Ukdo0Jkdp6H9ZQVAVvZm PkF7Zwu5zii6DkIuQzwKft8vG2ZO3mvOf+fqSpSWvtzQhETkNjn71yglYPSA434Hmxif nJqw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=Z5Z9CdEPCUKQg0iv5SGMW8Q6iicBtVqSsJ6VGY9I+po=; fh=OY/jf0qYEhT53LcIJp8d/e39mN3vEzshkseI36O8N8s=; b=qm9vM8EQwBIXw5cgoJys9v/JX1Tepdk2+yDQL1mKIL4ZVkltvAq7olXJH7ot18g6J1 ElcKUl5ASCKX9bE+dKtvwsfBb1n0jv2cUx9TNSrmjO0zqKigfAYcRmHaMfc3OHiRd/m2 FZKm1kFRsgJpr7px3czs0Bs0FghnE1KMbkcJyHQQ8sycge6xZaCdNqWb6fpWWL34BtC8 2d0BL9k5NjZH0i7hT20bC4sNty/fNymF/i1riXlS9y+MBL/ahLfDHCBoK4uz1bnoXYAO c5sv9VF/TCNa8tara/QwvMP9RbnTFsDy+er1G807/cubWo0HVocfmibA7nFkbwtdvQ3c WapQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k2OAYxWY; 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 ga8-20020a05622a590800b0042eda708a4asi743757qtb.427.2024.03.01.21.21.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Mar 2024 21:21:37 -0800 (PST) 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=k2OAYxWY; 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 1rgHjI-0002L3-VH; Sat, 02 Mar 2024 00:16:12 -0500 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 1rgHjF-0002Kb-D7 for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:09 -0500 Received: from mail-oi1-x232.google.com ([2607:f8b0:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgHjC-0007TU-6N for qemu-devel@nongnu.org; Sat, 02 Mar 2024 00:16:08 -0500 Received: by mail-oi1-x232.google.com with SMTP id 5614622812f47-3c1c913508fso1687180b6e.3 for ; Fri, 01 Mar 2024 21:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709356564; x=1709961364; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z5Z9CdEPCUKQg0iv5SGMW8Q6iicBtVqSsJ6VGY9I+po=; b=k2OAYxWYKQM2OWxp8IAlHV4DsUODI9yR6eHhu7pCSplVXGF0kN/IE20Py08qCkC72E A5EBMNNtAH+rDFYQfXt2WOg7lHV8gq0vKVJYp0dUS94v56/9vDZ8fp08SWYrNFGr4nJB aEVJq+UOjkzxYuiGJG9Xg//Hr/4IZ30YLKIn9BibBEWghdS3w+0HAkPeYsyfA6ctffUS eWvAjphDiUjMNJb+F58JK0TOBZ4IJnRGffIlQy/9PSA2goovrYpbGLOt+6co2WiOFPO2 hk8whSIT/seEtMfnOGfjjjA1k1hhv0DVdo4ChkJun+RUXyv8YWjHpAJtocB4pZleMVTt eYzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709356564; x=1709961364; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z5Z9CdEPCUKQg0iv5SGMW8Q6iicBtVqSsJ6VGY9I+po=; b=gbCpQZB3V/j5K0XBky8sjvCcQdKLZmNCbcbL1pM+6phOdQdorAKlaD9BjwF3g6wmuA L6nHbCnMeDm/if4th7PmR8uAwmw+l/sejkxRH5tiqP1YjFjKU2e3cmjIhyNWO/mo0N1u Mp9ai0dwYeNYOnBI/5rLqb7o6VOgu+5nv22Aa4jLUNY3YMLduhnFTEhrII7LyYpAQvgw gDYqGwY/AaDwRaLYM6O39Za90SWBJMAffXYW5qadH/q7VMizf5WUQzalhhCrRosWinao sLmQ5t9del6j1aQY1xUGJou3NWIm3seRt41zkrvcsEpw0Mm3BLvic65NtkSwi5HQjenD gNXA== X-Gm-Message-State: AOJu0YxYDA1sAbL3vVvwFma8BQhd18/TyGP25ToYM4GvrfoyTbgGGgfF Dy2CrbwB3VoS+vi4YOGLElGpq9jEKbmKhgdV5zmVxZMAklOQ3ccjApfFdKJadNX76yoVtu7+ax1 K X-Received: by 2002:a05:6808:2082:b0:3c1:cb68:1f20 with SMTP id s2-20020a056808208200b003c1cb681f20mr4995847oiw.3.1709356564696; Fri, 01 Mar 2024 21:16:04 -0800 (PST) Received: from stoup.. (098-147-055-211.res.spectrum.com. [98.147.55.211]) by smtp.gmail.com with ESMTPSA id v8-20020a17090a458800b0029af67d4fd0sm4034901pjg.44.2024.03.01.21.16.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 21:16:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: mark.cave-ayland@ilande.co.uk, atar4qemu@gmail.com Subject: [PATCH 00/41] target/sparc: Implement VIS4 Date: Fri, 1 Mar 2024 19:15:20 -1000 Message-Id: <20240302051601.53649-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::232; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x232.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, T_SCC_BODY_TEXT_LINE=-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 I whipped this up over the Christmas break, but I'm just now getting around to posting. I have not attempted to model the newer cpus that have these features, but it is possible to enable the features manually via -cpu properties. Possibly the first 6 or 7 patches should be taken sooner than later because they fix bugs in existing VIS[12] code. I remove cpu_fpr[], so that we can use gvec on the same memory. r~ Richard Henderson (41): linux-user/sparc: Add more hwcap bits for sparc64 target/sparc: Fix FEXPAND target/sparc: Fix FMUL8x16 target/sparc: Fix FMUL8x16A{U,L} target/sparc: Fix FMULD8*X16 target/sparc: Fix FPMERGE target/sparc: Split out do_ms16b target/sparc: Perform DFPREG/QFPREG in decodetree target/sparc: Remove gen_dest_fpr_D target/sparc: Remove cpu_fpr[] target/sparc: Use gvec for VIS1 parallel add/sub target/sparc: Implement FMAf extension target/sparc: Add feature bits for VIS 3 target/sparc: Implement ADDXC, ADDXCcc target/sparc: Implement CMASK instructions target/sparc: Implement FCHKSM16 target/sparc: Implement FHADD, FHSUB, FNHADD, FNADD target/sparc: Implement FNMUL target/sparc: Implement FLCMP target/sparc: Implement FMEAN16 target/sparc: Implement FPADD64 FPSUB64 target/sparc: Implement FPADDS, FPSUBS target/sparc: Implement FPCMPEQ8, FPCMPNE8, FPCMPULE8, FPCMPUGT8 target/sparc: Implement FSLL, FSRL, FSRA, FSLAS target/sparc: Implement LDXEFSR target/sparc: Implement LZCNT target/sparc: Implement MOVsTOw, MOVdTOx, MOVwTOs, MOVxTOd target/sparc: Implement PDISTN target/sparc: Implement UMULXHI target/sparc: Implement XMULX target/sparc: Enable VIS3 feature bit target/sparc: Implement IMA extension target/sparc: Add feature bit for VIS4 target/sparc: Implement FALIGNDATAi target/sparc: Implement 8-bit FPADD, FPADDS, and FPADDUS target/sparc: Implement VIS4 comparisons target/sparc: Implement FPMIN, FPMAX target/sparc: Implement SUBXC, SUBXCcc target/sparc: Implement MWAIT target/sparc: Implement monitor asis target/sparc: Enable VIS4 feature bit target/sparc/asi.h | 4 + target/sparc/helper.h | 36 +- linux-user/elfload.c | 51 +- target/sparc/cpu.c | 12 + target/sparc/fop_helper.c | 104 ++++ target/sparc/ldst_helper.c | 4 + target/sparc/translate.c | 960 +++++++++++++++++++++++++++++---- target/sparc/vis_helper.c | 526 +++++++++++------- target/sparc/cpu-feature.h.inc | 4 + target/sparc/insns.decode | 338 +++++++++--- 10 files changed, 1626 insertions(+), 413 deletions(-)