From patchwork Mon May 27 21:19:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 799250 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a08:0:b0:354:fb4b:99cd with SMTP id m8csp26138wru; Mon, 27 May 2024 14:21:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWl4oNRzEH9RfheEwW5jjHBqPDEEjoFYIbWHLLRxjBfhUpG546luNjZMcwR1c2R1L9ys7DmT5foq2eUcYzm29TQ X-Google-Smtp-Source: AGHT+IEcVqhQZSyx40dQwpXvtLNw50P117U1R22zqIKqaH8xSNAVaZVoBP7UaFaRND9BMsKuQdRw X-Received: by 2002:a05:6214:d47:b0:6ad:7a5f:81da with SMTP id 6a1803df08f44-6ad7a5f96d8mr86232596d6.26.1716844877338; Mon, 27 May 2024 14:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716844877; cv=none; d=google.com; s=arc-20160816; b=Mwf0fye8jlJedrqo+gtLAHb/yB+mEw8drP9+WEy5Hz2/SUaai/5E+MtH/pv+toNHSW J+lbqQysSEj0Wt8svUB+ktSVQpKAxVvsX11oK/MZyFCpYn/h1ohUdU/juSEUUwD01F1V q9yHxNdxdqC+cGJJP1OT/yQmUArjFB/ZImGaWen8Pg6bFsjoljtJwHAJTLbZnXQEoU8Q VIIu/xxZ0hJguY+SpmuUHgq3bqwkZdkizlwJv07fvSAw0izhel/3fBs2QtYLG5qntUZq hOQLuwwPGvweMQQRp8VhGsCrfFdhhg1hg2/nN29sOEAfvhvYGdcC0UaEVTKMubmY42iU DB3w== 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=s42oGtCBkIpp0pUZgYqorqQOAJjXWlk92oUDYENOXNg=; fh=hzNNYKTacOnX/pFrTgMTyElWGK9kyvH1o007fnxf7fU=; b=d8+OL3mFFREhAJlirdYHfGfkPdwKilWgmtPcw0vfHvxIUoJmvta7KUshJ25stpIqGx JI/o4T8GTuXLEyHd6QQiDi8LYCFWXTmTn8Ojbfve05N3P1gWoOzcrTnvVZ5c/9i9UTRD ntCdqGotg7xJMEw1eSjq5JB5B12rBQRanUlDK2wes1Lt/UpHS1TzNs9HKPA/VbesL7LC qR+IV9oh0wxoBtxJGboC+oS37nRCRMO83mV40/QbW6CNYOawm5epxEHCHiFJh9lvzy6C JdWEUnepVeVAu2d23d+kLz0llDXVxB3cx2dXoTJAp3tCnAje/6M4c/uX79WqUidoN+Bo 0rKQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nM4hAIUT; 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-6ac162cc180si86343166d6.533.2024.05.27.14.21.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 May 2024 14:21:17 -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=nM4hAIUT; 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 1sBhkd-0007Dz-Uq; Mon, 27 May 2024 17:19:27 -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 1sBhkc-0007CU-0o for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:26 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sBhka-0003dq-HJ for qemu-devel@nongnu.org; Mon, 27 May 2024 17:19:25 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6f4603237e0so123953b3a.0 for ; Mon, 27 May 2024 14:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716844763; x=1717449563; 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=s42oGtCBkIpp0pUZgYqorqQOAJjXWlk92oUDYENOXNg=; b=nM4hAIUT+L/bwH9AEzrTk5CWPbMteFZmiowaRpBWxnNJ+voa4eDsH9xwdnDyjsV/Y4 M7jLJpYF1JxLavldlC60dx1/5qKMXSgN5VYiOsxttxcDFnncAxzwHQU302IzyZg3pmhg P2eeD5vjgAcKbL743bai6Y2+GcxvzNMKcE33fSdVj+d+FoYe3Pqh6UIO1m/bC7sojVQH 08rkuqlj9nzIDL6oQGirEIg6/YfkJNv2slHQPowokbfRR0pLRd1Xe/gCYfuDiS9/Z5P+ sjjJLMgVBq710LJxo7xGD6Vmom325kI0+UvZS/B8x761H+Pa1ezJJQw47rsLqMFA9RLm KAUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716844763; x=1717449563; 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=s42oGtCBkIpp0pUZgYqorqQOAJjXWlk92oUDYENOXNg=; b=S+HyGk52DfsnKv9Mr/rGNIV+gJKE+2W6fbjpFTJPo83E9cnTTelsbdcWbxzR/8sHlp mYKjJaZaMm81T4ZhTl76qzwVKv0vHvaDRqDgceBQHYNhI2n8Z7xnqL7Z1X41xCbD1YJL 5Z0VPYcmWkb3Ycgill5jPvGDe/CFYfaZmrU6d1vOGexCH66BK8JPlHhOHVwMyAh2HTSP XiKh0t1yqvEPJKVGWfHDykeoL53taUnQ+EWOpB0h14vmjFlyEK5zBRIvsMQKwDq6u/cg QdECp3qLI6LBBYKLeObxQRQ3T1sXgAx8kwwscpgWA0vOMwNNPWrbvwRttNMXtqDwL7bQ Hluw== X-Gm-Message-State: AOJu0YzItr/zG4BOrYvRfZm+HtWQuHCLCr5ZfnzdC/y9fBN4PMEbPFEm WnSk70HOuxEwVf4ux7ejTtjv8wPtDKtY/yaCTLXTGFvVh59rFFqSwVGF2SM6YiQ2EqDCnpMphpw e X-Received: by 2002:a05:6a00:4007:b0:6f3:8468:8bb with SMTP id d2e1a72fcca58-6f8ea1d0715mr13576491b3a.17.1716844762975; Mon, 27 May 2024 14:19:22 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 14:19:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: git@xen0n.name, gaosong@loongson.cn Subject: [PATCH 10/18] tcg/loongarch64: Support LASX in tcg_out_dupi_vec Date: Mon, 27 May 2024 14:19:04 -0700 Message-Id: <20240527211912.14060-11-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::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 9a8f67cf3e..c7d0c7839b 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1743,7 +1743,12 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, int64_t value = sextract64(v64, 0, 8 << vece); if (-0x200 <= value && value <= 0x1FF) { uint32_t imm = (vece << 10) | ((uint32_t)v64 & 0x3FF); - tcg_out_opc_vldi(s, rd, imm); + + if (type == TCG_TYPE_V256) { + tcg_out_opc_xvldi(s, rd, imm); + } else { + tcg_out_opc_vldi(s, rd, imm); + } return; }