From patchwork Mon May 27 21:18:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799247 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a08:0:b0:354:fb4b:99cd with SMTP id m8csp25951wru; Mon, 27 May 2024 14:20:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWq0mPbrb3MPBCgZTvJp74yuwkr1Oh/g4qC/cUxI7RbV16wuM40Yp6Pa6/pZz3LAX3ElgGXDYy+/sqaoJ3v1idk X-Google-Smtp-Source: AGHT+IESc5KQaiLDKHXHqLd+6ncwu/ArZ1yydCu0/YCRP/c7MHd5+s6x9j4xByNKANy/1AIZ4UdE X-Received: by 2002:a05:620a:4ad1:b0:790:c6ef:3d0f with SMTP id af79cd13be357-794ab0f48a3mr1158718485a.54.1716844827092; Mon, 27 May 2024 14:20:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716844827; cv=none; d=google.com; s=arc-20160816; b=KnKZFQWymhpIVVPZZ5mTPQMJbVRoh/jiT/mmG9uogdP/eMcZ0LPdJlSQi+9+gIeIe5 IE0RmOcq+CD3FDxI4j/YJGKSE2HbE5VAG1IQuoggmfO6nl59rp5g8TaBSl2QP6Zi+yMG 4mkLL2eG0OusF856E16BkBVVsCe+xnQ7nfENI7tM0yX5Zw39t6NP2yMIMTAuMvBdHG9v LH8D2mQK5r2ru6+MRkp1zCrUbxg5QxYHT5Di9l+WYuPD2Im1j53CUD3aL+cpHFYRHN/1 NcDOM1FWV+TR556ziVBN9QOio867tdNubvPko/EQ2eaj7lsTK38Jgo509GTYpLDCQOTI t4Qg== 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=ZDglsqAcp0SxDGAaJ0T9OIIUXwIF6C0mIgo/Mt5cf+M=; fh=hzNNYKTacOnX/pFrTgMTyElWGK9kyvH1o007fnxf7fU=; b=yecnhmfDB6UraWr6+7wXN3XjaMFN7lPOHYKY9X3hW/K47/G+E4PEHQMHQMomTPnoUu bjtflEaS77HThWFttL29VljZs5Qo9LP7lo1Che+43KnNdI9Ma/h2a65MaFAZPRPyuhto SxYdJUZSYesez30AMD3l/hwRrt2UkxBR4ljcwEbrgmpiIjzbFNUT4ZHJn6EiKd0gf8GX vo+Vio7HP3ONkmu0JmPQ9FOsS/GiRI1vciXwiaZVHqpCBbjY3fdxbcgKrba8GzcjzVme lNvZszUcm4M52bWjUoPBzeuEdpLAchdCjUAwsi0csEnIbierilyCnMwe5T25Musl8TB5 4cKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YLc0A6zK; 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 af79cd13be357-794abd3d7f1si849930685a.494.2024.05.27.14.20.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2024 14:20:27 -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=YLc0A6zK; 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 1sBhkV-00078Z-Dh; Mon, 27 May 2024 17:19:19 -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 1sBhkT-00077B-Iv for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:17 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBhkR-0003b4-Ps for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:17 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6f6a045d476so104892b3a.1 for ; Mon, 27 May 2024 14:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716844754; x=1717449554; 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=ZDglsqAcp0SxDGAaJ0T9OIIUXwIF6C0mIgo/Mt5cf+M=; b=YLc0A6zKzWchE2US3Gd3Q8QUaWV0zROyW0KOLtibKZIqwigdIHrow7kR3f8CRqfrkT z5+3Nj5LGPnfWx44fhH4WwaklaLgKjca2xGvsOFDzhECG7UCUbIKWblniNdilafzQvPC 6DOAE/24+izawhlZJBA6HWabqtRuKF2YY5BklyyBT1NSLSrE7pOMUxdoaVd4/X32fyGU miQrXyRkT8h4pPeQYsSVeVLr7KQo5f9Urnwb4XKYxam7i2Mv40RpFnEKuewF+lz4g/Ch 1CDcGFjAZtFZI3xHX7sVa7ZXd4ppJheAiEK2731keSVehAC5kiLh4NS0OWY/wJXyx/iu SXPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844754; x=1717449554; 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=ZDglsqAcp0SxDGAaJ0T9OIIUXwIF6C0mIgo/Mt5cf+M=; b=ONKjo6RIHa6gXN0nWzdV1UQUtdA/R0yhpBp6hpB1YOD7qJOteHvC7ZoSVqlYU31fi5 FwjYL3Xc0ADDdJR0CPlZQCuwrC5wdsLh2kiw/9+LoIthQqAMb9yU4MS8jJGLNmxXjs36 KBfQuMxBXP/xZrZWxOiNZlr98bcU3arFmNkCRlpDFOVgj/AB3EksILqvsQ17Eqxg4H1N KdMxAXxbtoMeqjWxnxTSoda2n2Z81m9JhnKzaAlzgpOzx8fYyUOIXi8dCqhOhdvkzk3T 7IX1AARbJWmm1SCOcJlkJu64BHvJxja5ftGqCDzQWJl9lejWRUWM1OVMUyvsoW7tRnHa tojg== X-Gm-Message-State: AOJu0YzGugpfhw+/wXFo0Qm8aK9MgR3y06yyAd2QI+rBTIBSCOSdeAex EjDFnlQSr/hVrlnapFuFbAu54nMIo9ADCjoZah48R6R8Sgk/HZQwyywfrK4XwFOHfrRl/DXvdxY w X-Received: by 2002:a05:6a20:258e:b0:1ad:89e:21b5 with SMTP id adf61e73a8af0-1b212d5bf99mr12122336637.15.1716844754056; Mon, 27 May 2024 14:19:14 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fd1d4d5fsm5265876b3a.165.2024.05.27.14.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:19:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn Subject: [PATCH 00/18] tcg/loongarch64: Support v64 and v256 Date: Mon, 27 May 2024 14:18:54 -0700 Message-Id: <20240527211912.14060-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::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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 Some guests only have, or additionally have, 64-bit vectors. For example arm, mips, sparc. So it's best to enable this whenever we can. As with tcg/i386, use 64-bit loads and stores but 128-bit vector registers. If LASX is available (all current loongarch64 cpus?), we have 256-bit vectors as well. Useful for guests that support such things, e.g. aarch64, i386, and loongarch64 itself. r~ Richard Henderson (18): tcg/loongarch64: Import LASX, FP insns tcg/loongarch64: Use fp load/store for I32 and I64 into vector regs tcg/loongarch64: Handle i32 and i64 moves between gr and fr tcg/loongarch64: Support TCG_TYPE_V64 util/loongarch64: Detect LASX vector support tcg/loongarch64: Simplify tcg_out_dup_vec tcg/loongarch64: Support LASX in tcg_out_dup_vec tcg/loongarch64: Support LASX in tcg_out_dupm_vec tcg/loongarch64: Use tcg_out_dup_vec in tcg_out_dupi_vec tcg/loongarch64: Support LASX in tcg_out_dupi_vec tcg/loongarch64: Simplify tcg_out_addsub_vec tcg/loongarch64: Support LASX in tcg_out_addsub_vec tcg/loongarch64: Split out vdvjvk in tcg_out_vec_op tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st} tcg/loongarch64: Remove temp_vec from tcg_out_vec_op tcg/loongarch64: Split out vdvjukN in tcg_out_vec_op tcg/loongarch64: Support LASX in tcg_out_vec_op tcg/loongarch64: Enable v256 with LASX host/include/loongarch64/host/cpuinfo.h | 1 + tcg/loongarch64/tcg-target.h | 4 +- util/cpuinfo-loongarch.c | 1 + tcg/loongarch64/tcg-insn-defs.c.inc | 6181 ++++++++--------------- tcg/loongarch64/tcg-target.c.inc | 575 ++- 5 files changed, 2461 insertions(+), 4301 deletions(-)