From patchwork Wed Jun 19 20:59:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805633 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14027wrt; Wed, 19 Jun 2024 14:01:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVICVTLiSWGYYlvTVe4bfu/q247tDzG5gmpxI3H2tkVOAxdAHLlxSsydpVdoYAjnHwANDCMS/A+aiW/oBfO7Yum X-Google-Smtp-Source: AGHT+IE0dGAfHbLg3J4u1ApzK75tTWr4AU3DXiZoBKl1POUzmBOqmFffDCoh77O7KvhZd9Q0p5Jt X-Received: by 2002:a0c:df8f:0:b0:6b5:45b:d0e2 with SMTP id 6a1803df08f44-6b5045bd530mr28484506d6.28.1718830901383; Wed, 19 Jun 2024 14:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830901; cv=none; d=google.com; s=arc-20160816; b=JFkse93/QIY1ivuOAXm8VfkXRY9t86OhfF3oUk5ltVulh4rV1ag1XgNf/uyuydwQeK 07vPq7pCvH4vzsFpHKCpzegFK5IAY0VhsLvuVLQsRawafYa5OiW7MOEhIUPoxgu7sJTX QQZCnmMhQKdXYDRaMbj2erFQw/gu4wd6xcgX0ZDZfaKT6pdX5TtNuGknKGJWaiiyijuE g+8DKj30n2wspdkOKaZ9JH6+Mn/xOeN2ByoqA0mkyqc8r8WQRPBdBMrlm9s1/VuyaYV3 Du6N7hJlriFm0XAZ4uc+O5WdBDW717GXzKc4j8ANoT00SLsB2AOoCmGMe45GuSHkxOPL E2/A== 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=hD1uieGP5nfh7Q2t/UD95u7CYAeGLPnjRZrpG6JzotI=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=cvK+N9btddjs+Mr/zumCtTCuitX0zZJLLmt3eH82uSgHyykTpBP7x/JPysTGFXAkZJ 9X2t1O7//9IB1GoGgKSxuDjj0l9cAJNt2ufXrpYAAKBtWPHbJuNLim/85xgyNebzQ/yt nJ4WoJocK/HLAn/JEXsboXox2WQVQNCBgtFT0vmcoiEo1LXR9CgXALr9GqIUEoOJ0oyl WtgL2k/cchldBCmoEK1G6WufvXxSErd06G+RUDzdDS/1oleW92+CfV76tiHaHD+2DZBa 9fQACMHJKFrhTSkkEwkuDB3c1HiVpE+QGIVE4TwnfuwmF1iPk/F/0riid6G57UpdXfnt r/qA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rwxirWeT; 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 6a1803df08f44-6b2a5a172ebsi157412526d6.58.2024.06.19.14.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:41 -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=rwxirWeT; 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 1sK2Pg-0002Ka-LA; Wed, 19 Jun 2024 17:00:16 -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 1sK2Pf-0002IZ-2s for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:15 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pb-0000cU-GM for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:14 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1f7274a453bso1459225ad.2 for ; Wed, 19 Jun 2024 14:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830809; x=1719435609; 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=hD1uieGP5nfh7Q2t/UD95u7CYAeGLPnjRZrpG6JzotI=; b=rwxirWeTs+xF0CzXhsGaHDS0Fg8oe7Ce+dHr6U4m+nose1vbjIfFaE9KpTeS3St2gA Y5upAm/ZJOJwZu3FtPBTpaaImZ4C+C0iEZw2awQHqfZVw42FdwzU0riSIU0bGXgc4jQ3 5KJkkFh6LoauNKmCunMB4kPDQsSdM+S9/BHHzFqD5QpD4AEv9Px6LOIDy9YpjcB9a4qX A4+g7B6dXIIkm29LEx+lr+hlfCAWgOb6kIt4sa2Tl06WKd1I/SU5lpeMckrDzTbZAKLe Jy0XVHR/s8kQUf+ep6LURA7arzhyWREUYrqHh+92NXbPAPYCNIWFfgCxMmjj/Kls0ovv H2tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830809; x=1719435609; 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=hD1uieGP5nfh7Q2t/UD95u7CYAeGLPnjRZrpG6JzotI=; b=W4yXEXX4pIyeX3sas9xKyPRwLKvB6JpSW5gynT2gHuM+JO1rA0+9oD9XaUy8nW4UVW S4pcrqOwCSVp/7nav6TeOEziqv1vBFn3dc+5X1b5vzZ17/DHwjnjt+a/1zWTtHD1U+8z +JreS9q+H+5tMEvetlS8K9X2cXnaA4hCqptWG3bNq1I5dDr7agt8ixhFnLdNe6RcmLsR 3eSuvjHUisqEAR6E1Mf4NjthfaL0/oz2FTRRuRjmebv7LxqpMmWXI6ui6lb95VrRGTrO NcEsYSf7/GHWR85mL1Lj4FmCWGgodBVGjS8QiIh/unyedn/RdGBX1LYv5iKf9Z4EtWwu f1WQ== X-Gm-Message-State: AOJu0Yx+s7PwEdZh4XT38BcJG1PvhmK1V89RWL1mTWl+PJHwFSSAvNHu dU/jxhpzuGP3cvPM1Z8cTKn8+Qqw1ikFELxeZ+RPzVefd54SIdfs5wagaXarhoLFng6Tfy/4/u0 W X-Received: by 2002:a17:902:7449:b0:1f8:7359:bb66 with SMTP id d9443c01a7336-1f9aa474109mr27246045ad.46.1718830807487; Wed, 19 Jun 2024 14:00:07 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 14/24] tcg/loongarch64: Support LASX in tcg_out_{mov,ld,st} Date: Wed, 19 Jun 2024 13:59:42 -0700 Message-Id: <20240619205952.235946-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619205952.235946-1-richard.henderson@linaro.org> References: <20240619205952.235946-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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 Reviewed-by: Song Gao Signed-off-by: Richard Henderson --- 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 8f5f38aa0a..4ead3bedef 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(); }