From patchwork Mon May 27 21:19:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799255 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a08:0:b0:354:fb4b:99cd with SMTP id m8csp26257wru; Mon, 27 May 2024 14:21:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7hpmlBRg986PKwSkJKXoeUqfGpbbWcR4QqUNoPlR4Of29laL0hEfEjoG59PIOZ7Mg19ln3KM56/Y98K9H/qJq X-Google-Smtp-Source: AGHT+IHt9n+pZtAgiwgFHMrpEK84MTmykHv7BFXMBURcPZuDzPR8XNVWr2wOQbH8jpDRoG+wIrRC X-Received: by 2002:a05:620a:c4f:b0:790:686f:f683 with SMTP id af79cd13be357-794ab11f4a2mr1473105485a.58.1716844898117; Mon, 27 May 2024 14:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716844898; cv=none; d=google.com; s=arc-20160816; b=eR84j/1rKZC8VyEX9vx36bygOh584lex0ZJchsot1GjU+ltcESeRI6NCSp9oyzM+U8 0nuoNX8//Y1RAgKb7+FgTSANpi6gdwZimaCJQj3AqzfUhWav7zEBjrQLZLgUyi8hfcJJ 99b7J6UJYZF131CnD5dDauewBbPH7JOYvgi/olKqZ6GoI+If7xZSCHmT80Z8OxSU7kjF A7zdk6X6/s+U2dJ6d6B2qOoxeU3auZciK3Y0G/DEYkXNR5mAlfsydK63nSuSKLrasn1k 0NJx4lJHs8y4XW7x74nIZ9afRWgttQAmsuLzIhT4Nt8zIuyCl3aqKO0Mn/AQF077hCnc Lkhw== 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=KOGunUtRSioDRpx9DXryp7ugeSYnTIPtLbqA1hbe0/E=; fh=hzNNYKTacOnX/pFrTgMTyElWGK9kyvH1o007fnxf7fU=; b=UaCCY5P876n/7NTKsQ6gAtzeotG+3FezgRsAUTqyEqIgiUAFeCiwUubM92WNO1bpfl ltFmi8XJSoS5gAHu9qfd9MHZ2xVFUkn5bGhXkgO/fs6/7V06Gm5LGpIU6WbUD+OOUMk3 gKRIAJq42/+5hNiLKzJP+7qRs8bqVSxTYgWrzZ7qdxzcm2E3mRCh3oZwhhHSbbKITn6T dxndN7ZeKmc7l5hv5eT6pxoRZlzHnn9QvEiey3VkEESlMcexCvzRXj1Q+yOaHxLOyWQ8 RykiWS1moRSNZr7igOEV7xvEy+NxsilRfIAKahYqTtFrlmUrfQt19ZPORh0d8Cbdm/9U 8gGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kcaTtvVG; 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-794abd4ba88si858434685a.552.2024.05.27.14.21.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2024 14:21:38 -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=kcaTtvVG; 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 1sBhkh-0007Fq-3t; Mon, 27 May 2024 17:19:31 -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 1sBhkf-0007Ee-MT for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:29 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBhkd-0003f9-MG for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:29 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6f8e98760fcso107786b3a.1 for ; Mon, 27 May 2024 14:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716844766; x=1717449566; 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=KOGunUtRSioDRpx9DXryp7ugeSYnTIPtLbqA1hbe0/E=; b=kcaTtvVGjwGuBlvXm+CFKZNDMKPuA4SBkatr1fPyxta749yQEzarKYJ2VMdGbwjSq9 JVeWAwfQ+ZIE0KlLDHVtUHh0d7Np/zZx280gVgSkY0E6Rq5vji4ANoRK47NN5BzX9mu7 T64NGZ/fyTQEK2xA4Umq/Qum+14aNLDAYg4Opy7eYW4oHSP2OWItMhcy8Vz1Rjr4RzHf Ss67JgsxF5InK+VkRoFsw4PDfItfyKcIEn2qi6uWPc8yyd3Tg1BfMG2Gj5NZAr97jNZG fcGtWN9q+aOix4zh6GWno2pKq3cQOuiABLIZPfueRzgGnKI5KIGtJ3BxfH2maCDqrqm1 j6rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844766; x=1717449566; 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=KOGunUtRSioDRpx9DXryp7ugeSYnTIPtLbqA1hbe0/E=; b=NnntLxWOGJKi5HBwuufxzdmT9/csvFxSqBZ0Ch9hHTAzdIuhwGpg4pEg/TS8zJV4iR lfdNm33mCm7aAi5BJN6AlcKKRLKjRXSeYXJmf2kCDE2OdgagNnTBn1WScr8xgzpz5XIt qqQ1gs/Lpdv5Qu88tbCvWbYpE/2drsXavUbXNoLruWPeE/MenJxcQ4dj4mTA9gWfQ1m1 sqq395W6P5dfT0NTszVk3oPetv6+d0tekZu4YGkjw4TyYPsKzFk17v7FDjtz1qF6E++o iBbygS8Y/Rh6FwKaJ6GeCZI00HTyDQcB9Le4rbbq3Bd1/Q/i9tsyN4y1l8MgBBDmMXVR jIQA== X-Gm-Message-State: AOJu0YwxuGulpY+th1lJI1+v2G669s869Ys5FWKuzC1DwTWR9aTOHqgm lQE2EiiMte+1xHYMsMhYk/MnKlotKfCnyaNBtdqgoKO5cPIUQuoWnoXO2R5b8XylwLm4197Z6op j X-Received: by 2002:a05:6a21:3417:b0:1ac:3b5d:a3eb with SMTP id adf61e73a8af0-1b212df0c63mr14015366637.39.1716844766277; Mon, 27 May 2024 14:19:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:19:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn Subject: [PATCH 14/18] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st} Date: Mon, 27 May 2024 14:19:08 -0700 Message-Id: <20240527211912.14060-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240527211912.14060-1-richard.henderson@linaro.org> References: <20240527211912.14060-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.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 Signed-off-by: Richard Henderson Reviewed-by: Song Gao --- tcg/loongarch64/tcg-target.c.inc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 5f4915c6ac..e633d268d0 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -325,6 +325,9 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg) case TCG_TYPE_V128: tcg_out_opc_vori_b(s, ret, arg, 0); break; + case TCG_TYPE_V256: + tcg_out_opc_xvori_b(s, ret, arg, 0); + break; default: g_assert_not_reached(); } @@ -854,6 +857,14 @@ static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg dest, tcg_out_opc_vldx(s, dest, base, TCG_REG_TMP0); } break; + case TCG_TYPE_V256: + if (-0x800 <= offset && offset <= 0x7ff) { + tcg_out_opc_xvld(s, dest, base, offset); + } else { + tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset); + tcg_out_opc_xvldx(s, dest, base, TCG_REG_TMP0); + } + break; default: g_assert_not_reached(); } @@ -886,6 +897,14 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg src, tcg_out_opc_vstx(s, src, base, TCG_REG_TMP0); } break; + case TCG_TYPE_V256: + if (-0x800 <= offset && offset <= 0x7ff) { + tcg_out_opc_xvst(s, src, base, offset); + } else { + tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset); + tcg_out_opc_xvstx(s, src, base, TCG_REG_TMP0); + } + break; default: g_assert_not_reached(); }