From patchwork Mon May 27 21:19:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799254 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a08:0:b0:354:fb4b:99cd with SMTP id m8csp26245wru; Mon, 27 May 2024 14:21:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWOWA0fW8Bl9lW4t4bed8LRKCpWI1Kc/XTj+mHAjL9oWmSidQYyHe4T4fvbxxIAWRDSSdjTFR2c2Ke6mSl5xFg X-Google-Smtp-Source: AGHT+IEOLxm9Fp/ak8DDlOqWTcc4UD1tYvSUMyDepk4eLrmAUrRoxfvXv6gfhKknpwV9QnyQ9nlE X-Received: by 2002:a05:6830:13d0:b0:6f0:b6d9:e62b with SMTP id 46e09a7af769-6f8d0a73ccamr10316793a34.14.1716844895851; Mon, 27 May 2024 14:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716844895; cv=none; d=google.com; s=arc-20160816; b=04KhMlNhbhCSBuylRb8mZuQYNOzLeQaIt4hn6FUD4K4iK3LXVGQEexTJnkUOYKWJ4X BDyY/+rdXNnZcKj+PScv4wBi/oqbK0umSvCIX+Csh2jYWegaJyRhh6fwsdL6gZSjDFtJ +OFORGUqo0QcUck0U7PmbXm3JCTEnWcxulQAPlNiR7q8jzuRJChqHcoBSbpV5K7G5Dnj M8gBoyH+PegWyRUx9/p9AS3MXXAGBOXGHa/sHdAdT40PMxju7r0yg3+/srGRZb117dUZ PStb1JkZ7svdSbhUluNwdu3YyBTGrynUmSsbHkRIGi61O+aypfNbqUDzqdGrYjAgwBnq Bw/Q== 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=qrqrwiUB30mLfDa3vSrOyifnLgQm0sJoOyLeI731Ly0=; fh=hzNNYKTacOnX/pFrTgMTyElWGK9kyvH1o007fnxf7fU=; b=JzS45PdWHEuvAmdZcNUzw+NgOLljHS2hVuCvNS2FpoIzJi4ZQgBdxe8sgg4UMF6wKj XKePH17GvCiwhi2Vb24kCYliz19jAEJyx7vD60I3oY9urat201kzUb7fdU6uOUHp9Dw9 ziUcYPzuVefI3wlX/yUi+Af7yPahAd7il41ob4lZYy8wls9fdtyr8r2+rHbbjwhylYEb aQ5WuE3pWY4UvB6HbUxVwhsnueQoUmH/OQ+J0upLSPTrhAe0g4zzj/9A9VlTXMyUvqWN L5+/8/8AWiyVdsPhv1O2g2kNoJMB44InSlUpv8QZuKB4QDEhclmzvaSItfbY2yt1xOih LlhQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lEBXS/iV"; 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 d75a77b69052e-43fb18edc08si97798541cf.805.2024.05.27.14.21.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2024 14:21:35 -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="lEBXS/iV"; 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-0007Fs-Pb; 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-0007Ed-JL for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:29 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBhkX-0003dI-S2 for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:29 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f8eaa14512so101098b3a.3 for ; Mon, 27 May 2024 14:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716844760; x=1717449560; 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=qrqrwiUB30mLfDa3vSrOyifnLgQm0sJoOyLeI731Ly0=; b=lEBXS/iVyfqlFc9xjRlJlO9EHkZIEaExNya87QtDvhgZPDiFPFUqccS5LY7RNQvQPt +0/hkqVwwWzvrHrO0rwHXsH2iCLd71WcSfwVYBwRlk16xi1umcPv7nuYFIoWz6IDVnff x2JaUdxIqICdVa1m1LRulqBFEaQDwKzdMjtZ8B5qT5td/UEgmDfI3hSkL13H3jG8RXxR tQumV9qRKrfYJBbL9O/N6UBvfrF+73hyT7G7AWMyQTMPufl6RdeZYmhZqsuZZ40LJaOE VywWCgiLrlvT1pOmb5gXlACSWD9the6n3zuoOKZMXA0EnLkC6ExOOs0UYmspX1VdPMuz o4Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844760; x=1717449560; 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=qrqrwiUB30mLfDa3vSrOyifnLgQm0sJoOyLeI731Ly0=; b=SQ3Cr2+ECzIYLlAvHAHihdEi4b0cLxN9Kn5SpodJsorE4oFAEtIYAnSgIv+JU1Tdfs hlDIjoY8GFlYwgh6aPSkjcl92b84Lj0IsKLvvKSkcQibjqoW9Kk/aNyn66VV7o18SuK3 cdsX4eD2JfCefuBRXj46ITb62fKNGo365Lw3TuHi7WQFDi8PSQIeYofjA9kaMfTF5Ght RBgVa2HU0bIyPoeFzFitgYDGNm821fBoC3ahVojA9TSJ41SaP4QajTspUdtk5uhai7LU fs1XgOeyFeRvCA3u5xSsVDyW0fTczNLCBfs4MQ+nkIVrI0DhHP8LUUHUakZTMv6MFav+ mkcQ== X-Gm-Message-State: AOJu0Yz5JJLDbyUQrvE6DcUmGugUnC+H1wH98gMqTC76fo7YEuCWFNek Y8U3zvvTqXXPAYltOkJi5TRsly2p3PUbs/jsOEK/tnhPi+W/qR/1PPVyOTsnouUvsaKVM+mfJ0h j X-Received: by 2002:a05:6a00:808c:b0:6ea:ca90:3459 with SMTP id d2e1a72fcca58-6f8f43c1d40mr10685175b3a.32.1716844760304; Mon, 27 May 2024 14:19:20 -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.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:19:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn Subject: [PATCH 07/18] tcg/loongarch64: Support LASX in tcg_out_dup_vec Date: Mon, 27 May 2024 14:19:01 -0700 Message-Id: <20240527211912.14060-8-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::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index b1d652355d..cc54bc4a53 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1674,12 +1674,16 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, TCGReg rd, TCGReg rs) { - static const LoongArchInsn repl_insn[4] = { - OPC_VREPLGR2VR_B, OPC_VREPLGR2VR_H, OPC_VREPLGR2VR_W, OPC_VREPLGR2VR_D + static const LoongArchInsn repl_insn[2][4] = { + { OPC_VREPLGR2VR_B, OPC_VREPLGR2VR_H, + OPC_VREPLGR2VR_W, OPC_VREPLGR2VR_D }, + { OPC_XVREPLGR2VR_B, OPC_XVREPLGR2VR_H, + OPC_XVREPLGR2VR_W, OPC_XVREPLGR2VR_D }, }; + bool lasx = type == TCG_TYPE_V256; tcg_debug_assert(vece <= MO_64); - tcg_out32(s, encode_vdj_insn(repl_insn[vece], rd, rs)); + tcg_out32(s, encode_vdj_insn(repl_insn[lasx][vece], rd, rs)); return true; }