From patchwork Wed Jun 19 20:59:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805639 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14217wrt; Wed, 19 Jun 2024 14:02:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqKtmF/op559sbX5YNSSr1nkoM4BwxD7YEOETvzrQ/XqZM2UtL57m9iqAn4rPNLxSASJWGB6p6cOzQSIhyyLcX X-Google-Smtp-Source: AGHT+IGFrAaEG/CEJ9m0vpminKR215n73pwUPv9kMxDLGQ+dJhWBZMlgNIYGK/lR+gJSURowW2nB X-Received: by 2002:a05:620a:28d4:b0:79a:2874:20ad with SMTP id af79cd13be357-79bb3ecaf52mr434434085a.51.1718830926239; Wed, 19 Jun 2024 14:02:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830926; cv=none; d=google.com; s=arc-20160816; b=VZ7CWcFWEl8csyX/wGayjASV9G4g/9NcJMFepgN8jnX0HqQmuo/oEMc+loqDIFIP4I d59N6elbmwp2TAzxJ7T5jcwhAvdoHseW1Ou1ECRzI6NYDPTqMWkOt5DVQkrrw+NG1knw 0z8LQEM9wDSup4208oCkpjcFEfIMJKb5XxOQu7pK1m6+6Wg7qDvAUO7Qbt0gUmgWt12P 3MVKpc6E7KCzpqebHNocHhwt2PeVJFOzO/hZ96JoiherTpkKQFUe0YBwri5i2gCfMhfb 7tFayMp4l3CQVlbOBtHXM/H7+Mu+FNDFmQ+GUSnbbZBvH7KDqCyWyzlA3idXAtcAxALO rMMg== 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:to:from :dkim-signature; bh=u7l+Et2g86i2TS/ecmwjK12lvtYgbXuxki4mug8kdNU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=p8PaYu2YAZ6D17+CyNDk2vIaca/ZoLniUvPhtVrN/o010qcNChcs+/QO8UaB+m6Q1c BdLgrjbb0CN5jr7K4D8mqobrAJ6brH8B/9n8X1TUtbnFXI1YlkGg7ZgYakSzna6bymxV NPmsuGTY8mXxqTwDnBqgaDhDoVU/3o0JHy/AVs+KXnHOoiQsEnFVMoMruK8zYyigMvts Bks8HPDq4VPvj7PD5lteExxbIbqLQYmKhYjpu/hnCLXcgVhTmzDDtbDVYWDBvXZ6BEIi 6y9c9FeBB9b//C3s+xMCOyrQbdPlcQfzKnZhItDlPHAM9hm06i+MFFThSO9Zns8BBGoG O+aA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="vs2WV/AC"; 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-798abe57c61si1689285685a.570.2024.06.19.14.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:06 -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="vs2WV/AC"; 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 1sK2PX-0002DQ-P1; Wed, 19 Jun 2024 17:00:07 -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 1sK2PU-0002CL-8P for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:05 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PO-0000JZ-NW for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:03 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1f700e4cb92so1729375ad.2 for ; Wed, 19 Jun 2024 13:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830797; x=1719435597; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=u7l+Et2g86i2TS/ecmwjK12lvtYgbXuxki4mug8kdNU=; b=vs2WV/ACgTEsN5Nerne7hBcYRB6zgb0iqlI5EGwn+huQnEBYnXRC0LOBChq7x5rzRO +mesjwhm+4T1XTHIGD5v8fd7AOT+47no/QdpRRu7P32GxCspY81mDkx11Mo+Av1fXjK/ J8bKFA3yyyGj1hL0lSS0ltm0074VotXEg4QPXgORen42yKClvstMEf9vaBDO7gX7U2Qn FUJyWKccidP2+y63F5+V3HodcUN4DyANiYvul96H63ibFMIICYLDJvx2HCKvcqrhzsZe S5tpoTwyVhYdsHccB2jkQYvhrx+x4uhiwTL6lbUoxQUfdR6ztjzN59yhAEbqrnimmj9e ld0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830797; x=1719435597; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u7l+Et2g86i2TS/ecmwjK12lvtYgbXuxki4mug8kdNU=; b=Q9q3VjkP19tLjoLjJ0o8G7vhCEx3QZgT8mBAiFr1HSFrCI0hZqoZseudgVC7mpGkEB BDl4VIx38/kkvy+HXhgZmjdTBljvvWM1ENGlnt5ZV142IMTBFemWf/BF0FpOsubO73W2 5Q6YBOqxZ7Jq6LnehcPjsPNoU/cuUTT7Fk8Di23zvkIaX1/aL1Q/OQ3qvPsXbP0dSp4/ 04rlH3adzeD+vltgbYTb5pVDJYqNyffhsgmkVp9amjK2nKrM33/BnmQdJgNOJVbsQXZC VMnD3yAvNfP8peNzWiWNi9aT0BuQ6Yvs8VJfFepe8ZyYT/nDb6IYG5TJFHfpS373rBmd 8JUQ== X-Gm-Message-State: AOJu0YyLE/cTZd4T1hQQBRVpDlp3hBDTeIF1BLpnxbgDtJcVaw913VVF ffg6ycEvSadu7zOeKcujOe9vpsx6G+tY2yk/SJWgIlBoRkEHbUwrxtFsJ7D6hMHpt/h194MYKAs T X-Received: by 2002:a17:902:f546:b0:1f9:ae6d:5697 with SMTP id d9443c01a7336-1f9ae6d5ac1mr30867165ad.35.1718830794704; Wed, 19 Jun 2024 13:59:54 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 01/24] tcg/loongarch64: Import LASX, FP insns Date: Wed, 19 Jun 2024 13:59:29 -0700 Message-Id: <20240619205952.235946-2-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::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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 --- tcg/loongarch64/tcg-insn-defs.c.inc | 6181 +++++++++------------------ 1 file changed, 2123 insertions(+), 4058 deletions(-) diff --git a/tcg/loongarch64/tcg-insn-defs.c.inc b/tcg/loongarch64/tcg-insn-defs.c.inc index ee3b483b02..6bb8656fd8 100644 --- a/tcg/loongarch64/tcg-insn-defs.c.inc +++ b/tcg/loongarch64/tcg-insn-defs.c.inc @@ -4,11 +4,13 @@ * * This file is auto-generated by genqemutcgdefs from * https://github.com/loongson-community/loongarch-opcodes, - * from commit 8027da9a8157a8b47fc48ff1def292e09c5668bd. + * from commit 7f353fb69bd99ce6edfad7ad63948c4bb526f0bf. * DO NOT EDIT. */ typedef enum { + OPC_MOVGR2SCR = 0x00000800, + OPC_MOVSCR2GR = 0x00000c00, OPC_CLZ_W = 0x00001400, OPC_CTZ_W = 0x00001c00, OPC_CLZ_D = 0x00002400, @@ -38,6 +40,8 @@ typedef enum { OPC_SLL_D = 0x00188000, OPC_SRL_D = 0x00190000, OPC_SRA_D = 0x00198000, + OPC_ROTR_B = 0x001a0000, + OPC_ROTR_H = 0x001a8000, OPC_ROTR_W = 0x001b0000, OPC_ROTR_D = 0x001b8000, OPC_MUL_W = 0x001c0000, @@ -60,12 +64,17 @@ typedef enum { OPC_SRLI_D = 0x00450000, OPC_SRAI_W = 0x00488000, OPC_SRAI_D = 0x00490000, + OPC_ROTRI_B = 0x004c2000, + OPC_ROTRI_H = 0x004c4000, OPC_ROTRI_W = 0x004c8000, OPC_ROTRI_D = 0x004d0000, OPC_BSTRINS_W = 0x00600000, OPC_BSTRPICK_W = 0x00608000, OPC_BSTRINS_D = 0x00800000, OPC_BSTRPICK_D = 0x00c00000, + OPC_FMOV_D = 0x01149800, + OPC_MOVGR2FR_D = 0x0114a800, + OPC_MOVFR2GR_D = 0x0114b800, OPC_SLTI = 0x02000000, OPC_SLTUI = 0x02400000, OPC_ADDI_W = 0x02800000, @@ -74,60 +83,10 @@ typedef enum { OPC_ANDI = 0x03400000, OPC_ORI = 0x03800000, OPC_XORI = 0x03c00000, - OPC_VFMADD_S = 0x09100000, - OPC_VFMADD_D = 0x09200000, - OPC_VFMSUB_S = 0x09500000, - OPC_VFMSUB_D = 0x09600000, - OPC_VFNMADD_S = 0x09900000, - OPC_VFNMADD_D = 0x09a00000, - OPC_VFNMSUB_S = 0x09d00000, - OPC_VFNMSUB_D = 0x09e00000, - OPC_VFCMP_CAF_S = 0x0c500000, - OPC_VFCMP_SAF_S = 0x0c508000, - OPC_VFCMP_CLT_S = 0x0c510000, - OPC_VFCMP_SLT_S = 0x0c518000, - OPC_VFCMP_CEQ_S = 0x0c520000, - OPC_VFCMP_SEQ_S = 0x0c528000, - OPC_VFCMP_CLE_S = 0x0c530000, - OPC_VFCMP_SLE_S = 0x0c538000, - OPC_VFCMP_CUN_S = 0x0c540000, - OPC_VFCMP_SUN_S = 0x0c548000, - OPC_VFCMP_CULT_S = 0x0c550000, - OPC_VFCMP_SULT_S = 0x0c558000, - OPC_VFCMP_CUEQ_S = 0x0c560000, - OPC_VFCMP_SUEQ_S = 0x0c568000, - OPC_VFCMP_CULE_S = 0x0c570000, - OPC_VFCMP_SULE_S = 0x0c578000, - OPC_VFCMP_CNE_S = 0x0c580000, - OPC_VFCMP_SNE_S = 0x0c588000, - OPC_VFCMP_COR_S = 0x0c5a0000, - OPC_VFCMP_SOR_S = 0x0c5a8000, - OPC_VFCMP_CUNE_S = 0x0c5c0000, - OPC_VFCMP_SUNE_S = 0x0c5c8000, - OPC_VFCMP_CAF_D = 0x0c600000, - OPC_VFCMP_SAF_D = 0x0c608000, - OPC_VFCMP_CLT_D = 0x0c610000, - OPC_VFCMP_SLT_D = 0x0c618000, - OPC_VFCMP_CEQ_D = 0x0c620000, - OPC_VFCMP_SEQ_D = 0x0c628000, - OPC_VFCMP_CLE_D = 0x0c630000, - OPC_VFCMP_SLE_D = 0x0c638000, - OPC_VFCMP_CUN_D = 0x0c640000, - OPC_VFCMP_SUN_D = 0x0c648000, - OPC_VFCMP_CULT_D = 0x0c650000, - OPC_VFCMP_SULT_D = 0x0c658000, - OPC_VFCMP_CUEQ_D = 0x0c660000, - OPC_VFCMP_SUEQ_D = 0x0c668000, - OPC_VFCMP_CULE_D = 0x0c670000, - OPC_VFCMP_SULE_D = 0x0c678000, - OPC_VFCMP_CNE_D = 0x0c680000, - OPC_VFCMP_SNE_D = 0x0c688000, - OPC_VFCMP_COR_D = 0x0c6a0000, - OPC_VFCMP_SOR_D = 0x0c6a8000, - OPC_VFCMP_CUNE_D = 0x0c6c0000, - OPC_VFCMP_SUNE_D = 0x0c6c8000, OPC_VBITSEL_V = 0x0d100000, + OPC_XVBITSEL_V = 0x0d200000, OPC_VSHUF_B = 0x0d500000, + OPC_XVSHUF_B = 0x0d600000, OPC_ADDU16I_D = 0x10000000, OPC_LU12I_W = 0x14000000, OPC_CU32I_D = 0x16000000, @@ -146,8 +105,14 @@ typedef enum { OPC_LD_BU = 0x2a000000, OPC_LD_HU = 0x2a400000, OPC_LD_WU = 0x2a800000, + OPC_FLD_S = 0x2b000000, + OPC_FST_S = 0x2b400000, + OPC_FLD_D = 0x2b800000, + OPC_FST_D = 0x2bc00000, OPC_VLD = 0x2c000000, OPC_VST = 0x2c400000, + OPC_XVLD = 0x2c800000, + OPC_XVST = 0x2cc00000, OPC_VLDREPL_D = 0x30100000, OPC_VLDREPL_W = 0x30200000, OPC_VLDREPL_H = 0x30400000, @@ -156,6 +121,14 @@ typedef enum { OPC_VSTELM_W = 0x31200000, OPC_VSTELM_H = 0x31400000, OPC_VSTELM_B = 0x31800000, + OPC_XVLDREPL_D = 0x32100000, + OPC_XVLDREPL_W = 0x32200000, + OPC_XVLDREPL_H = 0x32400000, + OPC_XVLDREPL_B = 0x32800000, + OPC_XVSTELM_D = 0x33100000, + OPC_XVSTELM_W = 0x33200000, + OPC_XVSTELM_H = 0x33400000, + OPC_XVSTELM_B = 0x33800000, OPC_LDX_B = 0x38000000, OPC_LDX_H = 0x38040000, OPC_LDX_W = 0x38080000, @@ -167,9 +140,17 @@ typedef enum { OPC_LDX_BU = 0x38200000, OPC_LDX_HU = 0x38240000, OPC_LDX_WU = 0x38280000, + OPC_FLDX_S = 0x38300000, + OPC_FLDX_D = 0x38340000, + OPC_FSTX_S = 0x38380000, + OPC_FSTX_D = 0x383c0000, OPC_VLDX = 0x38400000, OPC_VSTX = 0x38440000, + OPC_XVLDX = 0x38480000, + OPC_XVSTX = 0x384c0000, OPC_DBAR = 0x38720000, + OPC_JISCR0 = 0x48000200, + OPC_JISCR1 = 0x48000300, OPC_JIRL = 0x4c000000, OPC_B = 0x50000000, OPC_BL = 0x54000000, @@ -207,46 +188,6 @@ typedef enum { OPC_VSUB_H = 0x700c8000, OPC_VSUB_W = 0x700d0000, OPC_VSUB_D = 0x700d8000, - OPC_VADDWEV_H_B = 0x701e0000, - OPC_VADDWEV_W_H = 0x701e8000, - OPC_VADDWEV_D_W = 0x701f0000, - OPC_VADDWEV_Q_D = 0x701f8000, - OPC_VSUBWEV_H_B = 0x70200000, - OPC_VSUBWEV_W_H = 0x70208000, - OPC_VSUBWEV_D_W = 0x70210000, - OPC_VSUBWEV_Q_D = 0x70218000, - OPC_VADDWOD_H_B = 0x70220000, - OPC_VADDWOD_W_H = 0x70228000, - OPC_VADDWOD_D_W = 0x70230000, - OPC_VADDWOD_Q_D = 0x70238000, - OPC_VSUBWOD_H_B = 0x70240000, - OPC_VSUBWOD_W_H = 0x70248000, - OPC_VSUBWOD_D_W = 0x70250000, - OPC_VSUBWOD_Q_D = 0x70258000, - OPC_VADDWEV_H_BU = 0x702e0000, - OPC_VADDWEV_W_HU = 0x702e8000, - OPC_VADDWEV_D_WU = 0x702f0000, - OPC_VADDWEV_Q_DU = 0x702f8000, - OPC_VSUBWEV_H_BU = 0x70300000, - OPC_VSUBWEV_W_HU = 0x70308000, - OPC_VSUBWEV_D_WU = 0x70310000, - OPC_VSUBWEV_Q_DU = 0x70318000, - OPC_VADDWOD_H_BU = 0x70320000, - OPC_VADDWOD_W_HU = 0x70328000, - OPC_VADDWOD_D_WU = 0x70330000, - OPC_VADDWOD_Q_DU = 0x70338000, - OPC_VSUBWOD_H_BU = 0x70340000, - OPC_VSUBWOD_W_HU = 0x70348000, - OPC_VSUBWOD_D_WU = 0x70350000, - OPC_VSUBWOD_Q_DU = 0x70358000, - OPC_VADDWEV_H_BU_B = 0x703e0000, - OPC_VADDWEV_W_HU_H = 0x703e8000, - OPC_VADDWEV_D_WU_W = 0x703f0000, - OPC_VADDWEV_Q_DU_D = 0x703f8000, - OPC_VADDWOD_H_BU_B = 0x70400000, - OPC_VADDWOD_W_HU_H = 0x70408000, - OPC_VADDWOD_D_WU_W = 0x70410000, - OPC_VADDWOD_Q_DU_D = 0x70418000, OPC_VSADD_B = 0x70460000, OPC_VSADD_H = 0x70468000, OPC_VSADD_W = 0x70470000, @@ -263,50 +204,6 @@ typedef enum { OPC_VSSUB_HU = 0x704c8000, OPC_VSSUB_WU = 0x704d0000, OPC_VSSUB_DU = 0x704d8000, - OPC_VHADDW_H_B = 0x70540000, - OPC_VHADDW_W_H = 0x70548000, - OPC_VHADDW_D_W = 0x70550000, - OPC_VHADDW_Q_D = 0x70558000, - OPC_VHSUBW_H_B = 0x70560000, - OPC_VHSUBW_W_H = 0x70568000, - OPC_VHSUBW_D_W = 0x70570000, - OPC_VHSUBW_Q_D = 0x70578000, - OPC_VHADDW_HU_BU = 0x70580000, - OPC_VHADDW_WU_HU = 0x70588000, - OPC_VHADDW_DU_WU = 0x70590000, - OPC_VHADDW_QU_DU = 0x70598000, - OPC_VHSUBW_HU_BU = 0x705a0000, - OPC_VHSUBW_WU_HU = 0x705a8000, - OPC_VHSUBW_DU_WU = 0x705b0000, - OPC_VHSUBW_QU_DU = 0x705b8000, - OPC_VADDA_B = 0x705c0000, - OPC_VADDA_H = 0x705c8000, - OPC_VADDA_W = 0x705d0000, - OPC_VADDA_D = 0x705d8000, - OPC_VABSD_B = 0x70600000, - OPC_VABSD_H = 0x70608000, - OPC_VABSD_W = 0x70610000, - OPC_VABSD_D = 0x70618000, - OPC_VABSD_BU = 0x70620000, - OPC_VABSD_HU = 0x70628000, - OPC_VABSD_WU = 0x70630000, - OPC_VABSD_DU = 0x70638000, - OPC_VAVG_B = 0x70640000, - OPC_VAVG_H = 0x70648000, - OPC_VAVG_W = 0x70650000, - OPC_VAVG_D = 0x70658000, - OPC_VAVG_BU = 0x70660000, - OPC_VAVG_HU = 0x70668000, - OPC_VAVG_WU = 0x70670000, - OPC_VAVG_DU = 0x70678000, - OPC_VAVGR_B = 0x70680000, - OPC_VAVGR_H = 0x70688000, - OPC_VAVGR_W = 0x70690000, - OPC_VAVGR_D = 0x70698000, - OPC_VAVGR_BU = 0x706a0000, - OPC_VAVGR_HU = 0x706a8000, - OPC_VAVGR_WU = 0x706b0000, - OPC_VAVGR_DU = 0x706b8000, OPC_VMAX_B = 0x70700000, OPC_VMAX_H = 0x70708000, OPC_VMAX_W = 0x70710000, @@ -327,86 +224,6 @@ typedef enum { OPC_VMUL_H = 0x70848000, OPC_VMUL_W = 0x70850000, OPC_VMUL_D = 0x70858000, - OPC_VMUH_B = 0x70860000, - OPC_VMUH_H = 0x70868000, - OPC_VMUH_W = 0x70870000, - OPC_VMUH_D = 0x70878000, - OPC_VMUH_BU = 0x70880000, - OPC_VMUH_HU = 0x70888000, - OPC_VMUH_WU = 0x70890000, - OPC_VMUH_DU = 0x70898000, - OPC_VMULWEV_H_B = 0x70900000, - OPC_VMULWEV_W_H = 0x70908000, - OPC_VMULWEV_D_W = 0x70910000, - OPC_VMULWEV_Q_D = 0x70918000, - OPC_VMULWOD_H_B = 0x70920000, - OPC_VMULWOD_W_H = 0x70928000, - OPC_VMULWOD_D_W = 0x70930000, - OPC_VMULWOD_Q_D = 0x70938000, - OPC_VMULWEV_H_BU = 0x70980000, - OPC_VMULWEV_W_HU = 0x70988000, - OPC_VMULWEV_D_WU = 0x70990000, - OPC_VMULWEV_Q_DU = 0x70998000, - OPC_VMULWOD_H_BU = 0x709a0000, - OPC_VMULWOD_W_HU = 0x709a8000, - OPC_VMULWOD_D_WU = 0x709b0000, - OPC_VMULWOD_Q_DU = 0x709b8000, - OPC_VMULWEV_H_BU_B = 0x70a00000, - OPC_VMULWEV_W_HU_H = 0x70a08000, - OPC_VMULWEV_D_WU_W = 0x70a10000, - OPC_VMULWEV_Q_DU_D = 0x70a18000, - OPC_VMULWOD_H_BU_B = 0x70a20000, - OPC_VMULWOD_W_HU_H = 0x70a28000, - OPC_VMULWOD_D_WU_W = 0x70a30000, - OPC_VMULWOD_Q_DU_D = 0x70a38000, - OPC_VMADD_B = 0x70a80000, - OPC_VMADD_H = 0x70a88000, - OPC_VMADD_W = 0x70a90000, - OPC_VMADD_D = 0x70a98000, - OPC_VMSUB_B = 0x70aa0000, - OPC_VMSUB_H = 0x70aa8000, - OPC_VMSUB_W = 0x70ab0000, - OPC_VMSUB_D = 0x70ab8000, - OPC_VMADDWEV_H_B = 0x70ac0000, - OPC_VMADDWEV_W_H = 0x70ac8000, - OPC_VMADDWEV_D_W = 0x70ad0000, - OPC_VMADDWEV_Q_D = 0x70ad8000, - OPC_VMADDWOD_H_B = 0x70ae0000, - OPC_VMADDWOD_W_H = 0x70ae8000, - OPC_VMADDWOD_D_W = 0x70af0000, - OPC_VMADDWOD_Q_D = 0x70af8000, - OPC_VMADDWEV_H_BU = 0x70b40000, - OPC_VMADDWEV_W_HU = 0x70b48000, - OPC_VMADDWEV_D_WU = 0x70b50000, - OPC_VMADDWEV_Q_DU = 0x70b58000, - OPC_VMADDWOD_H_BU = 0x70b60000, - OPC_VMADDWOD_W_HU = 0x70b68000, - OPC_VMADDWOD_D_WU = 0x70b70000, - OPC_VMADDWOD_Q_DU = 0x70b78000, - OPC_VMADDWEV_H_BU_B = 0x70bc0000, - OPC_VMADDWEV_W_HU_H = 0x70bc8000, - OPC_VMADDWEV_D_WU_W = 0x70bd0000, - OPC_VMADDWEV_Q_DU_D = 0x70bd8000, - OPC_VMADDWOD_H_BU_B = 0x70be0000, - OPC_VMADDWOD_W_HU_H = 0x70be8000, - OPC_VMADDWOD_D_WU_W = 0x70bf0000, - OPC_VMADDWOD_Q_DU_D = 0x70bf8000, - OPC_VDIV_B = 0x70e00000, - OPC_VDIV_H = 0x70e08000, - OPC_VDIV_W = 0x70e10000, - OPC_VDIV_D = 0x70e18000, - OPC_VMOD_B = 0x70e20000, - OPC_VMOD_H = 0x70e28000, - OPC_VMOD_W = 0x70e30000, - OPC_VMOD_D = 0x70e38000, - OPC_VDIV_BU = 0x70e40000, - OPC_VDIV_HU = 0x70e48000, - OPC_VDIV_WU = 0x70e50000, - OPC_VDIV_DU = 0x70e58000, - OPC_VMOD_BU = 0x70e60000, - OPC_VMOD_HU = 0x70e68000, - OPC_VMOD_WU = 0x70e70000, - OPC_VMOD_DU = 0x70e78000, OPC_VSLL_B = 0x70e80000, OPC_VSLL_H = 0x70e88000, OPC_VSLL_W = 0x70e90000, @@ -423,86 +240,6 @@ typedef enum { OPC_VROTR_H = 0x70ee8000, OPC_VROTR_W = 0x70ef0000, OPC_VROTR_D = 0x70ef8000, - OPC_VSRLR_B = 0x70f00000, - OPC_VSRLR_H = 0x70f08000, - OPC_VSRLR_W = 0x70f10000, - OPC_VSRLR_D = 0x70f18000, - OPC_VSRAR_B = 0x70f20000, - OPC_VSRAR_H = 0x70f28000, - OPC_VSRAR_W = 0x70f30000, - OPC_VSRAR_D = 0x70f38000, - OPC_VSRLN_B_H = 0x70f48000, - OPC_VSRLN_H_W = 0x70f50000, - OPC_VSRLN_W_D = 0x70f58000, - OPC_VSRAN_B_H = 0x70f68000, - OPC_VSRAN_H_W = 0x70f70000, - OPC_VSRAN_W_D = 0x70f78000, - OPC_VSRLRN_B_H = 0x70f88000, - OPC_VSRLRN_H_W = 0x70f90000, - OPC_VSRLRN_W_D = 0x70f98000, - OPC_VSRARN_B_H = 0x70fa8000, - OPC_VSRARN_H_W = 0x70fb0000, - OPC_VSRARN_W_D = 0x70fb8000, - OPC_VSSRLN_B_H = 0x70fc8000, - OPC_VSSRLN_H_W = 0x70fd0000, - OPC_VSSRLN_W_D = 0x70fd8000, - OPC_VSSRAN_B_H = 0x70fe8000, - OPC_VSSRAN_H_W = 0x70ff0000, - OPC_VSSRAN_W_D = 0x70ff8000, - OPC_VSSRLRN_B_H = 0x71008000, - OPC_VSSRLRN_H_W = 0x71010000, - OPC_VSSRLRN_W_D = 0x71018000, - OPC_VSSRARN_B_H = 0x71028000, - OPC_VSSRARN_H_W = 0x71030000, - OPC_VSSRARN_W_D = 0x71038000, - OPC_VSSRLN_BU_H = 0x71048000, - OPC_VSSRLN_HU_W = 0x71050000, - OPC_VSSRLN_WU_D = 0x71058000, - OPC_VSSRAN_BU_H = 0x71068000, - OPC_VSSRAN_HU_W = 0x71070000, - OPC_VSSRAN_WU_D = 0x71078000, - OPC_VSSRLRN_BU_H = 0x71088000, - OPC_VSSRLRN_HU_W = 0x71090000, - OPC_VSSRLRN_WU_D = 0x71098000, - OPC_VSSRARN_BU_H = 0x710a8000, - OPC_VSSRARN_HU_W = 0x710b0000, - OPC_VSSRARN_WU_D = 0x710b8000, - OPC_VBITCLR_B = 0x710c0000, - OPC_VBITCLR_H = 0x710c8000, - OPC_VBITCLR_W = 0x710d0000, - OPC_VBITCLR_D = 0x710d8000, - OPC_VBITSET_B = 0x710e0000, - OPC_VBITSET_H = 0x710e8000, - OPC_VBITSET_W = 0x710f0000, - OPC_VBITSET_D = 0x710f8000, - OPC_VBITREV_B = 0x71100000, - OPC_VBITREV_H = 0x71108000, - OPC_VBITREV_W = 0x71110000, - OPC_VBITREV_D = 0x71118000, - OPC_VPACKEV_B = 0x71160000, - OPC_VPACKEV_H = 0x71168000, - OPC_VPACKEV_W = 0x71170000, - OPC_VPACKEV_D = 0x71178000, - OPC_VPACKOD_B = 0x71180000, - OPC_VPACKOD_H = 0x71188000, - OPC_VPACKOD_W = 0x71190000, - OPC_VPACKOD_D = 0x71198000, - OPC_VILVL_B = 0x711a0000, - OPC_VILVL_H = 0x711a8000, - OPC_VILVL_W = 0x711b0000, - OPC_VILVL_D = 0x711b8000, - OPC_VILVH_B = 0x711c0000, - OPC_VILVH_H = 0x711c8000, - OPC_VILVH_W = 0x711d0000, - OPC_VILVH_D = 0x711d8000, - OPC_VPICKEV_B = 0x711e0000, - OPC_VPICKEV_H = 0x711e8000, - OPC_VPICKEV_W = 0x711f0000, - OPC_VPICKEV_D = 0x711f8000, - OPC_VPICKOD_B = 0x71200000, - OPC_VPICKOD_H = 0x71208000, - OPC_VPICKOD_W = 0x71210000, - OPC_VPICKOD_D = 0x71218000, OPC_VREPLVE_B = 0x71220000, OPC_VREPLVE_H = 0x71228000, OPC_VREPLVE_W = 0x71230000, @@ -513,41 +250,6 @@ typedef enum { OPC_VNOR_V = 0x71278000, OPC_VANDN_V = 0x71280000, OPC_VORN_V = 0x71288000, - OPC_VFRSTP_B = 0x712b0000, - OPC_VFRSTP_H = 0x712b8000, - OPC_VADD_Q = 0x712d0000, - OPC_VSUB_Q = 0x712d8000, - OPC_VSIGNCOV_B = 0x712e0000, - OPC_VSIGNCOV_H = 0x712e8000, - OPC_VSIGNCOV_W = 0x712f0000, - OPC_VSIGNCOV_D = 0x712f8000, - OPC_VFADD_S = 0x71308000, - OPC_VFADD_D = 0x71310000, - OPC_VFSUB_S = 0x71328000, - OPC_VFSUB_D = 0x71330000, - OPC_VFMUL_S = 0x71388000, - OPC_VFMUL_D = 0x71390000, - OPC_VFDIV_S = 0x713a8000, - OPC_VFDIV_D = 0x713b0000, - OPC_VFMAX_S = 0x713c8000, - OPC_VFMAX_D = 0x713d0000, - OPC_VFMIN_S = 0x713e8000, - OPC_VFMIN_D = 0x713f0000, - OPC_VFMAXA_S = 0x71408000, - OPC_VFMAXA_D = 0x71410000, - OPC_VFMINA_S = 0x71428000, - OPC_VFMINA_D = 0x71430000, - OPC_VFCVT_H_S = 0x71460000, - OPC_VFCVT_S_D = 0x71468000, - OPC_VFFINT_S_L = 0x71480000, - OPC_VFTINT_W_D = 0x71498000, - OPC_VFTINTRM_W_D = 0x714a0000, - OPC_VFTINTRP_W_D = 0x714a8000, - OPC_VFTINTRZ_W_D = 0x714b0000, - OPC_VFTINTRNE_W_D = 0x714b8000, - OPC_VSHUF_H = 0x717a8000, - OPC_VSHUF_W = 0x717b0000, - OPC_VSHUF_D = 0x717b8000, OPC_VSEQI_B = 0x72800000, OPC_VSEQI_H = 0x72808000, OPC_VSEQI_W = 0x72810000, @@ -576,8 +278,6 @@ typedef enum { OPC_VSUBI_HU = 0x728c8000, OPC_VSUBI_WU = 0x728d0000, OPC_VSUBI_DU = 0x728d8000, - OPC_VBSLL_V = 0x728e0000, - OPC_VBSRL_V = 0x728e8000, OPC_VMAXI_B = 0x72900000, OPC_VMAXI_H = 0x72908000, OPC_VMAXI_W = 0x72910000, @@ -594,102 +294,10 @@ typedef enum { OPC_VMINI_HU = 0x72968000, OPC_VMINI_WU = 0x72970000, OPC_VMINI_DU = 0x72978000, - OPC_VFRSTPI_B = 0x729a0000, - OPC_VFRSTPI_H = 0x729a8000, - OPC_VCLO_B = 0x729c0000, - OPC_VCLO_H = 0x729c0400, - OPC_VCLO_W = 0x729c0800, - OPC_VCLO_D = 0x729c0c00, - OPC_VCLZ_B = 0x729c1000, - OPC_VCLZ_H = 0x729c1400, - OPC_VCLZ_W = 0x729c1800, - OPC_VCLZ_D = 0x729c1c00, - OPC_VPCNT_B = 0x729c2000, - OPC_VPCNT_H = 0x729c2400, - OPC_VPCNT_W = 0x729c2800, - OPC_VPCNT_D = 0x729c2c00, OPC_VNEG_B = 0x729c3000, OPC_VNEG_H = 0x729c3400, OPC_VNEG_W = 0x729c3800, OPC_VNEG_D = 0x729c3c00, - OPC_VMSKLTZ_B = 0x729c4000, - OPC_VMSKLTZ_H = 0x729c4400, - OPC_VMSKLTZ_W = 0x729c4800, - OPC_VMSKLTZ_D = 0x729c4c00, - OPC_VMSKGEZ_B = 0x729c5000, - OPC_VMSKNZ_B = 0x729c6000, - OPC_VSETEQZ_V = 0x729c9800, - OPC_VSETNEZ_V = 0x729c9c00, - OPC_VSETANYEQZ_B = 0x729ca000, - OPC_VSETANYEQZ_H = 0x729ca400, - OPC_VSETANYEQZ_W = 0x729ca800, - OPC_VSETANYEQZ_D = 0x729cac00, - OPC_VSETALLNEZ_B = 0x729cb000, - OPC_VSETALLNEZ_H = 0x729cb400, - OPC_VSETALLNEZ_W = 0x729cb800, - OPC_VSETALLNEZ_D = 0x729cbc00, - OPC_VFLOGB_S = 0x729cc400, - OPC_VFLOGB_D = 0x729cc800, - OPC_VFCLASS_S = 0x729cd400, - OPC_VFCLASS_D = 0x729cd800, - OPC_VFSQRT_S = 0x729ce400, - OPC_VFSQRT_D = 0x729ce800, - OPC_VFRECIP_S = 0x729cf400, - OPC_VFRECIP_D = 0x729cf800, - OPC_VFRSQRT_S = 0x729d0400, - OPC_VFRSQRT_D = 0x729d0800, - OPC_VFRINT_S = 0x729d3400, - OPC_VFRINT_D = 0x729d3800, - OPC_VFRINTRM_S = 0x729d4400, - OPC_VFRINTRM_D = 0x729d4800, - OPC_VFRINTRP_S = 0x729d5400, - OPC_VFRINTRP_D = 0x729d5800, - OPC_VFRINTRZ_S = 0x729d6400, - OPC_VFRINTRZ_D = 0x729d6800, - OPC_VFRINTRNE_S = 0x729d7400, - OPC_VFRINTRNE_D = 0x729d7800, - OPC_VFCVTL_S_H = 0x729de800, - OPC_VFCVTH_S_H = 0x729dec00, - OPC_VFCVTL_D_S = 0x729df000, - OPC_VFCVTH_D_S = 0x729df400, - OPC_VFFINT_S_W = 0x729e0000, - OPC_VFFINT_S_WU = 0x729e0400, - OPC_VFFINT_D_L = 0x729e0800, - OPC_VFFINT_D_LU = 0x729e0c00, - OPC_VFFINTL_D_W = 0x729e1000, - OPC_VFFINTH_D_W = 0x729e1400, - OPC_VFTINT_W_S = 0x729e3000, - OPC_VFTINT_L_D = 0x729e3400, - OPC_VFTINTRM_W_S = 0x729e3800, - OPC_VFTINTRM_L_D = 0x729e3c00, - OPC_VFTINTRP_W_S = 0x729e4000, - OPC_VFTINTRP_L_D = 0x729e4400, - OPC_VFTINTRZ_W_S = 0x729e4800, - OPC_VFTINTRZ_L_D = 0x729e4c00, - OPC_VFTINTRNE_W_S = 0x729e5000, - OPC_VFTINTRNE_L_D = 0x729e5400, - OPC_VFTINT_WU_S = 0x729e5800, - OPC_VFTINT_LU_D = 0x729e5c00, - OPC_VFTINTRZ_WU_S = 0x729e7000, - OPC_VFTINTRZ_LU_D = 0x729e7400, - OPC_VFTINTL_L_S = 0x729e8000, - OPC_VFTINTH_L_S = 0x729e8400, - OPC_VFTINTRML_L_S = 0x729e8800, - OPC_VFTINTRMH_L_S = 0x729e8c00, - OPC_VFTINTRPL_L_S = 0x729e9000, - OPC_VFTINTRPH_L_S = 0x729e9400, - OPC_VFTINTRZL_L_S = 0x729e9800, - OPC_VFTINTRZH_L_S = 0x729e9c00, - OPC_VFTINTRNEL_L_S = 0x729ea000, - OPC_VFTINTRNEH_L_S = 0x729ea400, - OPC_VEXTH_H_B = 0x729ee000, - OPC_VEXTH_W_H = 0x729ee400, - OPC_VEXTH_D_W = 0x729ee800, - OPC_VEXTH_Q_D = 0x729eec00, - OPC_VEXTH_HU_BU = 0x729ef000, - OPC_VEXTH_WU_HU = 0x729ef400, - OPC_VEXTH_DU_WU = 0x729ef800, - OPC_VEXTH_QU_DU = 0x729efc00, OPC_VREPLGR2VR_B = 0x729f0000, OPC_VREPLGR2VR_H = 0x729f0400, OPC_VREPLGR2VR_W = 0x729f0800, @@ -698,14 +306,6 @@ typedef enum { OPC_VROTRI_H = 0x72a04000, OPC_VROTRI_W = 0x72a08000, OPC_VROTRI_D = 0x72a10000, - OPC_VSRLRI_B = 0x72a42000, - OPC_VSRLRI_H = 0x72a44000, - OPC_VSRLRI_W = 0x72a48000, - OPC_VSRLRI_D = 0x72a50000, - OPC_VSRARI_B = 0x72a82000, - OPC_VSRARI_H = 0x72a84000, - OPC_VSRARI_W = 0x72a88000, - OPC_VSRARI_D = 0x72a90000, OPC_VINSGR2VR_B = 0x72eb8000, OPC_VINSGR2VR_H = 0x72ebc000, OPC_VINSGR2VR_W = 0x72ebe000, @@ -722,14 +322,6 @@ typedef enum { OPC_VREPLVEI_H = 0x72f7c000, OPC_VREPLVEI_W = 0x72f7e000, OPC_VREPLVEI_D = 0x72f7f000, - OPC_VSLLWIL_H_B = 0x73082000, - OPC_VSLLWIL_W_H = 0x73084000, - OPC_VSLLWIL_D_W = 0x73088000, - OPC_VEXTL_Q_D = 0x73090000, - OPC_VSLLWIL_HU_BU = 0x730c2000, - OPC_VSLLWIL_WU_HU = 0x730c4000, - OPC_VSLLWIL_DU_WU = 0x730c8000, - OPC_VEXTL_QU_DU = 0x730d0000, OPC_VBITCLRI_B = 0x73102000, OPC_VBITCLRI_H = 0x73104000, OPC_VBITCLRI_W = 0x73108000, @@ -742,14 +334,6 @@ typedef enum { OPC_VBITREVI_H = 0x73184000, OPC_VBITREVI_W = 0x73188000, OPC_VBITREVI_D = 0x73190000, - OPC_VSAT_B = 0x73242000, - OPC_VSAT_H = 0x73244000, - OPC_VSAT_W = 0x73248000, - OPC_VSAT_D = 0x73250000, - OPC_VSAT_BU = 0x73282000, - OPC_VSAT_HU = 0x73284000, - OPC_VSAT_WU = 0x73288000, - OPC_VSAT_DU = 0x73290000, OPC_VSLLI_B = 0x732c2000, OPC_VSLLI_H = 0x732c4000, OPC_VSLLI_W = 0x732c8000, @@ -762,69 +346,203 @@ typedef enum { OPC_VSRAI_H = 0x73344000, OPC_VSRAI_W = 0x73348000, OPC_VSRAI_D = 0x73350000, - OPC_VSRLNI_B_H = 0x73404000, - OPC_VSRLNI_H_W = 0x73408000, - OPC_VSRLNI_W_D = 0x73410000, - OPC_VSRLNI_D_Q = 0x73420000, - OPC_VSRLRNI_B_H = 0x73444000, - OPC_VSRLRNI_H_W = 0x73448000, - OPC_VSRLRNI_W_D = 0x73450000, - OPC_VSRLRNI_D_Q = 0x73460000, - OPC_VSSRLNI_B_H = 0x73484000, - OPC_VSSRLNI_H_W = 0x73488000, - OPC_VSSRLNI_W_D = 0x73490000, - OPC_VSSRLNI_D_Q = 0x734a0000, - OPC_VSSRLNI_BU_H = 0x734c4000, - OPC_VSSRLNI_HU_W = 0x734c8000, - OPC_VSSRLNI_WU_D = 0x734d0000, - OPC_VSSRLNI_DU_Q = 0x734e0000, - OPC_VSSRLRNI_B_H = 0x73504000, - OPC_VSSRLRNI_H_W = 0x73508000, - OPC_VSSRLRNI_W_D = 0x73510000, - OPC_VSSRLRNI_D_Q = 0x73520000, - OPC_VSSRLRNI_BU_H = 0x73544000, - OPC_VSSRLRNI_HU_W = 0x73548000, - OPC_VSSRLRNI_WU_D = 0x73550000, - OPC_VSSRLRNI_DU_Q = 0x73560000, - OPC_VSRANI_B_H = 0x73584000, - OPC_VSRANI_H_W = 0x73588000, - OPC_VSRANI_W_D = 0x73590000, - OPC_VSRANI_D_Q = 0x735a0000, - OPC_VSRARNI_B_H = 0x735c4000, - OPC_VSRARNI_H_W = 0x735c8000, - OPC_VSRARNI_W_D = 0x735d0000, - OPC_VSRARNI_D_Q = 0x735e0000, - OPC_VSSRANI_B_H = 0x73604000, - OPC_VSSRANI_H_W = 0x73608000, - OPC_VSSRANI_W_D = 0x73610000, - OPC_VSSRANI_D_Q = 0x73620000, - OPC_VSSRANI_BU_H = 0x73644000, - OPC_VSSRANI_HU_W = 0x73648000, - OPC_VSSRANI_WU_D = 0x73650000, - OPC_VSSRANI_DU_Q = 0x73660000, - OPC_VSSRARNI_B_H = 0x73684000, - OPC_VSSRARNI_H_W = 0x73688000, - OPC_VSSRARNI_W_D = 0x73690000, - OPC_VSSRARNI_D_Q = 0x736a0000, - OPC_VSSRARNI_BU_H = 0x736c4000, - OPC_VSSRARNI_HU_W = 0x736c8000, - OPC_VSSRARNI_WU_D = 0x736d0000, - OPC_VSSRARNI_DU_Q = 0x736e0000, - OPC_VEXTRINS_D = 0x73800000, - OPC_VEXTRINS_W = 0x73840000, - OPC_VEXTRINS_H = 0x73880000, - OPC_VEXTRINS_B = 0x738c0000, - OPC_VSHUF4I_B = 0x73900000, - OPC_VSHUF4I_H = 0x73940000, - OPC_VSHUF4I_W = 0x73980000, - OPC_VSHUF4I_D = 0x739c0000, OPC_VBITSELI_B = 0x73c40000, OPC_VANDI_B = 0x73d00000, OPC_VORI_B = 0x73d40000, OPC_VXORI_B = 0x73d80000, OPC_VNORI_B = 0x73dc0000, OPC_VLDI = 0x73e00000, - OPC_VPERMI_W = 0x73e40000, + OPC_XVSEQ_B = 0x74000000, + OPC_XVSEQ_H = 0x74008000, + OPC_XVSEQ_W = 0x74010000, + OPC_XVSEQ_D = 0x74018000, + OPC_XVSLE_B = 0x74020000, + OPC_XVSLE_H = 0x74028000, + OPC_XVSLE_W = 0x74030000, + OPC_XVSLE_D = 0x74038000, + OPC_XVSLE_BU = 0x74040000, + OPC_XVSLE_HU = 0x74048000, + OPC_XVSLE_WU = 0x74050000, + OPC_XVSLE_DU = 0x74058000, + OPC_XVSLT_B = 0x74060000, + OPC_XVSLT_H = 0x74068000, + OPC_XVSLT_W = 0x74070000, + OPC_XVSLT_D = 0x74078000, + OPC_XVSLT_BU = 0x74080000, + OPC_XVSLT_HU = 0x74088000, + OPC_XVSLT_WU = 0x74090000, + OPC_XVSLT_DU = 0x74098000, + OPC_XVADD_B = 0x740a0000, + OPC_XVADD_H = 0x740a8000, + OPC_XVADD_W = 0x740b0000, + OPC_XVADD_D = 0x740b8000, + OPC_XVSUB_B = 0x740c0000, + OPC_XVSUB_H = 0x740c8000, + OPC_XVSUB_W = 0x740d0000, + OPC_XVSUB_D = 0x740d8000, + OPC_XVSADD_B = 0x74460000, + OPC_XVSADD_H = 0x74468000, + OPC_XVSADD_W = 0x74470000, + OPC_XVSADD_D = 0x74478000, + OPC_XVSSUB_B = 0x74480000, + OPC_XVSSUB_H = 0x74488000, + OPC_XVSSUB_W = 0x74490000, + OPC_XVSSUB_D = 0x74498000, + OPC_XVSADD_BU = 0x744a0000, + OPC_XVSADD_HU = 0x744a8000, + OPC_XVSADD_WU = 0x744b0000, + OPC_XVSADD_DU = 0x744b8000, + OPC_XVSSUB_BU = 0x744c0000, + OPC_XVSSUB_HU = 0x744c8000, + OPC_XVSSUB_WU = 0x744d0000, + OPC_XVSSUB_DU = 0x744d8000, + OPC_XVMAX_B = 0x74700000, + OPC_XVMAX_H = 0x74708000, + OPC_XVMAX_W = 0x74710000, + OPC_XVMAX_D = 0x74718000, + OPC_XVMIN_B = 0x74720000, + OPC_XVMIN_H = 0x74728000, + OPC_XVMIN_W = 0x74730000, + OPC_XVMIN_D = 0x74738000, + OPC_XVMAX_BU = 0x74740000, + OPC_XVMAX_HU = 0x74748000, + OPC_XVMAX_WU = 0x74750000, + OPC_XVMAX_DU = 0x74758000, + OPC_XVMIN_BU = 0x74760000, + OPC_XVMIN_HU = 0x74768000, + OPC_XVMIN_WU = 0x74770000, + OPC_XVMIN_DU = 0x74778000, + OPC_XVMUL_B = 0x74840000, + OPC_XVMUL_H = 0x74848000, + OPC_XVMUL_W = 0x74850000, + OPC_XVMUL_D = 0x74858000, + OPC_XVSLL_B = 0x74e80000, + OPC_XVSLL_H = 0x74e88000, + OPC_XVSLL_W = 0x74e90000, + OPC_XVSLL_D = 0x74e98000, + OPC_XVSRL_B = 0x74ea0000, + OPC_XVSRL_H = 0x74ea8000, + OPC_XVSRL_W = 0x74eb0000, + OPC_XVSRL_D = 0x74eb8000, + OPC_XVSRA_B = 0x74ec0000, + OPC_XVSRA_H = 0x74ec8000, + OPC_XVSRA_W = 0x74ed0000, + OPC_XVSRA_D = 0x74ed8000, + OPC_XVROTR_B = 0x74ee0000, + OPC_XVROTR_H = 0x74ee8000, + OPC_XVROTR_W = 0x74ef0000, + OPC_XVROTR_D = 0x74ef8000, + OPC_XVREPLVE_B = 0x75220000, + OPC_XVREPLVE_H = 0x75228000, + OPC_XVREPLVE_W = 0x75230000, + OPC_XVREPLVE_D = 0x75238000, + OPC_XVAND_V = 0x75260000, + OPC_XVOR_V = 0x75268000, + OPC_XVXOR_V = 0x75270000, + OPC_XVNOR_V = 0x75278000, + OPC_XVANDN_V = 0x75280000, + OPC_XVORN_V = 0x75288000, + OPC_XVSEQI_B = 0x76800000, + OPC_XVSEQI_H = 0x76808000, + OPC_XVSEQI_W = 0x76810000, + OPC_XVSEQI_D = 0x76818000, + OPC_XVSLEI_B = 0x76820000, + OPC_XVSLEI_H = 0x76828000, + OPC_XVSLEI_W = 0x76830000, + OPC_XVSLEI_D = 0x76838000, + OPC_XVSLEI_BU = 0x76840000, + OPC_XVSLEI_HU = 0x76848000, + OPC_XVSLEI_WU = 0x76850000, + OPC_XVSLEI_DU = 0x76858000, + OPC_XVSLTI_B = 0x76860000, + OPC_XVSLTI_H = 0x76868000, + OPC_XVSLTI_W = 0x76870000, + OPC_XVSLTI_D = 0x76878000, + OPC_XVSLTI_BU = 0x76880000, + OPC_XVSLTI_HU = 0x76888000, + OPC_XVSLTI_WU = 0x76890000, + OPC_XVSLTI_DU = 0x76898000, + OPC_XVADDI_BU = 0x768a0000, + OPC_XVADDI_HU = 0x768a8000, + OPC_XVADDI_WU = 0x768b0000, + OPC_XVADDI_DU = 0x768b8000, + OPC_XVSUBI_BU = 0x768c0000, + OPC_XVSUBI_HU = 0x768c8000, + OPC_XVSUBI_WU = 0x768d0000, + OPC_XVSUBI_DU = 0x768d8000, + OPC_XVMAXI_B = 0x76900000, + OPC_XVMAXI_H = 0x76908000, + OPC_XVMAXI_W = 0x76910000, + OPC_XVMAXI_D = 0x76918000, + OPC_XVMINI_B = 0x76920000, + OPC_XVMINI_H = 0x76928000, + OPC_XVMINI_W = 0x76930000, + OPC_XVMINI_D = 0x76938000, + OPC_XVMAXI_BU = 0x76940000, + OPC_XVMAXI_HU = 0x76948000, + OPC_XVMAXI_WU = 0x76950000, + OPC_XVMAXI_DU = 0x76958000, + OPC_XVMINI_BU = 0x76960000, + OPC_XVMINI_HU = 0x76968000, + OPC_XVMINI_WU = 0x76970000, + OPC_XVMINI_DU = 0x76978000, + OPC_XVNEG_B = 0x769c3000, + OPC_XVNEG_H = 0x769c3400, + OPC_XVNEG_W = 0x769c3800, + OPC_XVNEG_D = 0x769c3c00, + OPC_XVREPLGR2VR_B = 0x769f0000, + OPC_XVREPLGR2VR_H = 0x769f0400, + OPC_XVREPLGR2VR_W = 0x769f0800, + OPC_XVREPLGR2VR_D = 0x769f0c00, + OPC_XVROTRI_B = 0x76a02000, + OPC_XVROTRI_H = 0x76a04000, + OPC_XVROTRI_W = 0x76a08000, + OPC_XVROTRI_D = 0x76a10000, + OPC_XVINSGR2VR_W = 0x76ebc000, + OPC_XVINSGR2VR_D = 0x76ebe000, + OPC_XVPICKVE2GR_W = 0x76efc000, + OPC_XVPICKVE2GR_D = 0x76efe000, + OPC_XVPICKVE2GR_WU = 0x76f3c000, + OPC_XVPICKVE2GR_DU = 0x76f3e000, + OPC_XVREPL128VEI_B = 0x76f78000, + OPC_XVREPL128VEI_H = 0x76f7c000, + OPC_XVREPL128VEI_W = 0x76f7e000, + OPC_XVREPL128VEI_D = 0x76f7f000, + OPC_XVREPLVE0_B = 0x77070000, + OPC_XVREPLVE0_H = 0x77078000, + OPC_XVREPLVE0_W = 0x7707c000, + OPC_XVREPLVE0_D = 0x7707e000, + OPC_XVREPLVE0_Q = 0x7707f000, + OPC_XVBITCLRI_B = 0x77102000, + OPC_XVBITCLRI_H = 0x77104000, + OPC_XVBITCLRI_W = 0x77108000, + OPC_XVBITCLRI_D = 0x77110000, + OPC_XVBITSETI_B = 0x77142000, + OPC_XVBITSETI_H = 0x77144000, + OPC_XVBITSETI_W = 0x77148000, + OPC_XVBITSETI_D = 0x77150000, + OPC_XVBITREVI_B = 0x77182000, + OPC_XVBITREVI_H = 0x77184000, + OPC_XVBITREVI_W = 0x77188000, + OPC_XVBITREVI_D = 0x77190000, + OPC_XVSLLI_B = 0x772c2000, + OPC_XVSLLI_H = 0x772c4000, + OPC_XVSLLI_W = 0x772c8000, + OPC_XVSLLI_D = 0x772d0000, + OPC_XVSRLI_B = 0x77302000, + OPC_XVSRLI_H = 0x77304000, + OPC_XVSRLI_W = 0x77308000, + OPC_XVSRLI_D = 0x77310000, + OPC_XVSRAI_B = 0x77342000, + OPC_XVSRAI_H = 0x77344000, + OPC_XVSRAI_W = 0x77348000, + OPC_XVSRAI_D = 0x77350000, + OPC_XVBITSELI_B = 0x77c40000, + OPC_XVANDI_B = 0x77d00000, + OPC_XVORI_B = 0x77d40000, + OPC_XVXORI_B = 0x77d80000, + OPC_XVNORI_B = 0x77dc0000, + OPC_XVLDI = 0x77e00000, } LoongArchInsn; static int32_t __attribute__((unused)) @@ -873,11 +591,11 @@ encode_dk_slots(LoongArchInsn opc, uint32_t d, uint32_t k) } static int32_t __attribute__((unused)) -encode_cdvj_insn(LoongArchInsn opc, TCGReg cd, TCGReg vj) +encode_dfj_insn(LoongArchInsn opc, TCGReg d, TCGReg fj) { - tcg_debug_assert(cd >= 0 && cd <= 0x7); - tcg_debug_assert(vj >= 0x20 && vj <= 0x3f); - return encode_dj_slots(opc, cd, vj & 0x1f); + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(fj >= 0x20 && fj <= 0x3f); + return encode_dj_slots(opc, d, fj & 0x1f); } static int32_t __attribute__((unused)) @@ -924,6 +642,24 @@ encode_djuk12_insn(LoongArchInsn opc, TCGReg d, TCGReg j, uint32_t uk12) return encode_djk_slots(opc, d, j, uk12); } +static int32_t __attribute__((unused)) +encode_djuk3_insn(LoongArchInsn opc, TCGReg d, TCGReg j, uint32_t uk3) +{ + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(uk3 <= 0x7); + return encode_djk_slots(opc, d, j, uk3); +} + +static int32_t __attribute__((unused)) +encode_djuk4_insn(LoongArchInsn opc, TCGReg d, TCGReg j, uint32_t uk4) +{ + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(uk4 <= 0xf); + return encode_djk_slots(opc, d, j, uk4); +} + static int32_t __attribute__((unused)) encode_djuk5_insn(LoongArchInsn opc, TCGReg d, TCGReg j, uint32_t uk5) { @@ -972,6 +708,14 @@ encode_dsj20_insn(LoongArchInsn opc, TCGReg d, int32_t sj20) return encode_dj_slots(opc, d, sj20 & 0xfffff); } +static int32_t __attribute__((unused)) +encode_dtj_insn(LoongArchInsn opc, TCGReg d, TCGReg tj) +{ + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(tj >= 0 && tj <= 0x3); + return encode_dj_slots(opc, d, tj); +} + static int32_t __attribute__((unused)) encode_dvjuk1_insn(LoongArchInsn opc, TCGReg d, TCGReg vj, uint32_t uk1) { @@ -1008,6 +752,58 @@ encode_dvjuk4_insn(LoongArchInsn opc, TCGReg d, TCGReg vj, uint32_t uk4) return encode_djk_slots(opc, d, vj & 0x1f, uk4); } +static int32_t __attribute__((unused)) +encode_dxjuk2_insn(LoongArchInsn opc, TCGReg d, TCGReg xj, uint32_t uk2) +{ + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk2 <= 0x3); + return encode_djk_slots(opc, d, xj & 0x1f, uk2); +} + +static int32_t __attribute__((unused)) +encode_dxjuk3_insn(LoongArchInsn opc, TCGReg d, TCGReg xj, uint32_t uk3) +{ + tcg_debug_assert(d >= 0 && d <= 0x1f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk3 <= 0x7); + return encode_djk_slots(opc, d, xj & 0x1f, uk3); +} + +static int32_t __attribute__((unused)) +encode_fdfj_insn(LoongArchInsn opc, TCGReg fd, TCGReg fj) +{ + tcg_debug_assert(fd >= 0x20 && fd <= 0x3f); + tcg_debug_assert(fj >= 0x20 && fj <= 0x3f); + return encode_dj_slots(opc, fd & 0x1f, fj & 0x1f); +} + +static int32_t __attribute__((unused)) +encode_fdj_insn(LoongArchInsn opc, TCGReg fd, TCGReg j) +{ + tcg_debug_assert(fd >= 0x20 && fd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + return encode_dj_slots(opc, fd & 0x1f, j); +} + +static int32_t __attribute__((unused)) +encode_fdjk_insn(LoongArchInsn opc, TCGReg fd, TCGReg j, TCGReg k) +{ + tcg_debug_assert(fd >= 0x20 && fd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(k >= 0 && k <= 0x1f); + return encode_djk_slots(opc, fd & 0x1f, j, k); +} + +static int32_t __attribute__((unused)) +encode_fdjsk12_insn(LoongArchInsn opc, TCGReg fd, TCGReg j, int32_t sk12) +{ + tcg_debug_assert(fd >= 0x20 && fd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk12 >= -0x800 && sk12 <= 0x7ff); + return encode_djk_slots(opc, fd & 0x1f, j, sk12 & 0xfff); +} + static int32_t __attribute__((unused)) encode_sd10k16_insn(LoongArchInsn opc, int32_t sd10k16) { @@ -1015,6 +811,21 @@ encode_sd10k16_insn(LoongArchInsn opc, int32_t sd10k16) return encode_dk_slots(opc, (sd10k16 >> 16) & 0x3ff, sd10k16 & 0xffff); } +static int32_t __attribute__((unused)) +encode_sd5k16_insn(LoongArchInsn opc, int32_t sd5k16) +{ + tcg_debug_assert(sd5k16 >= -0x100000 && sd5k16 <= 0xfffff); + return encode_dk_slots(opc, (sd5k16 >> 16) & 0x1f, sd5k16 & 0xffff); +} + +static int32_t __attribute__((unused)) +encode_tdj_insn(LoongArchInsn opc, TCGReg td, TCGReg j) +{ + tcg_debug_assert(td >= 0 && td <= 0x3); + tcg_debug_assert(j >= 0 && j <= 0x1f); + return encode_dj_slots(opc, td, j); +} + static int32_t __attribute__((unused)) encode_ud15_insn(LoongArchInsn opc, uint32_t ud15) { @@ -1243,15 +1054,6 @@ encode_vdvjuk6_insn(LoongArchInsn opc, TCGReg vd, TCGReg vj, uint32_t uk6) return encode_djk_slots(opc, vd & 0x1f, vj & 0x1f, uk6); } -static int32_t __attribute__((unused)) -encode_vdvjuk7_insn(LoongArchInsn opc, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_debug_assert(vd >= 0x20 && vd <= 0x3f); - tcg_debug_assert(vj >= 0x20 && vj <= 0x3f); - tcg_debug_assert(uk7 <= 0x7f); - return encode_djk_slots(opc, vd & 0x1f, vj & 0x1f, uk7); -} - static int32_t __attribute__((unused)) encode_vdvjuk8_insn(LoongArchInsn opc, TCGReg vd, TCGReg vj, uint32_t uk8) { @@ -1281,6 +1083,252 @@ encode_vdvjvkva_insn(LoongArchInsn opc, TCGReg vd, TCGReg vj, TCGReg vk, return encode_djka_slots(opc, vd & 0x1f, vj & 0x1f, vk & 0x1f, va & 0x1f); } +static int32_t __attribute__((unused)) +encode_xdj_insn(LoongArchInsn opc, TCGReg xd, TCGReg j) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + return encode_dj_slots(opc, xd & 0x1f, j); +} + +static int32_t __attribute__((unused)) +encode_xdjk_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, TCGReg k) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(k >= 0 && k <= 0x1f); + return encode_djk_slots(opc, xd & 0x1f, j, k); +} + +static int32_t __attribute__((unused)) +encode_xdjsk10_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk10) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk10 >= -0x200 && sk10 <= 0x1ff); + return encode_djk_slots(opc, xd & 0x1f, j, sk10 & 0x3ff); +} + +static int32_t __attribute__((unused)) +encode_xdjsk11_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk11) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk11 >= -0x400 && sk11 <= 0x3ff); + return encode_djk_slots(opc, xd & 0x1f, j, sk11 & 0x7ff); +} + +static int32_t __attribute__((unused)) +encode_xdjsk12_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk12) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk12 >= -0x800 && sk12 <= 0x7ff); + return encode_djk_slots(opc, xd & 0x1f, j, sk12 & 0xfff); +} + +static int32_t __attribute__((unused)) +encode_xdjsk8un2_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un2) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk8 >= -0x80 && sk8 <= 0x7f); + tcg_debug_assert(un2 <= 0x3); + return encode_djkn_slots(opc, xd & 0x1f, j, sk8 & 0xff, un2); +} + +static int32_t __attribute__((unused)) +encode_xdjsk8un3_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un3) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk8 >= -0x80 && sk8 <= 0x7f); + tcg_debug_assert(un3 <= 0x7); + return encode_djkn_slots(opc, xd & 0x1f, j, sk8 & 0xff, un3); +} + +static int32_t __attribute__((unused)) +encode_xdjsk8un4_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un4) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk8 >= -0x80 && sk8 <= 0x7f); + tcg_debug_assert(un4 <= 0xf); + return encode_djkn_slots(opc, xd & 0x1f, j, sk8 & 0xff, un4); +} + +static int32_t __attribute__((unused)) +encode_xdjsk8un5_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un5) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk8 >= -0x80 && sk8 <= 0x7f); + tcg_debug_assert(un5 <= 0x1f); + return encode_djkn_slots(opc, xd & 0x1f, j, sk8 & 0xff, un5); +} + +static int32_t __attribute__((unused)) +encode_xdjsk9_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, int32_t sk9) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(sk9 >= -0x100 && sk9 <= 0xff); + return encode_djk_slots(opc, xd & 0x1f, j, sk9 & 0x1ff); +} + +static int32_t __attribute__((unused)) +encode_xdjuk2_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, uint32_t uk2) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(uk2 <= 0x3); + return encode_djk_slots(opc, xd & 0x1f, j, uk2); +} + +static int32_t __attribute__((unused)) +encode_xdjuk3_insn(LoongArchInsn opc, TCGReg xd, TCGReg j, uint32_t uk3) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(j >= 0 && j <= 0x1f); + tcg_debug_assert(uk3 <= 0x7); + return encode_djk_slots(opc, xd & 0x1f, j, uk3); +} + +static int32_t __attribute__((unused)) +encode_xdsj13_insn(LoongArchInsn opc, TCGReg xd, int32_t sj13) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(sj13 >= -0x1000 && sj13 <= 0xfff); + return encode_dj_slots(opc, xd & 0x1f, sj13 & 0x1fff); +} + +static int32_t __attribute__((unused)) +encode_xdxj_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + return encode_dj_slots(opc, xd & 0x1f, xj & 0x1f); +} + +static int32_t __attribute__((unused)) +encode_xdxjk_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, TCGReg k) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(k >= 0 && k <= 0x1f); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, k); +} + +static int32_t __attribute__((unused)) +encode_xdxjsk5_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(sk5 >= -0x10 && sk5 <= 0xf); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, sk5 & 0x1f); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk1_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk1) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk1 <= 0x1); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk1); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk2_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk2) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk2 <= 0x3); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk2); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk3_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk3 <= 0x7); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk3); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk4_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk4 <= 0xf); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk4); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk5_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk5 <= 0x1f); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk5); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk6_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk6 <= 0x3f); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk6); +} + +static int32_t __attribute__((unused)) +encode_xdxjuk8_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(uk8 <= 0xff); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, uk8); +} + +static int32_t __attribute__((unused)) +encode_xdxjxk_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(xk >= 0x20 && xk <= 0x3f); + return encode_djk_slots(opc, xd & 0x1f, xj & 0x1f, xk & 0x1f); +} + +static int32_t __attribute__((unused)) +encode_xdxjxkxa_insn(LoongArchInsn opc, TCGReg xd, TCGReg xj, TCGReg xk, + TCGReg xa) +{ + tcg_debug_assert(xd >= 0x20 && xd <= 0x3f); + tcg_debug_assert(xj >= 0x20 && xj <= 0x3f); + tcg_debug_assert(xk >= 0x20 && xk <= 0x3f); + tcg_debug_assert(xa >= 0x20 && xa <= 0x3f); + return encode_djka_slots(opc, xd & 0x1f, xj & 0x1f, xk & 0x1f, xa & 0x1f); +} + +/* Emits the `movgr2scr td, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_movgr2scr(TCGContext *s, TCGReg td, TCGReg j) +{ + tcg_out32(s, encode_tdj_insn(OPC_MOVGR2SCR, td, j)); +} + +/* Emits the `movscr2gr d, tj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_movscr2gr(TCGContext *s, TCGReg d, TCGReg tj) +{ + tcg_out32(s, encode_dtj_insn(OPC_MOVSCR2GR, d, tj)); +} + /* Emits the `clz.w d, j` instruction. */ static void __attribute__((unused)) tcg_out_opc_clz_w(TCGContext *s, TCGReg d, TCGReg j) @@ -1484,6 +1532,20 @@ tcg_out_opc_sra_d(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) tcg_out32(s, encode_djk_insn(OPC_SRA_D, d, j, k)); } +/* Emits the `rotr.b d, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_rotr_b(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_djk_insn(OPC_ROTR_B, d, j, k)); +} + +/* Emits the `rotr.h d, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_rotr_h(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_djk_insn(OPC_ROTR_H, d, j, k)); +} + /* Emits the `rotr.w d, j, k` instruction. */ static void __attribute__((unused)) tcg_out_opc_rotr_w(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) @@ -1638,6 +1700,20 @@ tcg_out_opc_srai_d(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk6) tcg_out32(s, encode_djuk6_insn(OPC_SRAI_D, d, j, uk6)); } +/* Emits the `rotri.b d, j, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_rotri_b(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk3) +{ + tcg_out32(s, encode_djuk3_insn(OPC_ROTRI_B, d, j, uk3)); +} + +/* Emits the `rotri.h d, j, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_rotri_h(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk4) +{ + tcg_out32(s, encode_djuk4_insn(OPC_ROTRI_H, d, j, uk4)); +} + /* Emits the `rotri.w d, j, uk5` instruction. */ static void __attribute__((unused)) tcg_out_opc_rotri_w(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk5) @@ -1684,6 +1760,27 @@ tcg_out_opc_bstrpick_d(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk6, tcg_out32(s, encode_djuk6um6_insn(OPC_BSTRPICK_D, d, j, uk6, um6)); } +/* Emits the `fmov.d fd, fj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fmov_d(TCGContext *s, TCGReg fd, TCGReg fj) +{ + tcg_out32(s, encode_fdfj_insn(OPC_FMOV_D, fd, fj)); +} + +/* Emits the `movgr2fr.d fd, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_movgr2fr_d(TCGContext *s, TCGReg fd, TCGReg j) +{ + tcg_out32(s, encode_fdj_insn(OPC_MOVGR2FR_D, fd, j)); +} + +/* Emits the `movfr2gr.d d, fj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_movfr2gr_d(TCGContext *s, TCGReg d, TCGReg fj) +{ + tcg_out32(s, encode_dfj_insn(OPC_MOVFR2GR_D, d, fj)); +} + /* Emits the `slti d, j, sk12` instruction. */ static void __attribute__((unused)) tcg_out_opc_slti(TCGContext *s, TCGReg d, TCGReg j, int32_t sk12) @@ -1740,370 +1837,6 @@ tcg_out_opc_xori(TCGContext *s, TCGReg d, TCGReg j, uint32_t uk12) tcg_out32(s, encode_djuk12_insn(OPC_XORI, d, j, uk12)); } -/* Emits the `vfmadd.s vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmadd_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFMADD_S, vd, vj, vk, va)); -} - -/* Emits the `vfmadd.d vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmadd_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFMADD_D, vd, vj, vk, va)); -} - -/* Emits the `vfmsub.s vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmsub_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFMSUB_S, vd, vj, vk, va)); -} - -/* Emits the `vfmsub.d vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmsub_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFMSUB_D, vd, vj, vk, va)); -} - -/* Emits the `vfnmadd.s vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfnmadd_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFNMADD_S, vd, vj, vk, va)); -} - -/* Emits the `vfnmadd.d vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfnmadd_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFNMADD_D, vd, vj, vk, va)); -} - -/* Emits the `vfnmsub.s vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfnmsub_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFNMSUB_S, vd, vj, vk, va)); -} - -/* Emits the `vfnmsub.d vd, vj, vk, va` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfnmsub_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) -{ - tcg_out32(s, encode_vdvjvkva_insn(OPC_VFNMSUB_D, vd, vj, vk, va)); -} - -/* Emits the `vfcmp.caf.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_caf_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CAF_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.saf.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_saf_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SAF_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.clt.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_clt_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CLT_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.slt.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_slt_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SLT_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.ceq.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_ceq_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CEQ_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.seq.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_seq_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SEQ_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cle.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cle_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CLE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sle.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sle_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SLE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cun.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cun_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUN_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sun.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sun_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUN_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cult.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cult_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CULT_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sult.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sult_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SULT_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cueq.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cueq_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUEQ_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sueq.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sueq_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUEQ_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cule.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cule_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CULE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sule.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sule_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SULE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cne.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cne_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CNE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sne.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sne_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SNE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cor.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cor_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_COR_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sor.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sor_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SOR_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.cune.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cune_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUNE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.sune.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sune_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUNE_S, vd, vj, vk)); -} - -/* Emits the `vfcmp.caf.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_caf_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CAF_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.saf.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_saf_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SAF_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.clt.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_clt_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CLT_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.slt.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_slt_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SLT_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.ceq.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_ceq_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CEQ_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.seq.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_seq_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SEQ_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cle.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cle_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CLE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sle.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sle_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SLE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cun.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cun_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUN_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sun.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sun_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUN_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cult.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cult_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CULT_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sult.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sult_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SULT_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cueq.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cueq_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUEQ_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sueq.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sueq_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUEQ_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cule.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cule_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CULE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sule.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sule_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SULE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cne.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cne_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CNE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sne.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sne_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SNE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cor.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cor_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_COR_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sor.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sor_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SOR_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.cune.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_cune_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_CUNE_D, vd, vj, vk)); -} - -/* Emits the `vfcmp.sune.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcmp_sune_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCMP_SUNE_D, vd, vj, vk)); -} - /* Emits the `vbitsel.v vd, vj, vk, va` instruction. */ static void __attribute__((unused)) tcg_out_opc_vbitsel_v(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) @@ -2111,6 +1844,14 @@ tcg_out_opc_vbitsel_v(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) tcg_out32(s, encode_vdvjvkva_insn(OPC_VBITSEL_V, vd, vj, vk, va)); } +/* Emits the `xvbitsel.v xd, xj, xk, xa` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitsel_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk, + TCGReg xa) +{ + tcg_out32(s, encode_xdxjxkxa_insn(OPC_XVBITSEL_V, xd, xj, xk, xa)); +} + /* Emits the `vshuf.b vd, vj, vk, va` instruction. */ static void __attribute__((unused)) tcg_out_opc_vshuf_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) @@ -2118,6 +1859,13 @@ tcg_out_opc_vshuf_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk, TCGReg va) tcg_out32(s, encode_vdvjvkva_insn(OPC_VSHUF_B, vd, vj, vk, va)); } +/* Emits the `xvshuf.b xd, xj, xk, xa` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvshuf_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk, TCGReg xa) +{ + tcg_out32(s, encode_xdxjxkxa_insn(OPC_XVSHUF_B, xd, xj, xk, xa)); +} + /* Emits the `addu16i.d d, j, sk16` instruction. */ static void __attribute__((unused)) tcg_out_opc_addu16i_d(TCGContext *s, TCGReg d, TCGReg j, int32_t sk16) @@ -2244,6 +1992,34 @@ tcg_out_opc_ld_wu(TCGContext *s, TCGReg d, TCGReg j, int32_t sk12) tcg_out32(s, encode_djsk12_insn(OPC_LD_WU, d, j, sk12)); } +/* Emits the `fld.s fd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fld_s(TCGContext *s, TCGReg fd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_fdjsk12_insn(OPC_FLD_S, fd, j, sk12)); +} + +/* Emits the `fst.s fd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fst_s(TCGContext *s, TCGReg fd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_fdjsk12_insn(OPC_FST_S, fd, j, sk12)); +} + +/* Emits the `fld.d fd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fld_d(TCGContext *s, TCGReg fd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_fdjsk12_insn(OPC_FLD_D, fd, j, sk12)); +} + +/* Emits the `fst.d fd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fst_d(TCGContext *s, TCGReg fd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_fdjsk12_insn(OPC_FST_D, fd, j, sk12)); +} + /* Emits the `vld vd, j, sk12` instruction. */ static void __attribute__((unused)) tcg_out_opc_vld(TCGContext *s, TCGReg vd, TCGReg j, int32_t sk12) @@ -2258,6 +2034,20 @@ tcg_out_opc_vst(TCGContext *s, TCGReg vd, TCGReg j, int32_t sk12) tcg_out32(s, encode_vdjsk12_insn(OPC_VST, vd, j, sk12)); } +/* Emits the `xvld xd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvld(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_xdjsk12_insn(OPC_XVLD, xd, j, sk12)); +} + +/* Emits the `xvst xd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvst(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_xdjsk12_insn(OPC_XVST, xd, j, sk12)); +} + /* Emits the `vldrepl.d vd, j, sk9` instruction. */ static void __attribute__((unused)) tcg_out_opc_vldrepl_d(TCGContext *s, TCGReg vd, TCGReg j, int32_t sk9) @@ -2318,6 +2108,66 @@ tcg_out_opc_vstelm_b(TCGContext *s, TCGReg vd, TCGReg j, int32_t sk8, tcg_out32(s, encode_vdjsk8un4_insn(OPC_VSTELM_B, vd, j, sk8, un4)); } +/* Emits the `xvldrepl.d xd, j, sk9` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldrepl_d(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk9) +{ + tcg_out32(s, encode_xdjsk9_insn(OPC_XVLDREPL_D, xd, j, sk9)); +} + +/* Emits the `xvldrepl.w xd, j, sk10` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldrepl_w(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk10) +{ + tcg_out32(s, encode_xdjsk10_insn(OPC_XVLDREPL_W, xd, j, sk10)); +} + +/* Emits the `xvldrepl.h xd, j, sk11` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldrepl_h(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk11) +{ + tcg_out32(s, encode_xdjsk11_insn(OPC_XVLDREPL_H, xd, j, sk11)); +} + +/* Emits the `xvldrepl.b xd, j, sk12` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldrepl_b(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk12) +{ + tcg_out32(s, encode_xdjsk12_insn(OPC_XVLDREPL_B, xd, j, sk12)); +} + +/* Emits the `xvstelm.d xd, j, sk8, un2` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvstelm_d(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un2) +{ + tcg_out32(s, encode_xdjsk8un2_insn(OPC_XVSTELM_D, xd, j, sk8, un2)); +} + +/* Emits the `xvstelm.w xd, j, sk8, un3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvstelm_w(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un3) +{ + tcg_out32(s, encode_xdjsk8un3_insn(OPC_XVSTELM_W, xd, j, sk8, un3)); +} + +/* Emits the `xvstelm.h xd, j, sk8, un4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvstelm_h(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un4) +{ + tcg_out32(s, encode_xdjsk8un4_insn(OPC_XVSTELM_H, xd, j, sk8, un4)); +} + +/* Emits the `xvstelm.b xd, j, sk8, un5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvstelm_b(TCGContext *s, TCGReg xd, TCGReg j, int32_t sk8, + uint32_t un5) +{ + tcg_out32(s, encode_xdjsk8un5_insn(OPC_XVSTELM_B, xd, j, sk8, un5)); +} + /* Emits the `ldx.b d, j, k` instruction. */ static void __attribute__((unused)) tcg_out_opc_ldx_b(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) @@ -2395,6 +2245,34 @@ tcg_out_opc_ldx_wu(TCGContext *s, TCGReg d, TCGReg j, TCGReg k) tcg_out32(s, encode_djk_insn(OPC_LDX_WU, d, j, k)); } +/* Emits the `fldx.s fd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fldx_s(TCGContext *s, TCGReg fd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_fdjk_insn(OPC_FLDX_S, fd, j, k)); +} + +/* Emits the `fldx.d fd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fldx_d(TCGContext *s, TCGReg fd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_fdjk_insn(OPC_FLDX_D, fd, j, k)); +} + +/* Emits the `fstx.s fd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fstx_s(TCGContext *s, TCGReg fd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_fdjk_insn(OPC_FSTX_S, fd, j, k)); +} + +/* Emits the `fstx.d fd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_fstx_d(TCGContext *s, TCGReg fd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_fdjk_insn(OPC_FSTX_D, fd, j, k)); +} + /* Emits the `vldx vd, j, k` instruction. */ static void __attribute__((unused)) tcg_out_opc_vldx(TCGContext *s, TCGReg vd, TCGReg j, TCGReg k) @@ -2409,6 +2287,20 @@ tcg_out_opc_vstx(TCGContext *s, TCGReg vd, TCGReg j, TCGReg k) tcg_out32(s, encode_vdjk_insn(OPC_VSTX, vd, j, k)); } +/* Emits the `xvldx xd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldx(TCGContext *s, TCGReg xd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_xdjk_insn(OPC_XVLDX, xd, j, k)); +} + +/* Emits the `xvstx xd, j, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvstx(TCGContext *s, TCGReg xd, TCGReg j, TCGReg k) +{ + tcg_out32(s, encode_xdjk_insn(OPC_XVSTX, xd, j, k)); +} + /* Emits the `dbar ud15` instruction. */ static void __attribute__((unused)) tcg_out_opc_dbar(TCGContext *s, uint32_t ud15) @@ -2416,6 +2308,20 @@ tcg_out_opc_dbar(TCGContext *s, uint32_t ud15) tcg_out32(s, encode_ud15_insn(OPC_DBAR, ud15)); } +/* Emits the `jiscr0 sd5k16` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_jiscr0(TCGContext *s, int32_t sd5k16) +{ + tcg_out32(s, encode_sd5k16_insn(OPC_JISCR0, sd5k16)); +} + +/* Emits the `jiscr1 sd5k16` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_jiscr1(TCGContext *s, int32_t sd5k16) +{ + tcg_out32(s, encode_sd5k16_insn(OPC_JISCR1, sd5k16)); +} + /* Emits the `jirl d, j, sk16` instruction. */ static void __attribute__((unused)) tcg_out_opc_jirl(TCGContext *s, TCGReg d, TCGReg j, int32_t sk16) @@ -2675,286 +2581,6 @@ tcg_out_opc_vsub_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) tcg_out32(s, encode_vdvjvk_insn(OPC_VSUB_D, vd, vj, vk)); } -/* Emits the `vaddwev.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_H_B, vd, vj, vk)); -} - -/* Emits the `vaddwev.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_W_H, vd, vj, vk)); -} - -/* Emits the `vaddwev.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_D_W, vd, vj, vk)); -} - -/* Emits the `vaddwev.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_Q_D, vd, vj, vk)); -} - -/* Emits the `vsubwev.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_H_B, vd, vj, vk)); -} - -/* Emits the `vsubwev.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_W_H, vd, vj, vk)); -} - -/* Emits the `vsubwev.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_D_W, vd, vj, vk)); -} - -/* Emits the `vsubwev.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_Q_D, vd, vj, vk)); -} - -/* Emits the `vaddwod.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_H_B, vd, vj, vk)); -} - -/* Emits the `vaddwod.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_W_H, vd, vj, vk)); -} - -/* Emits the `vaddwod.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_D_W, vd, vj, vk)); -} - -/* Emits the `vaddwod.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_Q_D, vd, vj, vk)); -} - -/* Emits the `vsubwod.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_H_B, vd, vj, vk)); -} - -/* Emits the `vsubwod.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_W_H, vd, vj, vk)); -} - -/* Emits the `vsubwod.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_D_W, vd, vj, vk)); -} - -/* Emits the `vsubwod.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_Q_D, vd, vj, vk)); -} - -/* Emits the `vaddwev.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_H_BU, vd, vj, vk)); -} - -/* Emits the `vaddwev.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_W_HU, vd, vj, vk)); -} - -/* Emits the `vaddwev.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_D_WU, vd, vj, vk)); -} - -/* Emits the `vaddwev.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_Q_DU, vd, vj, vk)); -} - -/* Emits the `vsubwev.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_H_BU, vd, vj, vk)); -} - -/* Emits the `vsubwev.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_W_HU, vd, vj, vk)); -} - -/* Emits the `vsubwev.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_D_WU, vd, vj, vk)); -} - -/* Emits the `vsubwev.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwev_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWEV_Q_DU, vd, vj, vk)); -} - -/* Emits the `vaddwod.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_H_BU, vd, vj, vk)); -} - -/* Emits the `vaddwod.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_W_HU, vd, vj, vk)); -} - -/* Emits the `vaddwod.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_D_WU, vd, vj, vk)); -} - -/* Emits the `vaddwod.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_Q_DU, vd, vj, vk)); -} - -/* Emits the `vsubwod.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_H_BU, vd, vj, vk)); -} - -/* Emits the `vsubwod.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_W_HU, vd, vj, vk)); -} - -/* Emits the `vsubwod.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_D_WU, vd, vj, vk)); -} - -/* Emits the `vsubwod.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsubwod_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUBWOD_Q_DU, vd, vj, vk)); -} - -/* Emits the `vaddwev.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vaddwev.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vaddwev.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vaddwev.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwev_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWEV_Q_DU_D, vd, vj, vk)); -} - -/* Emits the `vaddwod.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vaddwod.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vaddwod.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vaddwod.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vaddwod_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDWOD_Q_DU_D, vd, vj, vk)); -} - /* Emits the `vsadd.b vd, vj, vk` instruction. */ static void __attribute__((unused)) tcg_out_opc_vsadd_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) @@ -3067,314 +2693,6 @@ tcg_out_opc_vssub_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) tcg_out32(s, encode_vdvjvk_insn(OPC_VSSUB_DU, vd, vj, vk)); } -/* Emits the `vhaddw.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_H_B, vd, vj, vk)); -} - -/* Emits the `vhaddw.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_W_H, vd, vj, vk)); -} - -/* Emits the `vhaddw.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_D_W, vd, vj, vk)); -} - -/* Emits the `vhaddw.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_Q_D, vd, vj, vk)); -} - -/* Emits the `vhsubw.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_H_B, vd, vj, vk)); -} - -/* Emits the `vhsubw.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_W_H, vd, vj, vk)); -} - -/* Emits the `vhsubw.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_D_W, vd, vj, vk)); -} - -/* Emits the `vhsubw.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_Q_D, vd, vj, vk)); -} - -/* Emits the `vhaddw.hu.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_hu_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_HU_BU, vd, vj, vk)); -} - -/* Emits the `vhaddw.wu.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_wu_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_WU_HU, vd, vj, vk)); -} - -/* Emits the `vhaddw.du.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_du_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_DU_WU, vd, vj, vk)); -} - -/* Emits the `vhaddw.qu.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhaddw_qu_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHADDW_QU_DU, vd, vj, vk)); -} - -/* Emits the `vhsubw.hu.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_hu_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_HU_BU, vd, vj, vk)); -} - -/* Emits the `vhsubw.wu.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_wu_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_WU_HU, vd, vj, vk)); -} - -/* Emits the `vhsubw.du.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_du_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_DU_WU, vd, vj, vk)); -} - -/* Emits the `vhsubw.qu.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vhsubw_qu_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VHSUBW_QU_DU, vd, vj, vk)); -} - -/* Emits the `vadda.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vadda_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDA_B, vd, vj, vk)); -} - -/* Emits the `vadda.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vadda_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDA_H, vd, vj, vk)); -} - -/* Emits the `vadda.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vadda_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDA_W, vd, vj, vk)); -} - -/* Emits the `vadda.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vadda_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADDA_D, vd, vj, vk)); -} - -/* Emits the `vabsd.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_B, vd, vj, vk)); -} - -/* Emits the `vabsd.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_H, vd, vj, vk)); -} - -/* Emits the `vabsd.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_W, vd, vj, vk)); -} - -/* Emits the `vabsd.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_D, vd, vj, vk)); -} - -/* Emits the `vabsd.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_BU, vd, vj, vk)); -} - -/* Emits the `vabsd.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_HU, vd, vj, vk)); -} - -/* Emits the `vabsd.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_WU, vd, vj, vk)); -} - -/* Emits the `vabsd.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vabsd_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VABSD_DU, vd, vj, vk)); -} - -/* Emits the `vavg.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_B, vd, vj, vk)); -} - -/* Emits the `vavg.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_H, vd, vj, vk)); -} - -/* Emits the `vavg.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_W, vd, vj, vk)); -} - -/* Emits the `vavg.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_D, vd, vj, vk)); -} - -/* Emits the `vavg.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_BU, vd, vj, vk)); -} - -/* Emits the `vavg.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_HU, vd, vj, vk)); -} - -/* Emits the `vavg.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_WU, vd, vj, vk)); -} - -/* Emits the `vavg.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavg_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVG_DU, vd, vj, vk)); -} - -/* Emits the `vavgr.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_B, vd, vj, vk)); -} - -/* Emits the `vavgr.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_H, vd, vj, vk)); -} - -/* Emits the `vavgr.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_W, vd, vj, vk)); -} - -/* Emits the `vavgr.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_D, vd, vj, vk)); -} - -/* Emits the `vavgr.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_BU, vd, vj, vk)); -} - -/* Emits the `vavgr.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_HU, vd, vj, vk)); -} - -/* Emits the `vavgr.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_WU, vd, vj, vk)); -} - -/* Emits the `vavgr.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vavgr_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VAVGR_DU, vd, vj, vk)); -} - /* Emits the `vmax.b vd, vj, vk` instruction. */ static void __attribute__((unused)) tcg_out_opc_vmax_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) @@ -3515,566 +2833,6 @@ tcg_out_opc_vmul_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) tcg_out32(s, encode_vdvjvk_insn(OPC_VMUL_D, vd, vj, vk)); } -/* Emits the `vmuh.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_B, vd, vj, vk)); -} - -/* Emits the `vmuh.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_H, vd, vj, vk)); -} - -/* Emits the `vmuh.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_W, vd, vj, vk)); -} - -/* Emits the `vmuh.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_D, vd, vj, vk)); -} - -/* Emits the `vmuh.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_BU, vd, vj, vk)); -} - -/* Emits the `vmuh.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_HU, vd, vj, vk)); -} - -/* Emits the `vmuh.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_WU, vd, vj, vk)); -} - -/* Emits the `vmuh.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmuh_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMUH_DU, vd, vj, vk)); -} - -/* Emits the `vmulwev.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_H_B, vd, vj, vk)); -} - -/* Emits the `vmulwev.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_W_H, vd, vj, vk)); -} - -/* Emits the `vmulwev.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_D_W, vd, vj, vk)); -} - -/* Emits the `vmulwev.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_Q_D, vd, vj, vk)); -} - -/* Emits the `vmulwod.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_H_B, vd, vj, vk)); -} - -/* Emits the `vmulwod.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_W_H, vd, vj, vk)); -} - -/* Emits the `vmulwod.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_D_W, vd, vj, vk)); -} - -/* Emits the `vmulwod.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_Q_D, vd, vj, vk)); -} - -/* Emits the `vmulwev.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_H_BU, vd, vj, vk)); -} - -/* Emits the `vmulwev.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_W_HU, vd, vj, vk)); -} - -/* Emits the `vmulwev.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_D_WU, vd, vj, vk)); -} - -/* Emits the `vmulwev.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_Q_DU, vd, vj, vk)); -} - -/* Emits the `vmulwod.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_H_BU, vd, vj, vk)); -} - -/* Emits the `vmulwod.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_W_HU, vd, vj, vk)); -} - -/* Emits the `vmulwod.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_D_WU, vd, vj, vk)); -} - -/* Emits the `vmulwod.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_Q_DU, vd, vj, vk)); -} - -/* Emits the `vmulwev.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vmulwev.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vmulwev.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vmulwev.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwev_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWEV_Q_DU_D, vd, vj, vk)); -} - -/* Emits the `vmulwod.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vmulwod.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vmulwod.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vmulwod.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmulwod_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMULWOD_Q_DU_D, vd, vj, vk)); -} - -/* Emits the `vmadd.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmadd_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADD_B, vd, vj, vk)); -} - -/* Emits the `vmadd.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmadd_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADD_H, vd, vj, vk)); -} - -/* Emits the `vmadd.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmadd_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADD_W, vd, vj, vk)); -} - -/* Emits the `vmadd.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmadd_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADD_D, vd, vj, vk)); -} - -/* Emits the `vmsub.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmsub_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMSUB_B, vd, vj, vk)); -} - -/* Emits the `vmsub.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmsub_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMSUB_H, vd, vj, vk)); -} - -/* Emits the `vmsub.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmsub_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMSUB_W, vd, vj, vk)); -} - -/* Emits the `vmsub.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmsub_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMSUB_D, vd, vj, vk)); -} - -/* Emits the `vmaddwev.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_H_B, vd, vj, vk)); -} - -/* Emits the `vmaddwev.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_W_H, vd, vj, vk)); -} - -/* Emits the `vmaddwev.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_D_W, vd, vj, vk)); -} - -/* Emits the `vmaddwev.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_Q_D, vd, vj, vk)); -} - -/* Emits the `vmaddwod.h.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_h_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_H_B, vd, vj, vk)); -} - -/* Emits the `vmaddwod.w.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_w_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_W_H, vd, vj, vk)); -} - -/* Emits the `vmaddwod.d.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_d_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_D_W, vd, vj, vk)); -} - -/* Emits the `vmaddwod.q.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_q_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_Q_D, vd, vj, vk)); -} - -/* Emits the `vmaddwev.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_H_BU, vd, vj, vk)); -} - -/* Emits the `vmaddwev.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_W_HU, vd, vj, vk)); -} - -/* Emits the `vmaddwev.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_D_WU, vd, vj, vk)); -} - -/* Emits the `vmaddwev.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_Q_DU, vd, vj, vk)); -} - -/* Emits the `vmaddwod.h.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_h_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_H_BU, vd, vj, vk)); -} - -/* Emits the `vmaddwod.w.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_w_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_W_HU, vd, vj, vk)); -} - -/* Emits the `vmaddwod.d.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_d_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_D_WU, vd, vj, vk)); -} - -/* Emits the `vmaddwod.q.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_q_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_Q_DU, vd, vj, vk)); -} - -/* Emits the `vmaddwev.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vmaddwev.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vmaddwev.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vmaddwev.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwev_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWEV_Q_DU_D, vd, vj, vk)); -} - -/* Emits the `vmaddwod.h.bu.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_h_bu_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_H_BU_B, vd, vj, vk)); -} - -/* Emits the `vmaddwod.w.hu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_w_hu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_W_HU_H, vd, vj, vk)); -} - -/* Emits the `vmaddwod.d.wu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_d_wu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_D_WU_W, vd, vj, vk)); -} - -/* Emits the `vmaddwod.q.du.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmaddwod_q_du_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMADDWOD_Q_DU_D, vd, vj, vk)); -} - -/* Emits the `vdiv.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_B, vd, vj, vk)); -} - -/* Emits the `vdiv.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_H, vd, vj, vk)); -} - -/* Emits the `vdiv.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_W, vd, vj, vk)); -} - -/* Emits the `vdiv.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_D, vd, vj, vk)); -} - -/* Emits the `vmod.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_B, vd, vj, vk)); -} - -/* Emits the `vmod.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_H, vd, vj, vk)); -} - -/* Emits the `vmod.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_W, vd, vj, vk)); -} - -/* Emits the `vmod.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_D, vd, vj, vk)); -} - -/* Emits the `vdiv.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_BU, vd, vj, vk)); -} - -/* Emits the `vdiv.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_HU, vd, vj, vk)); -} - -/* Emits the `vdiv.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_WU, vd, vj, vk)); -} - -/* Emits the `vdiv.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vdiv_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VDIV_DU, vd, vj, vk)); -} - -/* Emits the `vmod.bu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_bu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_BU, vd, vj, vk)); -} - -/* Emits the `vmod.hu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_hu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_HU, vd, vj, vk)); -} - -/* Emits the `vmod.wu vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_wu(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_WU, vd, vj, vk)); -} - -/* Emits the `vmod.du vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmod_du(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VMOD_DU, vd, vj, vk)); -} - /* Emits the `vsll.b vd, vj, vk` instruction. */ static void __attribute__((unused)) tcg_out_opc_vsll_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) @@ -4187,566 +2945,6 @@ tcg_out_opc_vrotr_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) tcg_out32(s, encode_vdvjvk_insn(OPC_VROTR_D, vd, vj, vk)); } -/* Emits the `vsrlr.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlr_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLR_B, vd, vj, vk)); -} - -/* Emits the `vsrlr.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlr_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLR_H, vd, vj, vk)); -} - -/* Emits the `vsrlr.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlr_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLR_W, vd, vj, vk)); -} - -/* Emits the `vsrlr.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlr_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLR_D, vd, vj, vk)); -} - -/* Emits the `vsrar.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrar_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAR_B, vd, vj, vk)); -} - -/* Emits the `vsrar.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrar_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAR_H, vd, vj, vk)); -} - -/* Emits the `vsrar.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrar_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAR_W, vd, vj, vk)); -} - -/* Emits the `vsrar.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrar_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAR_D, vd, vj, vk)); -} - -/* Emits the `vsrln.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrln_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLN_B_H, vd, vj, vk)); -} - -/* Emits the `vsrln.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrln_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLN_H_W, vd, vj, vk)); -} - -/* Emits the `vsrln.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrln_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLN_W_D, vd, vj, vk)); -} - -/* Emits the `vsran.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsran_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAN_B_H, vd, vj, vk)); -} - -/* Emits the `vsran.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsran_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAN_H_W, vd, vj, vk)); -} - -/* Emits the `vsran.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsran_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRAN_W_D, vd, vj, vk)); -} - -/* Emits the `vsrlrn.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrn_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLRN_B_H, vd, vj, vk)); -} - -/* Emits the `vsrlrn.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrn_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLRN_H_W, vd, vj, vk)); -} - -/* Emits the `vsrlrn.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrn_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRLRN_W_D, vd, vj, vk)); -} - -/* Emits the `vsrarn.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarn_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRARN_B_H, vd, vj, vk)); -} - -/* Emits the `vsrarn.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarn_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRARN_H_W, vd, vj, vk)); -} - -/* Emits the `vsrarn.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarn_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSRARN_W_D, vd, vj, vk)); -} - -/* Emits the `vssrln.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_B_H, vd, vj, vk)); -} - -/* Emits the `vssrln.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_H_W, vd, vj, vk)); -} - -/* Emits the `vssrln.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_W_D, vd, vj, vk)); -} - -/* Emits the `vssran.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_B_H, vd, vj, vk)); -} - -/* Emits the `vssran.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_H_W, vd, vj, vk)); -} - -/* Emits the `vssran.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_W_D, vd, vj, vk)); -} - -/* Emits the `vssrlrn.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_B_H, vd, vj, vk)); -} - -/* Emits the `vssrlrn.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_H_W, vd, vj, vk)); -} - -/* Emits the `vssrlrn.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_W_D, vd, vj, vk)); -} - -/* Emits the `vssrarn.b.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_b_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_B_H, vd, vj, vk)); -} - -/* Emits the `vssrarn.h.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_h_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_H_W, vd, vj, vk)); -} - -/* Emits the `vssrarn.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_W_D, vd, vj, vk)); -} - -/* Emits the `vssrln.bu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_BU_H, vd, vj, vk)); -} - -/* Emits the `vssrln.hu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_HU_W, vd, vj, vk)); -} - -/* Emits the `vssrln.wu.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrln_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLN_WU_D, vd, vj, vk)); -} - -/* Emits the `vssran.bu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_BU_H, vd, vj, vk)); -} - -/* Emits the `vssran.hu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_HU_W, vd, vj, vk)); -} - -/* Emits the `vssran.wu.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssran_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRAN_WU_D, vd, vj, vk)); -} - -/* Emits the `vssrlrn.bu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_BU_H, vd, vj, vk)); -} - -/* Emits the `vssrlrn.hu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_HU_W, vd, vj, vk)); -} - -/* Emits the `vssrlrn.wu.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrn_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRLRN_WU_D, vd, vj, vk)); -} - -/* Emits the `vssrarn.bu.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_BU_H, vd, vj, vk)); -} - -/* Emits the `vssrarn.hu.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_HU_W, vd, vj, vk)); -} - -/* Emits the `vssrarn.wu.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarn_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSSRARN_WU_D, vd, vj, vk)); -} - -/* Emits the `vbitclr.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitclr_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITCLR_B, vd, vj, vk)); -} - -/* Emits the `vbitclr.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitclr_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITCLR_H, vd, vj, vk)); -} - -/* Emits the `vbitclr.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitclr_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITCLR_W, vd, vj, vk)); -} - -/* Emits the `vbitclr.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitclr_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITCLR_D, vd, vj, vk)); -} - -/* Emits the `vbitset.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitset_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITSET_B, vd, vj, vk)); -} - -/* Emits the `vbitset.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitset_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITSET_H, vd, vj, vk)); -} - -/* Emits the `vbitset.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitset_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITSET_W, vd, vj, vk)); -} - -/* Emits the `vbitset.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitset_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITSET_D, vd, vj, vk)); -} - -/* Emits the `vbitrev.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitrev_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITREV_B, vd, vj, vk)); -} - -/* Emits the `vbitrev.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitrev_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITREV_H, vd, vj, vk)); -} - -/* Emits the `vbitrev.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitrev_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITREV_W, vd, vj, vk)); -} - -/* Emits the `vbitrev.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbitrev_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VBITREV_D, vd, vj, vk)); -} - -/* Emits the `vpackev.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackev_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKEV_B, vd, vj, vk)); -} - -/* Emits the `vpackev.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackev_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKEV_H, vd, vj, vk)); -} - -/* Emits the `vpackev.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackev_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKEV_W, vd, vj, vk)); -} - -/* Emits the `vpackev.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackev_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKEV_D, vd, vj, vk)); -} - -/* Emits the `vpackod.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackod_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKOD_B, vd, vj, vk)); -} - -/* Emits the `vpackod.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackod_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKOD_H, vd, vj, vk)); -} - -/* Emits the `vpackod.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackod_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKOD_W, vd, vj, vk)); -} - -/* Emits the `vpackod.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpackod_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPACKOD_D, vd, vj, vk)); -} - -/* Emits the `vilvl.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvl_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVL_B, vd, vj, vk)); -} - -/* Emits the `vilvl.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvl_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVL_H, vd, vj, vk)); -} - -/* Emits the `vilvl.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvl_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVL_W, vd, vj, vk)); -} - -/* Emits the `vilvl.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvl_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVL_D, vd, vj, vk)); -} - -/* Emits the `vilvh.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvh_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVH_B, vd, vj, vk)); -} - -/* Emits the `vilvh.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvh_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVH_H, vd, vj, vk)); -} - -/* Emits the `vilvh.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvh_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVH_W, vd, vj, vk)); -} - -/* Emits the `vilvh.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vilvh_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VILVH_D, vd, vj, vk)); -} - -/* Emits the `vpickev.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickev_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKEV_B, vd, vj, vk)); -} - -/* Emits the `vpickev.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickev_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKEV_H, vd, vj, vk)); -} - -/* Emits the `vpickev.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickev_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKEV_W, vd, vj, vk)); -} - -/* Emits the `vpickev.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickev_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKEV_D, vd, vj, vk)); -} - -/* Emits the `vpickod.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickod_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKOD_B, vd, vj, vk)); -} - -/* Emits the `vpickod.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickod_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKOD_H, vd, vj, vk)); -} - -/* Emits the `vpickod.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickod_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKOD_W, vd, vj, vk)); -} - -/* Emits the `vpickod.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpickod_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VPICKOD_D, vd, vj, vk)); -} - /* Emits the `vreplve.b vd, vj, k` instruction. */ static void __attribute__((unused)) tcg_out_opc_vreplve_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg k) @@ -4817,251 +3015,6 @@ tcg_out_opc_vorn_v(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) tcg_out32(s, encode_vdvjvk_insn(OPC_VORN_V, vd, vj, vk)); } -/* Emits the `vfrstp.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrstp_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFRSTP_B, vd, vj, vk)); -} - -/* Emits the `vfrstp.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrstp_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFRSTP_H, vd, vj, vk)); -} - -/* Emits the `vadd.q vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vadd_q(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VADD_Q, vd, vj, vk)); -} - -/* Emits the `vsub.q vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsub_q(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSUB_Q, vd, vj, vk)); -} - -/* Emits the `vsigncov.b vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsigncov_b(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSIGNCOV_B, vd, vj, vk)); -} - -/* Emits the `vsigncov.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsigncov_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSIGNCOV_H, vd, vj, vk)); -} - -/* Emits the `vsigncov.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsigncov_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSIGNCOV_W, vd, vj, vk)); -} - -/* Emits the `vsigncov.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsigncov_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSIGNCOV_D, vd, vj, vk)); -} - -/* Emits the `vfadd.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfadd_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFADD_S, vd, vj, vk)); -} - -/* Emits the `vfadd.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfadd_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFADD_D, vd, vj, vk)); -} - -/* Emits the `vfsub.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfsub_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFSUB_S, vd, vj, vk)); -} - -/* Emits the `vfsub.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfsub_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFSUB_D, vd, vj, vk)); -} - -/* Emits the `vfmul.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmul_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMUL_S, vd, vj, vk)); -} - -/* Emits the `vfmul.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmul_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMUL_D, vd, vj, vk)); -} - -/* Emits the `vfdiv.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfdiv_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFDIV_S, vd, vj, vk)); -} - -/* Emits the `vfdiv.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfdiv_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFDIV_D, vd, vj, vk)); -} - -/* Emits the `vfmax.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmax_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMAX_S, vd, vj, vk)); -} - -/* Emits the `vfmax.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmax_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMAX_D, vd, vj, vk)); -} - -/* Emits the `vfmin.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmin_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMIN_S, vd, vj, vk)); -} - -/* Emits the `vfmin.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmin_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMIN_D, vd, vj, vk)); -} - -/* Emits the `vfmaxa.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmaxa_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMAXA_S, vd, vj, vk)); -} - -/* Emits the `vfmaxa.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmaxa_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMAXA_D, vd, vj, vk)); -} - -/* Emits the `vfmina.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmina_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMINA_S, vd, vj, vk)); -} - -/* Emits the `vfmina.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfmina_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFMINA_D, vd, vj, vk)); -} - -/* Emits the `vfcvt.h.s vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvt_h_s(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCVT_H_S, vd, vj, vk)); -} - -/* Emits the `vfcvt.s.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvt_s_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFCVT_S_D, vd, vj, vk)); -} - -/* Emits the `vffint.s.l vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffint_s_l(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFFINT_S_L, vd, vj, vk)); -} - -/* Emits the `vftint.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftint_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFTINT_W_D, vd, vj, vk)); -} - -/* Emits the `vftintrm.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrm_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFTINTRM_W_D, vd, vj, vk)); -} - -/* Emits the `vftintrp.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrp_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFTINTRP_W_D, vd, vj, vk)); -} - -/* Emits the `vftintrz.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrz_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFTINTRZ_W_D, vd, vj, vk)); -} - -/* Emits the `vftintrne.w.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrne_w_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VFTINTRNE_W_D, vd, vj, vk)); -} - -/* Emits the `vshuf.h vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf_h(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSHUF_H, vd, vj, vk)); -} - -/* Emits the `vshuf.w vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf_w(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSHUF_W, vd, vj, vk)); -} - -/* Emits the `vshuf.d vd, vj, vk` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf_d(TCGContext *s, TCGReg vd, TCGReg vj, TCGReg vk) -{ - tcg_out32(s, encode_vdvjvk_insn(OPC_VSHUF_D, vd, vj, vk)); -} - /* Emits the `vseqi.b vd, vj, sk5` instruction. */ static void __attribute__((unused)) tcg_out_opc_vseqi_b(TCGContext *s, TCGReg vd, TCGReg vj, int32_t sk5) @@ -5258,20 +3211,6 @@ tcg_out_opc_vsubi_du(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) tcg_out32(s, encode_vdvjuk5_insn(OPC_VSUBI_DU, vd, vj, uk5)); } -/* Emits the `vbsll.v vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbsll_v(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VBSLL_V, vd, vj, uk5)); -} - -/* Emits the `vbsrl.v vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vbsrl_v(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VBSRL_V, vd, vj, uk5)); -} - /* Emits the `vmaxi.b vd, vj, sk5` instruction. */ static void __attribute__((unused)) tcg_out_opc_vmaxi_b(TCGContext *s, TCGReg vd, TCGReg vj, int32_t sk5) @@ -5384,104 +3323,6 @@ tcg_out_opc_vmini_du(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) tcg_out32(s, encode_vdvjuk5_insn(OPC_VMINI_DU, vd, vj, uk5)); } -/* Emits the `vfrstpi.b vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrstpi_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VFRSTPI_B, vd, vj, uk5)); -} - -/* Emits the `vfrstpi.h vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrstpi_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VFRSTPI_H, vd, vj, uk5)); -} - -/* Emits the `vclo.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclo_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLO_B, vd, vj)); -} - -/* Emits the `vclo.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclo_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLO_H, vd, vj)); -} - -/* Emits the `vclo.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclo_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLO_W, vd, vj)); -} - -/* Emits the `vclo.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclo_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLO_D, vd, vj)); -} - -/* Emits the `vclz.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclz_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLZ_B, vd, vj)); -} - -/* Emits the `vclz.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclz_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLZ_H, vd, vj)); -} - -/* Emits the `vclz.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclz_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLZ_W, vd, vj)); -} - -/* Emits the `vclz.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vclz_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VCLZ_D, vd, vj)); -} - -/* Emits the `vpcnt.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpcnt_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VPCNT_B, vd, vj)); -} - -/* Emits the `vpcnt.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpcnt_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VPCNT_H, vd, vj)); -} - -/* Emits the `vpcnt.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpcnt_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VPCNT_W, vd, vj)); -} - -/* Emits the `vpcnt.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vpcnt_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VPCNT_D, vd, vj)); -} - /* Emits the `vneg.b vd, vj` instruction. */ static void __attribute__((unused)) tcg_out_opc_vneg_b(TCGContext *s, TCGReg vd, TCGReg vj) @@ -5510,552 +3351,6 @@ tcg_out_opc_vneg_d(TCGContext *s, TCGReg vd, TCGReg vj) tcg_out32(s, encode_vdvj_insn(OPC_VNEG_D, vd, vj)); } -/* Emits the `vmskltz.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmskltz_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKLTZ_B, vd, vj)); -} - -/* Emits the `vmskltz.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmskltz_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKLTZ_H, vd, vj)); -} - -/* Emits the `vmskltz.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmskltz_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKLTZ_W, vd, vj)); -} - -/* Emits the `vmskltz.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmskltz_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKLTZ_D, vd, vj)); -} - -/* Emits the `vmskgez.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmskgez_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKGEZ_B, vd, vj)); -} - -/* Emits the `vmsknz.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vmsknz_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VMSKNZ_B, vd, vj)); -} - -/* Emits the `vseteqz.v cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vseteqz_v(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETEQZ_V, cd, vj)); -} - -/* Emits the `vsetnez.v cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetnez_v(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETNEZ_V, cd, vj)); -} - -/* Emits the `vsetanyeqz.b cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetanyeqz_b(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETANYEQZ_B, cd, vj)); -} - -/* Emits the `vsetanyeqz.h cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetanyeqz_h(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETANYEQZ_H, cd, vj)); -} - -/* Emits the `vsetanyeqz.w cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetanyeqz_w(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETANYEQZ_W, cd, vj)); -} - -/* Emits the `vsetanyeqz.d cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetanyeqz_d(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETANYEQZ_D, cd, vj)); -} - -/* Emits the `vsetallnez.b cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetallnez_b(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETALLNEZ_B, cd, vj)); -} - -/* Emits the `vsetallnez.h cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetallnez_h(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETALLNEZ_H, cd, vj)); -} - -/* Emits the `vsetallnez.w cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetallnez_w(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETALLNEZ_W, cd, vj)); -} - -/* Emits the `vsetallnez.d cd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsetallnez_d(TCGContext *s, TCGReg cd, TCGReg vj) -{ - tcg_out32(s, encode_cdvj_insn(OPC_VSETALLNEZ_D, cd, vj)); -} - -/* Emits the `vflogb.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vflogb_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFLOGB_S, vd, vj)); -} - -/* Emits the `vflogb.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vflogb_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFLOGB_D, vd, vj)); -} - -/* Emits the `vfclass.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfclass_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCLASS_S, vd, vj)); -} - -/* Emits the `vfclass.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfclass_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCLASS_D, vd, vj)); -} - -/* Emits the `vfsqrt.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfsqrt_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFSQRT_S, vd, vj)); -} - -/* Emits the `vfsqrt.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfsqrt_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFSQRT_D, vd, vj)); -} - -/* Emits the `vfrecip.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrecip_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRECIP_S, vd, vj)); -} - -/* Emits the `vfrecip.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrecip_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRECIP_D, vd, vj)); -} - -/* Emits the `vfrsqrt.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrsqrt_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRSQRT_S, vd, vj)); -} - -/* Emits the `vfrsqrt.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrsqrt_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRSQRT_D, vd, vj)); -} - -/* Emits the `vfrint.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrint_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINT_S, vd, vj)); -} - -/* Emits the `vfrint.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrint_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINT_D, vd, vj)); -} - -/* Emits the `vfrintrm.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrm_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRM_S, vd, vj)); -} - -/* Emits the `vfrintrm.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrm_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRM_D, vd, vj)); -} - -/* Emits the `vfrintrp.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrp_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRP_S, vd, vj)); -} - -/* Emits the `vfrintrp.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrp_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRP_D, vd, vj)); -} - -/* Emits the `vfrintrz.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrz_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRZ_S, vd, vj)); -} - -/* Emits the `vfrintrz.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrz_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRZ_D, vd, vj)); -} - -/* Emits the `vfrintrne.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrne_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRNE_S, vd, vj)); -} - -/* Emits the `vfrintrne.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfrintrne_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFRINTRNE_D, vd, vj)); -} - -/* Emits the `vfcvtl.s.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvtl_s_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCVTL_S_H, vd, vj)); -} - -/* Emits the `vfcvth.s.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvth_s_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCVTH_S_H, vd, vj)); -} - -/* Emits the `vfcvtl.d.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvtl_d_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCVTL_D_S, vd, vj)); -} - -/* Emits the `vfcvth.d.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vfcvth_d_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFCVTH_D_S, vd, vj)); -} - -/* Emits the `vffint.s.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffint_s_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINT_S_W, vd, vj)); -} - -/* Emits the `vffint.s.wu vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffint_s_wu(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINT_S_WU, vd, vj)); -} - -/* Emits the `vffint.d.l vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffint_d_l(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINT_D_L, vd, vj)); -} - -/* Emits the `vffint.d.lu vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffint_d_lu(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINT_D_LU, vd, vj)); -} - -/* Emits the `vffintl.d.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffintl_d_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINTL_D_W, vd, vj)); -} - -/* Emits the `vffinth.d.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vffinth_d_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFFINTH_D_W, vd, vj)); -} - -/* Emits the `vftint.w.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftint_w_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINT_W_S, vd, vj)); -} - -/* Emits the `vftint.l.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftint_l_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINT_L_D, vd, vj)); -} - -/* Emits the `vftintrm.w.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrm_w_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRM_W_S, vd, vj)); -} - -/* Emits the `vftintrm.l.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrm_l_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRM_L_D, vd, vj)); -} - -/* Emits the `vftintrp.w.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrp_w_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRP_W_S, vd, vj)); -} - -/* Emits the `vftintrp.l.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrp_l_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRP_L_D, vd, vj)); -} - -/* Emits the `vftintrz.w.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrz_w_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZ_W_S, vd, vj)); -} - -/* Emits the `vftintrz.l.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrz_l_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZ_L_D, vd, vj)); -} - -/* Emits the `vftintrne.w.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrne_w_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRNE_W_S, vd, vj)); -} - -/* Emits the `vftintrne.l.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrne_l_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRNE_L_D, vd, vj)); -} - -/* Emits the `vftint.wu.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftint_wu_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINT_WU_S, vd, vj)); -} - -/* Emits the `vftint.lu.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftint_lu_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINT_LU_D, vd, vj)); -} - -/* Emits the `vftintrz.wu.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrz_wu_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZ_WU_S, vd, vj)); -} - -/* Emits the `vftintrz.lu.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrz_lu_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZ_LU_D, vd, vj)); -} - -/* Emits the `vftintl.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintl_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTL_L_S, vd, vj)); -} - -/* Emits the `vftinth.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftinth_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTH_L_S, vd, vj)); -} - -/* Emits the `vftintrml.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrml_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRML_L_S, vd, vj)); -} - -/* Emits the `vftintrmh.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrmh_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRMH_L_S, vd, vj)); -} - -/* Emits the `vftintrpl.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrpl_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRPL_L_S, vd, vj)); -} - -/* Emits the `vftintrph.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrph_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRPH_L_S, vd, vj)); -} - -/* Emits the `vftintrzl.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrzl_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZL_L_S, vd, vj)); -} - -/* Emits the `vftintrzh.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrzh_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRZH_L_S, vd, vj)); -} - -/* Emits the `vftintrnel.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrnel_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRNEL_L_S, vd, vj)); -} - -/* Emits the `vftintrneh.l.s vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vftintrneh_l_s(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VFTINTRNEH_L_S, vd, vj)); -} - -/* Emits the `vexth.h.b vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_h_b(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_H_B, vd, vj)); -} - -/* Emits the `vexth.w.h vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_w_h(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_W_H, vd, vj)); -} - -/* Emits the `vexth.d.w vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_d_w(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_D_W, vd, vj)); -} - -/* Emits the `vexth.q.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_q_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_Q_D, vd, vj)); -} - -/* Emits the `vexth.hu.bu vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_hu_bu(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_HU_BU, vd, vj)); -} - -/* Emits the `vexth.wu.hu vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_wu_hu(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_WU_HU, vd, vj)); -} - -/* Emits the `vexth.du.wu vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_du_wu(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_DU_WU, vd, vj)); -} - -/* Emits the `vexth.qu.du vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vexth_qu_du(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTH_QU_DU, vd, vj)); -} - /* Emits the `vreplgr2vr.b vd, j` instruction. */ static void __attribute__((unused)) tcg_out_opc_vreplgr2vr_b(TCGContext *s, TCGReg vd, TCGReg j) @@ -6112,62 +3407,6 @@ tcg_out_opc_vrotri_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) tcg_out32(s, encode_vdvjuk6_insn(OPC_VROTRI_D, vd, vj, uk6)); } -/* Emits the `vsrlri.b vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlri_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSRLRI_B, vd, vj, uk3)); -} - -/* Emits the `vsrlri.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlri_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRLRI_H, vd, vj, uk4)); -} - -/* Emits the `vsrlri.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlri_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRLRI_W, vd, vj, uk5)); -} - -/* Emits the `vsrlri.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlri_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRLRI_D, vd, vj, uk6)); -} - -/* Emits the `vsrari.b vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrari_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSRARI_B, vd, vj, uk3)); -} - -/* Emits the `vsrari.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrari_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRARI_H, vd, vj, uk4)); -} - -/* Emits the `vsrari.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrari_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRARI_W, vd, vj, uk5)); -} - -/* Emits the `vsrari.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrari_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRARI_D, vd, vj, uk6)); -} - /* Emits the `vinsgr2vr.b vd, j, uk4` instruction. */ static void __attribute__((unused)) tcg_out_opc_vinsgr2vr_b(TCGContext *s, TCGReg vd, TCGReg j, uint32_t uk4) @@ -6280,62 +3519,6 @@ tcg_out_opc_vreplvei_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk1) tcg_out32(s, encode_vdvjuk1_insn(OPC_VREPLVEI_D, vd, vj, uk1)); } -/* Emits the `vsllwil.h.b vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_h_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSLLWIL_H_B, vd, vj, uk3)); -} - -/* Emits the `vsllwil.w.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_w_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSLLWIL_W_H, vd, vj, uk4)); -} - -/* Emits the `vsllwil.d.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_d_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSLLWIL_D_W, vd, vj, uk5)); -} - -/* Emits the `vextl.q.d vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextl_q_d(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTL_Q_D, vd, vj)); -} - -/* Emits the `vsllwil.hu.bu vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_hu_bu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSLLWIL_HU_BU, vd, vj, uk3)); -} - -/* Emits the `vsllwil.wu.hu vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_wu_hu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSLLWIL_WU_HU, vd, vj, uk4)); -} - -/* Emits the `vsllwil.du.wu vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsllwil_du_wu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSLLWIL_DU_WU, vd, vj, uk5)); -} - -/* Emits the `vextl.qu.du vd, vj` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextl_qu_du(TCGContext *s, TCGReg vd, TCGReg vj) -{ - tcg_out32(s, encode_vdvj_insn(OPC_VEXTL_QU_DU, vd, vj)); -} - /* Emits the `vbitclri.b vd, vj, uk3` instruction. */ static void __attribute__((unused)) tcg_out_opc_vbitclri_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) @@ -6420,62 +3603,6 @@ tcg_out_opc_vbitrevi_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) tcg_out32(s, encode_vdvjuk6_insn(OPC_VBITREVI_D, vd, vj, uk6)); } -/* Emits the `vsat.b vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSAT_B, vd, vj, uk3)); -} - -/* Emits the `vsat.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSAT_H, vd, vj, uk4)); -} - -/* Emits the `vsat.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSAT_W, vd, vj, uk5)); -} - -/* Emits the `vsat.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSAT_D, vd, vj, uk6)); -} - -/* Emits the `vsat.bu vd, vj, uk3` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_bu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) -{ - tcg_out32(s, encode_vdvjuk3_insn(OPC_VSAT_BU, vd, vj, uk3)); -} - -/* Emits the `vsat.hu vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_hu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSAT_HU, vd, vj, uk4)); -} - -/* Emits the `vsat.wu vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_wu(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSAT_WU, vd, vj, uk5)); -} - -/* Emits the `vsat.du vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsat_du(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSAT_DU, vd, vj, uk6)); -} - /* Emits the `vslli.b vd, vj, uk3` instruction. */ static void __attribute__((unused)) tcg_out_opc_vslli_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk3) @@ -6560,398 +3687,6 @@ tcg_out_opc_vsrai_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRAI_D, vd, vj, uk6)); } -/* Emits the `vsrlni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRLNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vsrlni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRLNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vsrlni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRLNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vsrlni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSRLNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vsrlrni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRLRNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vsrlrni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRLRNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vsrlrni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRLRNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vsrlrni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrlrni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSRLRNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrlni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRLNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vssrlni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRLNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vssrlni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRLNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vssrlni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRLNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrlni.bu.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRLNI_BU_H, vd, vj, uk4)); -} - -/* Emits the `vssrlni.hu.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRLNI_HU_W, vd, vj, uk5)); -} - -/* Emits the `vssrlni.wu.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRLNI_WU_D, vd, vj, uk6)); -} - -/* Emits the `vssrlni.du.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlni_du_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRLNI_DU_Q, vd, vj, uk7)); -} - -/* Emits the `vssrlrni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRLRNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vssrlrni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRLRNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vssrlrni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRLRNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vssrlrni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRLRNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrlrni.bu.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRLRNI_BU_H, vd, vj, uk4)); -} - -/* Emits the `vssrlrni.hu.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRLRNI_HU_W, vd, vj, uk5)); -} - -/* Emits the `vssrlrni.wu.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRLRNI_WU_D, vd, vj, uk6)); -} - -/* Emits the `vssrlrni.du.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrlrni_du_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRLRNI_DU_Q, vd, vj, uk7)); -} - -/* Emits the `vsrani.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrani_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRANI_B_H, vd, vj, uk4)); -} - -/* Emits the `vsrani.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrani_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRANI_H_W, vd, vj, uk5)); -} - -/* Emits the `vsrani.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrani_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRANI_W_D, vd, vj, uk6)); -} - -/* Emits the `vsrani.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrani_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSRANI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vsrarni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSRARNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vsrarni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSRARNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vsrarni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSRARNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vsrarni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vsrarni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSRARNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrani.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRANI_B_H, vd, vj, uk4)); -} - -/* Emits the `vssrani.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRANI_H_W, vd, vj, uk5)); -} - -/* Emits the `vssrani.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRANI_W_D, vd, vj, uk6)); -} - -/* Emits the `vssrani.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRANI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrani.bu.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRANI_BU_H, vd, vj, uk4)); -} - -/* Emits the `vssrani.hu.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRANI_HU_W, vd, vj, uk5)); -} - -/* Emits the `vssrani.wu.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRANI_WU_D, vd, vj, uk6)); -} - -/* Emits the `vssrani.du.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrani_du_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRANI_DU_Q, vd, vj, uk7)); -} - -/* Emits the `vssrarni.b.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_b_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRARNI_B_H, vd, vj, uk4)); -} - -/* Emits the `vssrarni.h.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_h_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRARNI_H_W, vd, vj, uk5)); -} - -/* Emits the `vssrarni.w.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_w_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRARNI_W_D, vd, vj, uk6)); -} - -/* Emits the `vssrarni.d.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_d_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRARNI_D_Q, vd, vj, uk7)); -} - -/* Emits the `vssrarni.bu.h vd, vj, uk4` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_bu_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk4) -{ - tcg_out32(s, encode_vdvjuk4_insn(OPC_VSSRARNI_BU_H, vd, vj, uk4)); -} - -/* Emits the `vssrarni.hu.w vd, vj, uk5` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_hu_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk5) -{ - tcg_out32(s, encode_vdvjuk5_insn(OPC_VSSRARNI_HU_W, vd, vj, uk5)); -} - -/* Emits the `vssrarni.wu.d vd, vj, uk6` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_wu_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk6) -{ - tcg_out32(s, encode_vdvjuk6_insn(OPC_VSSRARNI_WU_D, vd, vj, uk6)); -} - -/* Emits the `vssrarni.du.q vd, vj, uk7` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vssrarni_du_q(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk7) -{ - tcg_out32(s, encode_vdvjuk7_insn(OPC_VSSRARNI_DU_Q, vd, vj, uk7)); -} - -/* Emits the `vextrins.d vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextrins_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VEXTRINS_D, vd, vj, uk8)); -} - -/* Emits the `vextrins.w vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextrins_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VEXTRINS_W, vd, vj, uk8)); -} - -/* Emits the `vextrins.h vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextrins_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VEXTRINS_H, vd, vj, uk8)); -} - -/* Emits the `vextrins.b vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vextrins_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VEXTRINS_B, vd, vj, uk8)); -} - -/* Emits the `vshuf4i.b vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf4i_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VSHUF4I_B, vd, vj, uk8)); -} - -/* Emits the `vshuf4i.h vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf4i_h(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VSHUF4I_H, vd, vj, uk8)); -} - -/* Emits the `vshuf4i.w vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf4i_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VSHUF4I_W, vd, vj, uk8)); -} - -/* Emits the `vshuf4i.d vd, vj, uk8` instruction. */ -static void __attribute__((unused)) -tcg_out_opc_vshuf4i_d(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) -{ - tcg_out32(s, encode_vdvjuk8_insn(OPC_VSHUF4I_D, vd, vj, uk8)); -} - /* Emits the `vbitseli.b vd, vj, uk8` instruction. */ static void __attribute__((unused)) tcg_out_opc_vbitseli_b(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) @@ -6994,11 +3729,1341 @@ tcg_out_opc_vldi(TCGContext *s, TCGReg vd, int32_t sj13) tcg_out32(s, encode_vdsj13_insn(OPC_VLDI, vd, sj13)); } -/* Emits the `vpermi.w vd, vj, uk8` instruction. */ +/* Emits the `xvseq.b xd, xj, xk` instruction. */ static void __attribute__((unused)) -tcg_out_opc_vpermi_w(TCGContext *s, TCGReg vd, TCGReg vj, uint32_t uk8) +tcg_out_opc_xvseq_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) { - tcg_out32(s, encode_vdvjuk8_insn(OPC_VPERMI_W, vd, vj, uk8)); + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSEQ_B, xd, xj, xk)); +} + +/* Emits the `xvseq.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseq_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSEQ_H, xd, xj, xk)); +} + +/* Emits the `xvseq.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseq_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSEQ_W, xd, xj, xk)); +} + +/* Emits the `xvseq.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseq_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSEQ_D, xd, xj, xk)); +} + +/* Emits the `xvsle.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_B, xd, xj, xk)); +} + +/* Emits the `xvsle.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_H, xd, xj, xk)); +} + +/* Emits the `xvsle.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_W, xd, xj, xk)); +} + +/* Emits the `xvsle.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_D, xd, xj, xk)); +} + +/* Emits the `xvsle.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_BU, xd, xj, xk)); +} + +/* Emits the `xvsle.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_HU, xd, xj, xk)); +} + +/* Emits the `xvsle.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_WU, xd, xj, xk)); +} + +/* Emits the `xvsle.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsle_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLE_DU, xd, xj, xk)); +} + +/* Emits the `xvslt.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_B, xd, xj, xk)); +} + +/* Emits the `xvslt.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_H, xd, xj, xk)); +} + +/* Emits the `xvslt.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_W, xd, xj, xk)); +} + +/* Emits the `xvslt.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_D, xd, xj, xk)); +} + +/* Emits the `xvslt.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_BU, xd, xj, xk)); +} + +/* Emits the `xvslt.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_HU, xd, xj, xk)); +} + +/* Emits the `xvslt.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_WU, xd, xj, xk)); +} + +/* Emits the `xvslt.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslt_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLT_DU, xd, xj, xk)); +} + +/* Emits the `xvadd.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvadd_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVADD_B, xd, xj, xk)); +} + +/* Emits the `xvadd.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvadd_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVADD_H, xd, xj, xk)); +} + +/* Emits the `xvadd.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvadd_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVADD_W, xd, xj, xk)); +} + +/* Emits the `xvadd.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvadd_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVADD_D, xd, xj, xk)); +} + +/* Emits the `xvsub.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsub_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSUB_B, xd, xj, xk)); +} + +/* Emits the `xvsub.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsub_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSUB_H, xd, xj, xk)); +} + +/* Emits the `xvsub.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsub_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSUB_W, xd, xj, xk)); +} + +/* Emits the `xvsub.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsub_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSUB_D, xd, xj, xk)); +} + +/* Emits the `xvsadd.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_B, xd, xj, xk)); +} + +/* Emits the `xvsadd.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_H, xd, xj, xk)); +} + +/* Emits the `xvsadd.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_W, xd, xj, xk)); +} + +/* Emits the `xvsadd.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_D, xd, xj, xk)); +} + +/* Emits the `xvssub.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_B, xd, xj, xk)); +} + +/* Emits the `xvssub.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_H, xd, xj, xk)); +} + +/* Emits the `xvssub.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_W, xd, xj, xk)); +} + +/* Emits the `xvssub.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_D, xd, xj, xk)); +} + +/* Emits the `xvsadd.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_BU, xd, xj, xk)); +} + +/* Emits the `xvsadd.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_HU, xd, xj, xk)); +} + +/* Emits the `xvsadd.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_WU, xd, xj, xk)); +} + +/* Emits the `xvsadd.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsadd_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSADD_DU, xd, xj, xk)); +} + +/* Emits the `xvssub.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_BU, xd, xj, xk)); +} + +/* Emits the `xvssub.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_HU, xd, xj, xk)); +} + +/* Emits the `xvssub.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_WU, xd, xj, xk)); +} + +/* Emits the `xvssub.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvssub_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSSUB_DU, xd, xj, xk)); +} + +/* Emits the `xvmax.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_B, xd, xj, xk)); +} + +/* Emits the `xvmax.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_H, xd, xj, xk)); +} + +/* Emits the `xvmax.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_W, xd, xj, xk)); +} + +/* Emits the `xvmax.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_D, xd, xj, xk)); +} + +/* Emits the `xvmin.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_B, xd, xj, xk)); +} + +/* Emits the `xvmin.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_H, xd, xj, xk)); +} + +/* Emits the `xvmin.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_W, xd, xj, xk)); +} + +/* Emits the `xvmin.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_D, xd, xj, xk)); +} + +/* Emits the `xvmax.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_BU, xd, xj, xk)); +} + +/* Emits the `xvmax.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_HU, xd, xj, xk)); +} + +/* Emits the `xvmax.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_WU, xd, xj, xk)); +} + +/* Emits the `xvmax.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmax_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMAX_DU, xd, xj, xk)); +} + +/* Emits the `xvmin.bu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_bu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_BU, xd, xj, xk)); +} + +/* Emits the `xvmin.hu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_hu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_HU, xd, xj, xk)); +} + +/* Emits the `xvmin.wu xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_wu(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_WU, xd, xj, xk)); +} + +/* Emits the `xvmin.du xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmin_du(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMIN_DU, xd, xj, xk)); +} + +/* Emits the `xvmul.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmul_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMUL_B, xd, xj, xk)); +} + +/* Emits the `xvmul.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmul_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMUL_H, xd, xj, xk)); +} + +/* Emits the `xvmul.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmul_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMUL_W, xd, xj, xk)); +} + +/* Emits the `xvmul.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmul_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVMUL_D, xd, xj, xk)); +} + +/* Emits the `xvsll.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsll_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLL_B, xd, xj, xk)); +} + +/* Emits the `xvsll.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsll_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLL_H, xd, xj, xk)); +} + +/* Emits the `xvsll.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsll_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLL_W, xd, xj, xk)); +} + +/* Emits the `xvsll.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsll_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSLL_D, xd, xj, xk)); +} + +/* Emits the `xvsrl.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrl_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRL_B, xd, xj, xk)); +} + +/* Emits the `xvsrl.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrl_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRL_H, xd, xj, xk)); +} + +/* Emits the `xvsrl.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrl_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRL_W, xd, xj, xk)); +} + +/* Emits the `xvsrl.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrl_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRL_D, xd, xj, xk)); +} + +/* Emits the `xvsra.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsra_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRA_B, xd, xj, xk)); +} + +/* Emits the `xvsra.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsra_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRA_H, xd, xj, xk)); +} + +/* Emits the `xvsra.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsra_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRA_W, xd, xj, xk)); +} + +/* Emits the `xvsra.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsra_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVSRA_D, xd, xj, xk)); +} + +/* Emits the `xvrotr.b xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotr_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVROTR_B, xd, xj, xk)); +} + +/* Emits the `xvrotr.h xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotr_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVROTR_H, xd, xj, xk)); +} + +/* Emits the `xvrotr.w xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotr_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVROTR_W, xd, xj, xk)); +} + +/* Emits the `xvrotr.d xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotr_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVROTR_D, xd, xj, xk)); +} + +/* Emits the `xvreplve.b xd, xj, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve_b(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg k) +{ + tcg_out32(s, encode_xdxjk_insn(OPC_XVREPLVE_B, xd, xj, k)); +} + +/* Emits the `xvreplve.h xd, xj, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve_h(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg k) +{ + tcg_out32(s, encode_xdxjk_insn(OPC_XVREPLVE_H, xd, xj, k)); +} + +/* Emits the `xvreplve.w xd, xj, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve_w(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg k) +{ + tcg_out32(s, encode_xdxjk_insn(OPC_XVREPLVE_W, xd, xj, k)); +} + +/* Emits the `xvreplve.d xd, xj, k` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve_d(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg k) +{ + tcg_out32(s, encode_xdxjk_insn(OPC_XVREPLVE_D, xd, xj, k)); +} + +/* Emits the `xvand.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvand_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVAND_V, xd, xj, xk)); +} + +/* Emits the `xvor.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvor_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVOR_V, xd, xj, xk)); +} + +/* Emits the `xvxor.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvxor_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVXOR_V, xd, xj, xk)); +} + +/* Emits the `xvnor.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvnor_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVNOR_V, xd, xj, xk)); +} + +/* Emits the `xvandn.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvandn_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVANDN_V, xd, xj, xk)); +} + +/* Emits the `xvorn.v xd, xj, xk` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvorn_v(TCGContext *s, TCGReg xd, TCGReg xj, TCGReg xk) +{ + tcg_out32(s, encode_xdxjxk_insn(OPC_XVORN_V, xd, xj, xk)); +} + +/* Emits the `xvseqi.b xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseqi_b(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSEQI_B, xd, xj, sk5)); +} + +/* Emits the `xvseqi.h xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseqi_h(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSEQI_H, xd, xj, sk5)); +} + +/* Emits the `xvseqi.w xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseqi_w(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSEQI_W, xd, xj, sk5)); +} + +/* Emits the `xvseqi.d xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvseqi_d(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSEQI_D, xd, xj, sk5)); +} + +/* Emits the `xvslei.b xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_b(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLEI_B, xd, xj, sk5)); +} + +/* Emits the `xvslei.h xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_h(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLEI_H, xd, xj, sk5)); +} + +/* Emits the `xvslei.w xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_w(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLEI_W, xd, xj, sk5)); +} + +/* Emits the `xvslei.d xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_d(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLEI_D, xd, xj, sk5)); +} + +/* Emits the `xvslei.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLEI_BU, xd, xj, uk5)); +} + +/* Emits the `xvslei.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLEI_HU, xd, xj, uk5)); +} + +/* Emits the `xvslei.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLEI_WU, xd, xj, uk5)); +} + +/* Emits the `xvslei.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslei_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLEI_DU, xd, xj, uk5)); +} + +/* Emits the `xvslti.b xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_b(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLTI_B, xd, xj, sk5)); +} + +/* Emits the `xvslti.h xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_h(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLTI_H, xd, xj, sk5)); +} + +/* Emits the `xvslti.w xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_w(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLTI_W, xd, xj, sk5)); +} + +/* Emits the `xvslti.d xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_d(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVSLTI_D, xd, xj, sk5)); +} + +/* Emits the `xvslti.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLTI_BU, xd, xj, uk5)); +} + +/* Emits the `xvslti.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLTI_HU, xd, xj, uk5)); +} + +/* Emits the `xvslti.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLTI_WU, xd, xj, uk5)); +} + +/* Emits the `xvslti.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslti_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLTI_DU, xd, xj, uk5)); +} + +/* Emits the `xvaddi.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvaddi_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVADDI_BU, xd, xj, uk5)); +} + +/* Emits the `xvaddi.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvaddi_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVADDI_HU, xd, xj, uk5)); +} + +/* Emits the `xvaddi.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvaddi_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVADDI_WU, xd, xj, uk5)); +} + +/* Emits the `xvaddi.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvaddi_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVADDI_DU, xd, xj, uk5)); +} + +/* Emits the `xvsubi.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsubi_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSUBI_BU, xd, xj, uk5)); +} + +/* Emits the `xvsubi.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsubi_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSUBI_HU, xd, xj, uk5)); +} + +/* Emits the `xvsubi.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsubi_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSUBI_WU, xd, xj, uk5)); +} + +/* Emits the `xvsubi.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsubi_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSUBI_DU, xd, xj, uk5)); +} + +/* Emits the `xvmaxi.b xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_b(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMAXI_B, xd, xj, sk5)); +} + +/* Emits the `xvmaxi.h xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_h(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMAXI_H, xd, xj, sk5)); +} + +/* Emits the `xvmaxi.w xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_w(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMAXI_W, xd, xj, sk5)); +} + +/* Emits the `xvmaxi.d xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_d(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMAXI_D, xd, xj, sk5)); +} + +/* Emits the `xvmini.b xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_b(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMINI_B, xd, xj, sk5)); +} + +/* Emits the `xvmini.h xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_h(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMINI_H, xd, xj, sk5)); +} + +/* Emits the `xvmini.w xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_w(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMINI_W, xd, xj, sk5)); +} + +/* Emits the `xvmini.d xd, xj, sk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_d(TCGContext *s, TCGReg xd, TCGReg xj, int32_t sk5) +{ + tcg_out32(s, encode_xdxjsk5_insn(OPC_XVMINI_D, xd, xj, sk5)); +} + +/* Emits the `xvmaxi.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMAXI_BU, xd, xj, uk5)); +} + +/* Emits the `xvmaxi.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMAXI_HU, xd, xj, uk5)); +} + +/* Emits the `xvmaxi.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMAXI_WU, xd, xj, uk5)); +} + +/* Emits the `xvmaxi.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmaxi_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMAXI_DU, xd, xj, uk5)); +} + +/* Emits the `xvmini.bu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_bu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMINI_BU, xd, xj, uk5)); +} + +/* Emits the `xvmini.hu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_hu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMINI_HU, xd, xj, uk5)); +} + +/* Emits the `xvmini.wu xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_wu(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMINI_WU, xd, xj, uk5)); +} + +/* Emits the `xvmini.du xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvmini_du(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVMINI_DU, xd, xj, uk5)); +} + +/* Emits the `xvneg.b xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvneg_b(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVNEG_B, xd, xj)); +} + +/* Emits the `xvneg.h xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvneg_h(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVNEG_H, xd, xj)); +} + +/* Emits the `xvneg.w xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvneg_w(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVNEG_W, xd, xj)); +} + +/* Emits the `xvneg.d xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvneg_d(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVNEG_D, xd, xj)); +} + +/* Emits the `xvreplgr2vr.b xd, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplgr2vr_b(TCGContext *s, TCGReg xd, TCGReg j) +{ + tcg_out32(s, encode_xdj_insn(OPC_XVREPLGR2VR_B, xd, j)); +} + +/* Emits the `xvreplgr2vr.h xd, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplgr2vr_h(TCGContext *s, TCGReg xd, TCGReg j) +{ + tcg_out32(s, encode_xdj_insn(OPC_XVREPLGR2VR_H, xd, j)); +} + +/* Emits the `xvreplgr2vr.w xd, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplgr2vr_w(TCGContext *s, TCGReg xd, TCGReg j) +{ + tcg_out32(s, encode_xdj_insn(OPC_XVREPLGR2VR_W, xd, j)); +} + +/* Emits the `xvreplgr2vr.d xd, j` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplgr2vr_d(TCGContext *s, TCGReg xd, TCGReg j) +{ + tcg_out32(s, encode_xdj_insn(OPC_XVREPLGR2VR_D, xd, j)); +} + +/* Emits the `xvrotri.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotri_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVROTRI_B, xd, xj, uk3)); +} + +/* Emits the `xvrotri.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotri_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVROTRI_H, xd, xj, uk4)); +} + +/* Emits the `xvrotri.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotri_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVROTRI_W, xd, xj, uk5)); +} + +/* Emits the `xvrotri.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrotri_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVROTRI_D, xd, xj, uk6)); +} + +/* Emits the `xvinsgr2vr.w xd, j, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvinsgr2vr_w(TCGContext *s, TCGReg xd, TCGReg j, uint32_t uk3) +{ + tcg_out32(s, encode_xdjuk3_insn(OPC_XVINSGR2VR_W, xd, j, uk3)); +} + +/* Emits the `xvinsgr2vr.d xd, j, uk2` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvinsgr2vr_d(TCGContext *s, TCGReg xd, TCGReg j, uint32_t uk2) +{ + tcg_out32(s, encode_xdjuk2_insn(OPC_XVINSGR2VR_D, xd, j, uk2)); +} + +/* Emits the `xvpickve2gr.w d, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvpickve2gr_w(TCGContext *s, TCGReg d, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_dxjuk3_insn(OPC_XVPICKVE2GR_W, d, xj, uk3)); +} + +/* Emits the `xvpickve2gr.d d, xj, uk2` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvpickve2gr_d(TCGContext *s, TCGReg d, TCGReg xj, uint32_t uk2) +{ + tcg_out32(s, encode_dxjuk2_insn(OPC_XVPICKVE2GR_D, d, xj, uk2)); +} + +/* Emits the `xvpickve2gr.wu d, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvpickve2gr_wu(TCGContext *s, TCGReg d, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_dxjuk3_insn(OPC_XVPICKVE2GR_WU, d, xj, uk3)); +} + +/* Emits the `xvpickve2gr.du d, xj, uk2` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvpickve2gr_du(TCGContext *s, TCGReg d, TCGReg xj, uint32_t uk2) +{ + tcg_out32(s, encode_dxjuk2_insn(OPC_XVPICKVE2GR_DU, d, xj, uk2)); +} + +/* Emits the `xvrepl128vei.b xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrepl128vei_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVREPL128VEI_B, xd, xj, uk4)); +} + +/* Emits the `xvrepl128vei.h xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrepl128vei_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVREPL128VEI_H, xd, xj, uk3)); +} + +/* Emits the `xvrepl128vei.w xd, xj, uk2` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrepl128vei_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk2) +{ + tcg_out32(s, encode_xdxjuk2_insn(OPC_XVREPL128VEI_W, xd, xj, uk2)); +} + +/* Emits the `xvrepl128vei.d xd, xj, uk1` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvrepl128vei_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk1) +{ + tcg_out32(s, encode_xdxjuk1_insn(OPC_XVREPL128VEI_D, xd, xj, uk1)); +} + +/* Emits the `xvreplve0.b xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve0_b(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVREPLVE0_B, xd, xj)); +} + +/* Emits the `xvreplve0.h xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve0_h(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVREPLVE0_H, xd, xj)); +} + +/* Emits the `xvreplve0.w xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve0_w(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVREPLVE0_W, xd, xj)); +} + +/* Emits the `xvreplve0.d xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve0_d(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVREPLVE0_D, xd, xj)); +} + +/* Emits the `xvreplve0.q xd, xj` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvreplve0_q(TCGContext *s, TCGReg xd, TCGReg xj) +{ + tcg_out32(s, encode_xdxj_insn(OPC_XVREPLVE0_Q, xd, xj)); +} + +/* Emits the `xvbitclri.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitclri_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVBITCLRI_B, xd, xj, uk3)); +} + +/* Emits the `xvbitclri.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitclri_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVBITCLRI_H, xd, xj, uk4)); +} + +/* Emits the `xvbitclri.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitclri_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVBITCLRI_W, xd, xj, uk5)); +} + +/* Emits the `xvbitclri.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitclri_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVBITCLRI_D, xd, xj, uk6)); +} + +/* Emits the `xvbitseti.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitseti_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVBITSETI_B, xd, xj, uk3)); +} + +/* Emits the `xvbitseti.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitseti_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVBITSETI_H, xd, xj, uk4)); +} + +/* Emits the `xvbitseti.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitseti_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVBITSETI_W, xd, xj, uk5)); +} + +/* Emits the `xvbitseti.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitseti_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVBITSETI_D, xd, xj, uk6)); +} + +/* Emits the `xvbitrevi.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitrevi_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVBITREVI_B, xd, xj, uk3)); +} + +/* Emits the `xvbitrevi.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitrevi_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVBITREVI_H, xd, xj, uk4)); +} + +/* Emits the `xvbitrevi.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitrevi_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVBITREVI_W, xd, xj, uk5)); +} + +/* Emits the `xvbitrevi.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitrevi_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVBITREVI_D, xd, xj, uk6)); +} + +/* Emits the `xvslli.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslli_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVSLLI_B, xd, xj, uk3)); +} + +/* Emits the `xvslli.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslli_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVSLLI_H, xd, xj, uk4)); +} + +/* Emits the `xvslli.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslli_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSLLI_W, xd, xj, uk5)); +} + +/* Emits the `xvslli.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvslli_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVSLLI_D, xd, xj, uk6)); +} + +/* Emits the `xvsrli.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrli_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVSRLI_B, xd, xj, uk3)); +} + +/* Emits the `xvsrli.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrli_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVSRLI_H, xd, xj, uk4)); +} + +/* Emits the `xvsrli.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrli_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSRLI_W, xd, xj, uk5)); +} + +/* Emits the `xvsrli.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrli_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVSRLI_D, xd, xj, uk6)); +} + +/* Emits the `xvsrai.b xd, xj, uk3` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrai_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk3) +{ + tcg_out32(s, encode_xdxjuk3_insn(OPC_XVSRAI_B, xd, xj, uk3)); +} + +/* Emits the `xvsrai.h xd, xj, uk4` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrai_h(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk4) +{ + tcg_out32(s, encode_xdxjuk4_insn(OPC_XVSRAI_H, xd, xj, uk4)); +} + +/* Emits the `xvsrai.w xd, xj, uk5` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrai_w(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk5) +{ + tcg_out32(s, encode_xdxjuk5_insn(OPC_XVSRAI_W, xd, xj, uk5)); +} + +/* Emits the `xvsrai.d xd, xj, uk6` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvsrai_d(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk6) +{ + tcg_out32(s, encode_xdxjuk6_insn(OPC_XVSRAI_D, xd, xj, uk6)); +} + +/* Emits the `xvbitseli.b xd, xj, uk8` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvbitseli_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_out32(s, encode_xdxjuk8_insn(OPC_XVBITSELI_B, xd, xj, uk8)); +} + +/* Emits the `xvandi.b xd, xj, uk8` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvandi_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_out32(s, encode_xdxjuk8_insn(OPC_XVANDI_B, xd, xj, uk8)); +} + +/* Emits the `xvori.b xd, xj, uk8` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvori_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_out32(s, encode_xdxjuk8_insn(OPC_XVORI_B, xd, xj, uk8)); +} + +/* Emits the `xvxori.b xd, xj, uk8` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvxori_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_out32(s, encode_xdxjuk8_insn(OPC_XVXORI_B, xd, xj, uk8)); +} + +/* Emits the `xvnori.b xd, xj, uk8` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvnori_b(TCGContext *s, TCGReg xd, TCGReg xj, uint32_t uk8) +{ + tcg_out32(s, encode_xdxjuk8_insn(OPC_XVNORI_B, xd, xj, uk8)); +} + +/* Emits the `xvldi xd, sj13` instruction. */ +static void __attribute__((unused)) +tcg_out_opc_xvldi(TCGContext *s, TCGReg xd, int32_t sj13) +{ + tcg_out32(s, encode_xdsj13_insn(OPC_XVLDI, xd, sj13)); } /* End of generated code. */ From patchwork Wed Jun 19 20:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805629 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp13925wrt; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUyB/KJdY7kq3QilnASblkg4UF7K8j7X/tMbgN6LBacLpGC12mR3BRXDguPXT+rhin3YF/0FOwWNoH04IaHsUy4 X-Google-Smtp-Source: AGHT+IEPNT1WpOBIqE8PFKiyGhclzO2t6J79YwgJSt4FlYMjjUtsxm5JQgTJpVWK8wlH9+xO0rYW X-Received: by 2002:a05:622a:13d2:b0:43b:173e:ce1b with SMTP id d75a77b69052e-4449bccdf44mr111510271cf.32.1718830885641; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830885; cv=none; d=google.com; s=arc-20160816; b=CAMCZvgiPYptbcikfM0ob1seDgmXzAkfqckaxqF3zwh/CbGAySqwpzOBhvLn90qDhG t/g57XNsgGYYalOCRuhgoOUsORMnme7NdBtLPohbPtT/maG75qZcXBj940eurbu2ZtjM AEPDIGfX/0ZrGcK/Qk4/M/WrwNtyDXCQvqpmdI7i/Lc0oYrdo796FA4mptc7/nuDmzFf Ma7DZc9FDfvT9tu1g6p9F62MS1AGrp+EjCD38hOXE5+0mInlVXL25XdcOzPyFXEd13Uh s7QFk4WRhaEsgstI8xL3xWCfs5zR1Ko0DgM8FZizLRp00DPM4gojxxKW9HYtq+pntP6s FRtg== 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=Dk6gzrY5wVGVjX9UiuPPxDKISH/FVUDrirn7QtI44Ak=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=dXnGZEh7jHOKExf+2pVqch06OAmcRthkhl3t0vrqQoDb+Sh4NFImTkDY1sErWjTXW/ biUZ0ojoN5jhKDl+cUq9XKNTHUuVE9CxCxuksabRo6b7yaSgeIzpTzwDNuuCXvA6JUlH 0aTiSzpmWowdd1UR3Ww79qUSK4I2J2Dz+G8pL/rXpHGZ6QtjsQkTERTWZRm4shleaHOt ql9nI2NjuvOt743xwaK3BMQ/5NUisfB2Z4EFc4U3ZBZ4Jd7V/wlcZjWeC6ZHjpbuhL2q QFjk7sPNAWF0PEuPKPn2zmA/M8ehzrcPNFZLmzbRL9D9rVksHkOjzBr38TgI+o08ScUN aqpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kBiJpJkM; 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-441f2eab1cdsi155840151cf.262.2024.06.19.14.01.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:25 -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=kBiJpJkM; 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 1sK2PR-0002BI-Fc; Wed, 19 Jun 2024 17:00:01 -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 1sK2PP-0002A0-9P for qemu-devel@nongnu.org; Wed, 19 Jun 2024 16:59:59 -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 1sK2PN-0000J7-Ny for qemu-devel@nongnu.org; Wed, 19 Jun 2024 16:59:59 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1f9bf484d9fso3690315ad.1 for ; Wed, 19 Jun 2024 13:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830796; x=1719435596; 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=Dk6gzrY5wVGVjX9UiuPPxDKISH/FVUDrirn7QtI44Ak=; b=kBiJpJkMvgOyqXQy3lcVKvmUzOhRrZLjm5hoFPB5BiXpYlqlXoYbXKlvI/t6GIdSyf F0W/IdRE7fIKndekisG3S1WxTgyE2dMu6LvgSyMsAIXOXAZjTuTOwU2KDNOpnnZlexHf RnwKj8vc8yZWA+n+ieUUwjgAl66QMzSVN21yyzWR2warVTidroTZpD/KbJP57NSTTAT4 aS4vAKEdZ3KNuFv2pwn9UKZZ/NZrlwRr+ClAJNOnZeozsim1SR+vjTI5cszg7gectwFJ l3kc6SM7Q2BjXY6NZOGnl+B8jNn4XgHGUcApZ4Crg49j8NAKlqURJWNGDK4qIMCXwHZi S+Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830796; x=1719435596; 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=Dk6gzrY5wVGVjX9UiuPPxDKISH/FVUDrirn7QtI44Ak=; b=mqcHIrvKUAhPpJe5eAMfoKOZu38nJzDgm+CV9AhcgTMyVToddQhMlWsA5aGlI8tfkz LJn6xSCaYRO+8FGhamhmOPNET4wG151v/Dx2c1GAnI4JKIPkVIuIWkXFkBszrThk6MxK Gi8jUMXr59vdA+noh1zQuYuSyUezKw/5+L9HZmFpH3+lx16TurEFfwe15wDGvEi07qyz 5XuY0xHfM3W0OvQXeC2vSpLoXKo9ASuEejqwZFLlwo/wmSf62jeBlwytKpmrfwW84DLf 8QO4nexfZ6fTzYLOSjwSLWhe91p1o8DEx0hQmuJuqhVvKHn+maBNeXoTwM2W/pQ7xqaX 1Zhg== X-Gm-Message-State: AOJu0YymUCzJ+LQa9rCRcifSrj/ksShSNgHRc3KfmaNeCCi/J3Kl1veQ fediUwO9/X9sjr1ldKXwD5y1TRDQWGIjjaeTYgbxOqz/JKsPevbZ8v5A88rx0Pa6e50CwsHQnL3 q X-Received: by 2002:a17:902:f791:b0:1f6:32ef:3e00 with SMTP id d9443c01a7336-1f98b12905amr99512905ad.0.1718830795679; Wed, 19 Jun 2024 13:59:55 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 02/24] tcg/loongarch64: Use fp load/store for I32 and I64 into vector regs Date: Wed, 19 Jun 2024 13:59:30 -0700 Message-Id: <20240619205952.235946-3-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 | 36 +++++++++----------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 06ca1ab11c..b9078ac793 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -803,6 +803,12 @@ static void tcg_out_ldst(TCGContext *s, LoongArchInsn opc, TCGReg data, case OPC_ST_D: tcg_out32(s, encode_djsk12_insn(opc, data, addr, imm12)); break; + case OPC_FLD_S: + case OPC_FLD_D: + case OPC_FST_S: + case OPC_FST_D: + tcg_out32(s, encode_fdjsk12_insn(opc, data, addr, imm12)); + break; default: g_assert_not_reached(); } @@ -816,14 +822,14 @@ static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg dest, if (dest < TCG_REG_V0) { tcg_out_ldst(s, OPC_LD_W, dest, base, offset); } else { - tcg_out_dupm_vec(s, TCG_TYPE_I128, MO_32, dest, base, offset); + tcg_out_ldst(s, OPC_FLD_S, dest, base, offset); } break; case TCG_TYPE_I64: if (dest < TCG_REG_V0) { tcg_out_ldst(s, OPC_LD_D, dest, base, offset); } else { - tcg_out_dupm_vec(s, TCG_TYPE_I128, MO_64, dest, base, offset); + tcg_out_ldst(s, OPC_FLD_D, dest, base, offset); } break; case TCG_TYPE_V128: @@ -847,36 +853,14 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg src, if (src < TCG_REG_V0) { tcg_out_ldst(s, OPC_ST_W, src, base, offset); } else { - /* TODO: Could use fst_s, fstx_s */ - if (offset < -0x100 || offset > 0xff || (offset & 3)) { - if (-0x800 <= offset && offset <= 0x7ff) { - tcg_out_opc_addi_d(s, TCG_REG_TMP0, base, offset); - } else { - tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset); - tcg_out_opc_add_d(s, TCG_REG_TMP0, TCG_REG_TMP0, base); - } - base = TCG_REG_TMP0; - offset = 0; - } - tcg_out_opc_vstelm_w(s, src, base, offset, 0); + tcg_out_ldst(s, OPC_FST_S, src, base, offset); } break; case TCG_TYPE_I64: if (src < TCG_REG_V0) { tcg_out_ldst(s, OPC_ST_D, src, base, offset); } else { - /* TODO: Could use fst_d, fstx_d */ - if (offset < -0x100 || offset > 0xff || (offset & 7)) { - if (-0x800 <= offset && offset <= 0x7ff) { - tcg_out_opc_addi_d(s, TCG_REG_TMP0, base, offset); - } else { - tcg_out_movi(s, TCG_TYPE_PTR, TCG_REG_TMP0, offset); - tcg_out_opc_add_d(s, TCG_REG_TMP0, TCG_REG_TMP0, base); - } - base = TCG_REG_TMP0; - offset = 0; - } - tcg_out_opc_vstelm_d(s, src, base, offset, 0); + tcg_out_ldst(s, OPC_FST_D, src, base, offset); } break; case TCG_TYPE_V128: From patchwork Wed Jun 19 20:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805638 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14235wrt; Wed, 19 Jun 2024 14:02:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWas5LVWo/cQ3BPLQb8KSSAdbIKqRxo3kDZeVUUxAxG+kwTf8YPNm1EDKsPr8NR5Q7BmSIccuP+iFppYMtURBUG X-Google-Smtp-Source: AGHT+IHV479JKyA1Jk5g4Bsgfdc6cyA5rTkFZ9ROqZ18OmuDPdW7sXG2nh0avjuOkrOYQaMafhtO X-Received: by 2002:a05:6830:1390:b0:6f9:7010:3ba with SMTP id 46e09a7af769-70073e29c71mr3852872a34.16.1718830927187; Wed, 19 Jun 2024 14:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830927; cv=none; d=google.com; s=arc-20160816; b=IrCkag/GO3kfrR1bvT+9XQ8VbnICX/ZeaaWAM2KGSaiQxNN3W0rpBZ7z3A5Phhx1Ev UYEQClS17fJwx26F9xWamhhl7wLgP113x/AbdZDEw708+kUe+iAlZzfNGqFGe7FSdpEs BHPmY7PrgJE6MgtCanXgRljEIimjmIOWw0S6aGZF1dK8cWs5jb1xlj0v9TctYDQEd6xZ LNm+txPuvHPEBd7e515rXa52bWBrlDboHe4Igjhkg5WyfJFoI88EORz2se1fKHJjuOHT iMgw4FnPDSTNBW5yYyel53UjR+GGlP4Ujh18PDgUJTFXDpT1Dtp1SAxaoifmK/+H4zUN 794Q== 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=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=s0bbwyFIpcXr4gmfjZ2EiLg+TTTbrWox61BHCFOGGRjDmbVFqSkJnHbMP+RX0UH4HP B6W/TUnUU+qz4nlMmvgFjFAUgfwse6cmHdwMna4nY8pVJmdFZ8VrMHElzBcvX7yFdYLW W2EE4eReUdmuZs0vU1zu0h/6qqfyerdwGRjeGoqez6tMrX0s3N8MXB+/Sj83+DfQioX1 MFmRlzWQdgou+0NW3fmsoN0qMirmzSXP9bNH3Qqo4uL+t/hAcz35KXZ88X3kSV3XAEe8 2MIV1YESuZd1tUBqf3ZwO9jU7Uya2YTSOlIJKFfLghycNHENclh1gUvYU9zcxYKTAgHO G6SQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cH/EVC5N"; 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-6b50f881467si7193616d6.31.2024.06.19.14.02.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:07 -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="cH/EVC5N"; 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 1sK2PS-0002Br-Ny; Wed, 19 Jun 2024 17:00:02 -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 1sK2PQ-0002AO-4O for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:00 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PO-0000JO-HX for qemu-devel@nongnu.org; Wed, 19 Jun 2024 16:59:59 -0400 Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-656d8b346d2so158975a12.2 for ; Wed, 19 Jun 2024 13:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830796; x=1719435596; 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=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; b=cH/EVC5NeAVNDE2e5YHkq1FIrmHm7M55IXSHCURsdPgRBMnxvisW8ubOknjTDxiS43 NvNlbN618Ai1ToDryqVLqif9XAk2hNQ1NYVNqD5QmRhgRHE1Jzfxw99AXk7IbAdIHKnx 6fR95Sy0J0Z7FBhAWt74l0ivQ5PrycDh7bEmLg0ssMACbgzDUzoDxg/w1oHvxU4dbxp5 ksYI305jNE56yFJrMzKRUcETIQjY0P/Zm+h0yG/Ol0An7UyN6I/6ceqkhslA4wUWpdaN hPubuvT4oEwCdr441WjbhWHEcW/QWKgjcriHH47CQqI6am+ia1bTTdKpa0A8lXtD21s1 L6dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830796; x=1719435596; 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=sJSgr0Lrw8auwaqOO9jWXlr9TbttWDWK1ZwpPbwzIGM=; b=ToW+TnwuHMAIVQnL1XVrhBpyMnjHNV9yFh7QFjfqqODmGdpw66ALOdDUKXvkOqKbno 9IlSTMDLdxHZJ0fPTs/EoF1aM8zMPT+2sKe4haXxxnFfG49NRTcS4k9l2IDBPJYlbEmS 8c/BzwMOr5ePM+p3u9L/LxmNNCzcdrcUi3jC1g6NgH0XK125Ok6f79cGIcpC9XN9+Rae 082a9Qz5oHxdlqA36kHt16y8aTZ7Zvx+vMyfHTCBBYOmKE7tU9XOo/8yDGB3LVB4Pki1 uWu1EZqTuqB6mTR2qafZDEFLhD0jcVoFKG2w2/0U3JgVVq2sAddR5UDiUOFqb7PTtVJJ qM1w== X-Gm-Message-State: AOJu0YyfyPvB3V3nbus8Mzm2MN7LgK0Phwcg79LU41FCfyylV1wjdNpl /GI8zDNM+ZRW5wqPXOgALGBNWBf9q67T+opA2TLqCa+DctbRr0UCRx6r3byiBMP1Pdm0XrfAWei 5 X-Received: by 2002:a17:902:db0e:b0:1f9:c3e4:4c0f with SMTP id d9443c01a7336-1f9c3e45052mr7190845ad.34.1718830796494; Wed, 19 Jun 2024 13:59:56 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 03/24] tcg/loongarch64: Handle i32 and i64 moves between gr and fr Date: Wed, 19 Jun 2024 13:59:31 -0700 Message-Id: <20240619205952.235946-4-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::530; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x530.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 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index b9078ac793..de5369536e 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -303,11 +303,23 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg) switch (type) { case TCG_TYPE_I32: case TCG_TYPE_I64: - /* - * Conventional register-register move used in LoongArch is - * `or dst, src, zero`. - */ - tcg_out_opc_or(s, ret, arg, TCG_REG_ZERO); + if (ret < TCG_REG_V0) { + if (arg < TCG_REG_V0) { + /* + * Conventional register-register move used in LoongArch is + * `or dst, src, zero`. + */ + tcg_out_opc_or(s, ret, arg, TCG_REG_ZERO); + } else { + tcg_out_opc_movfr2gr_d(s, ret, arg); + } + } else { + if (arg < TCG_REG_V0) { + tcg_out_opc_movgr2fr_d(s, ret, arg); + } else { + tcg_out_opc_fmov_d(s, ret, arg); + } + } break; case TCG_TYPE_V128: tcg_out_opc_vori_b(s, ret, arg, 0); From patchwork Wed Jun 19 20:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805637 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14232wrt; Wed, 19 Jun 2024 14:02:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/7u0LI+u72ubnLFzCt+yrG/uJ0PsKszdEy9qxF6wgJa6Z24hknZXeyb/Lu4t2WRXKmHUQZNK8YFy8jlbTd+kG X-Google-Smtp-Source: AGHT+IHzMwOejDsa15gQF7RDZxB0hiBmxz9okW5dzFA/BFehWsE/6kUd9CcfIkVsiD2028ofb9DP X-Received: by 2002:a05:620a:4256:b0:795:533f:452c with SMTP id af79cd13be357-79bb3ee6db4mr385203885a.73.1718830927033; Wed, 19 Jun 2024 14:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830927; cv=none; d=google.com; s=arc-20160816; b=KMMMVN37dkyGCj6HQh1ZlY743rqx7pz7+gqGpcePhADhG2FPx6XmT9c55S8zN7/ogJ S+nskf1FPI97pYbtGvFlIUCWvzD2KUqjBfkmuZRd3GoELu+uaD+BYJgl+zztYx09nhvD 1R3Rmx247tqHhXyCCifZ/H7zk/L2+2z4QTt3lB8ze0LNkto2KXH1Ip/uSXhce3EM6tdi f7D+3NKpEs97Rhu3Gk5HPvfTWZsju940OURFJmTeNkWYwz3AW63Dhqu8/Yag6gU2R/Fg KxvcwpVawaVWTMpo9OVsYkZ3hUeVAik6/zWLGCQYIy8UM5mKqneyyU6Qb5MZp11k7ESw a8dw== 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=hRI+iU8AoyX8CSaqkMr42RrHAGDYxA7DtYX1JOZeQXQ=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=L7lWwfab0wM9K8da2G5IKLFVPC3hErVgCn/py+U89KsKNzlP8WXvs/T9rvRKhlt56v I8+YGVmSssMZjOoDgm+KJVWfHCPUcygHraeZaYGlvs313aROT2ranlvXrK3FsrURfpUx z+3esfvQ15pClFMFYt4pmx+4kKBqVVabQecdrZBk6K8Jdq/vVw+/L/DGCg8T/WhPeYdU /GkRd6ks/7d9LS5XPsZP1Mr16GbZ9zpDDNws5voWwts6eZomin3AhvC3T4ATxrWedC5Y WSYXH4AMiezpY5rCwLz+rKLX4rqmYh0MEcmK9ts88B7jd8tAcOTwtNmZQOH+KNoajr51 6NMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o8aDzx1s; 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-798ac08e846si1545310285a.745.2024.06.19.14.02.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:07 -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=o8aDzx1s; 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 1sK2PS-0002Bh-ON; Wed, 19 Jun 2024 17:00:02 -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 1sK2PQ-0002Ad-P7 for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:00 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PP-0000Jb-0z for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:00 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1f6fabe9da3so1747425ad.0 for ; Wed, 19 Jun 2024 13:59:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830797; x=1719435597; 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=hRI+iU8AoyX8CSaqkMr42RrHAGDYxA7DtYX1JOZeQXQ=; b=o8aDzx1sEFnKy7+asrBgPek3J3U0+D8o+A/9Fo8l7B66o8xOPaM4Cr8pA5OakA/0G3 fB74MtxuTb8VCcFDtRAuank6G+5NfGZBtIfTGexT4OLPEcjoPZuasnMKYZCrdQzu4QG0 LTJ5G3x4UTq6PXdOzxV+ao9/q25oRkI6hqXfweaxqzub0KfWargkQNrt/v5WOH/HPXjw 6o2ybKdzqNFrqI2aCCDbFdWtk0PJFQghP5q5OiTT1Wx3PGNrV5Y92v5i97vxBJ5I0noH VC9P3WBuFJ6LjzyAdEI79mlGlf8t505w9r68bsQ9FKGv6ypl1pXkwst/mbmGeTECbxAu yoyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830797; x=1719435597; 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=hRI+iU8AoyX8CSaqkMr42RrHAGDYxA7DtYX1JOZeQXQ=; b=GBPiqt8iz6X81+lE4RRqBpCnNukI0TuED2AS1rorLjAR0+s3MkiQdCjrewzGCT9dLF tlS3twB3qxKYg3e5i5iVL0Az3v1eb1hymYq2vZ2rBf5UA9/aIdiFJbTwuhFv+TpcwWIy H8fFmlANTVU9V57nBUruRuh/Aquh2Q2fUm5N4LXgBPhI5vypVCAXSKH+XOl1wqC4jOux inD/Qb6CnE0sVV//qVHyBwms2rmtyLMbI1/mFqwMVQFKLGgQS0CGI/oa/C8Fc1M/tiAD 3fY1WasftA7PCE0FpqOYz/HMa3OHMq7lOGrB9wk8UMXlLwjsuFVzn64hl9Z3HRJcmE1O OHYQ== X-Gm-Message-State: AOJu0YyNGHYFMmhalJHWTwFIPmlfp01Yuvr7QupKbGFmKfDSVx00gFeZ Dh+KPgzxifYNhryELmsia/cG5WXsjv5o4GoSOKtEIhX7da6dPfv6YR1H/0Rkcr4cz7dMCztdqB2 a X-Received: by 2002:a17:903:22d1:b0:1f6:e20f:86ab with SMTP id d9443c01a7336-1f9aa44c98cmr37708065ad.40.1718830797361; Wed, 19 Jun 2024 13:59:57 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 04/24] tcg/loongarch64: Support TCG_TYPE_V64 Date: Wed, 19 Jun 2024 13:59:32 -0700 Message-Id: <20240619205952.235946-5-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::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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 We can implement this with fld_d, fst_d for load and store, and then use the normal v128 operations in registers. This will improve support for guests which use v64. Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h index 29e4860d20..990bad1d51 100644 --- a/tcg/loongarch64/tcg-target.h +++ b/tcg/loongarch64/tcg-target.h @@ -171,7 +171,7 @@ typedef enum { #define TCG_TARGET_HAS_tst 0 -#define TCG_TARGET_HAS_v64 0 +#define TCG_TARGET_HAS_v64 (cpuinfo & CPUINFO_LSX) #define TCG_TARGET_HAS_v128 (cpuinfo & CPUINFO_LSX) #define TCG_TARGET_HAS_v256 0 diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index de5369536e..980ea10211 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -321,6 +321,7 @@ static bool tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg) } } break; + case TCG_TYPE_V64: case TCG_TYPE_V128: tcg_out_opc_vori_b(s, ret, arg, 0); break; @@ -838,6 +839,7 @@ static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg dest, } break; case TCG_TYPE_I64: + case TCG_TYPE_V64: if (dest < TCG_REG_V0) { tcg_out_ldst(s, OPC_LD_D, dest, base, offset); } else { @@ -869,6 +871,7 @@ static void tcg_out_st(TCGContext *s, TCGType type, TCGReg src, } break; case TCG_TYPE_I64: + case TCG_TYPE_V64: if (src < TCG_REG_V0) { tcg_out_ldst(s, OPC_ST_D, src, base, offset); } else { @@ -1880,8 +1883,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, a2 = args[2]; a3 = args[3]; - /* Currently only supports V128 */ - tcg_debug_assert(type == TCG_TYPE_V128); + /* Currently only supports V64 & V128 */ + tcg_debug_assert(type == TCG_TYPE_V64 || type == TCG_TYPE_V128); switch (opc) { case INDEX_op_st_vec: @@ -2394,6 +2397,7 @@ static void tcg_target_init(TCGContext *s) tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_S9); if (cpuinfo & CPUINFO_LSX) { + tcg_target_available_regs[TCG_TYPE_V64] = ALL_VECTOR_REGS; tcg_target_available_regs[TCG_TYPE_V128] = ALL_VECTOR_REGS; tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V24); tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V25); From patchwork Wed Jun 19 20:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805636 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14154wrt; Wed, 19 Jun 2024 14:01:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLPiDwEEydQR96kEQTe64cVkKfUnlRzXTpfXxGE4oinxys04uWg4LjvY3qELdZRNCLN463BS+i1XMZFd73NTlR X-Google-Smtp-Source: AGHT+IEGYtE2oTDir1tRu3PSVzQMQM5LOJdaKvmYXvW6JUdnd2J+i+RZ/CnmN2ImDxJGTWu8nJS/ X-Received: by 2002:a05:622a:11c1:b0:43a:ac99:4bb5 with SMTP id d75a77b69052e-444a7a4a90amr36872691cf.51.1718830916556; Wed, 19 Jun 2024 14:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830916; cv=none; d=google.com; s=arc-20160816; b=soCeGMekI62gbfl3syUbW3ooEgjzs8l8j+W7mggjoFMa+XFffWjG+ymzZy8WvGI2kB U73jVTANV9rCJ2/IFOamCfvum732Dt2954sl8OVEVfuHMtwyYCjDy8W2YsdOqwqTFcQg aewam75+66V7IfUtCfXa2kAKBALO4UW20cH6j5+bX1gK0doUZ4oB+j9Is/Sti+9hOfhv 0+9xLVmNZndHc+DGlMuMNHgBivoqvbLLGXYs3eQpVE41uPql3wP/L1RWjKVd/ADXiSZf UbzbWE4c4Qg+hmN2YTfWrQd9Tahnrf071s+/qXN6ty7Mw7uIMiytYKKmQlL4awMh+/G/ AK/g== 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=0lTcCjJ3oR/AagcegLt/3bpmmkWF2oByWozOC0a9UQ8=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=rSqorj1qtjhAnr/On1LbGB9l+tFZYMUuMy2HRJIgN9dSU/UAXeGUDLOpxJ/8RcNkgj NVpmtFVnvy0wmdqLzq8vZluzyf7uRMiJ4MuKQkwphohx8646ruJ71Oa7XyqFy5Lqghn3 FfLs1boMipqRAlWVOeo2b2oxrOvyt0DcGD5ME6UdUcfvZmck7AIqWV5h8a0NrCol8F8t 0B0vaurYIOf25sJkudF/VHHoQnY8hZYeapboiIVVUmxDGDTRyoAQ130TdMLEmf8Kf/VL jEHBL/2g5HlIAE0iIOwq89W9P/W80/n0Tj2LAJ5EvLAOfFcK06MnlaE45d43HqDc3yZO oJ7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KFCLGD5m; 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-441f2ea8d8asi150467661cf.337.2024.06.19.14.01.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:56 -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=KFCLGD5m; 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 1sK2PW-0002Cc-9P; Wed, 19 Jun 2024 17:00:06 -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 1sK2PR-0002BQ-Dy for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:01 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PP-0000Jl-Mo for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:01 -0400 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-6eab07ae82bso152279a12.3 for ; Wed, 19 Jun 2024 13:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830798; x=1719435598; 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=0lTcCjJ3oR/AagcegLt/3bpmmkWF2oByWozOC0a9UQ8=; b=KFCLGD5mc9QnxYFZlQ9WYarDasUe12FRtDXXkVTo4uHfhwYEZgVf3xqAZ/Y0oFd4dq 4kDSBDEjkZEXGV/p8T1MTC7Iey0bE94OjkOfDi0TaIi+DNreVjmgUQ9RJsR8rMRRuHng 2v257iZXdPO8t60mNCoqy5lfBumLFiq2Gw8W8c9MqjojaRGaZgQQB2sSZdQV423MTZSb SU5RTyo3OiMY53xRODkxwTJjNKPlXJu4p/66y4c1RjRCjuRHcQhe/n5iK8RmRoIP5SoX ADzPF+rwYa+8VMi7Qdml8M4d+TqeKwvBP+6teddi82EuTJ0kY0M9l0mNHbCD9bWDQuZ1 vIAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830798; x=1719435598; 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=0lTcCjJ3oR/AagcegLt/3bpmmkWF2oByWozOC0a9UQ8=; b=qChzzpCfg5I1+h5MNKsvtiDQNZShHAySK9HfQpKMp8pU64ZzVs4qNp/grpUTsMz4Wv IMiutUPe1G8TnzuhBqMDv5S3IlDpdf18WCQq4dX57OI0Y0H4kMRM+qH1G5+0Qsi8aysR 44XIEoVcpXSV0Nv6JKi3zWHNZPYRW026agNVPzF32BeKMAVhsdJXCft8No7OwSQ1NYLU z+WtVL6+W3nbz7CHPxsGwUQdkzdq28+N4zRKY9IbWrfWH67RRma4XSwj8OIygvS6qt9v y6MLnjYv1oF+N2NMYQJc41TMQAzIU0xURRAC3lMm58FNc4emCQMMAGYVbWxV68NwucYU lvhw== X-Gm-Message-State: AOJu0YxBFnd1caAg+6dSzYz/9L+Y5x34y8N8TjS/yNFXnL/CPLKuO6ty aY1NvtBvnubYZMmfSjvyT0RP55Lja+wUIco2/t5Jg/wOXHLd9+qAY6xQA9wxL0jD1FSTT8y798y p X-Received: by 2002:a17:903:230d:b0:1f7:3e19:6d9f with SMTP id d9443c01a7336-1f9aa3dab89mr43615635ad.19.1718830798211; Wed, 19 Jun 2024 13:59:58 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 05/24] util/loongarch64: Detect LASX vector support Date: Wed, 19 Jun 2024 13:59:33 -0700 Message-Id: <20240619205952.235946-6-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::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- host/include/loongarch64/host/cpuinfo.h | 1 + util/cpuinfo-loongarch.c | 1 + 2 files changed, 2 insertions(+) diff --git a/host/include/loongarch64/host/cpuinfo.h b/host/include/loongarch64/host/cpuinfo.h index fab664a10b..d7bf27501d 100644 --- a/host/include/loongarch64/host/cpuinfo.h +++ b/host/include/loongarch64/host/cpuinfo.h @@ -8,6 +8,7 @@ #define CPUINFO_ALWAYS (1u << 0) /* so cpuinfo is nonzero */ #define CPUINFO_LSX (1u << 1) +#define CPUINFO_LASX (1u << 2) /* Initialized with a constructor. */ extern unsigned cpuinfo; diff --git a/util/cpuinfo-loongarch.c b/util/cpuinfo-loongarch.c index 08b6d7460c..bb1f7f698b 100644 --- a/util/cpuinfo-loongarch.c +++ b/util/cpuinfo-loongarch.c @@ -29,6 +29,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info = CPUINFO_ALWAYS; info |= (hwcap & HWCAP_LOONGARCH_LSX ? CPUINFO_LSX : 0); + info |= (hwcap & HWCAP_LOONGARCH_LASX ? CPUINFO_LASX : 0); cpuinfo = info; return info; From patchwork Wed Jun 19 20:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805649 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15280wrt; Wed, 19 Jun 2024 14:04:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWkT1jxe7Dkm+WyObimH8VTPUVtpiTmQOxsO3jneqRFEWq6qGautT8yE/SjTgtvCcQxJMji+06PQJxT6VndcoFH X-Google-Smtp-Source: AGHT+IEeUgS7w6yMGJR6Xpoj3grr5LeRkQdGMne73oF+MwTlpvBwwno8HiNfQK/gDf5ikiDjdn/w X-Received: by 2002:a05:6870:d209:b0:250:58b8:bbe2 with SMTP id 586e51a60fabf-25c948eaea8mr4002098fac.4.1718831095513; Wed, 19 Jun 2024 14:04:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831095; cv=none; d=google.com; s=arc-20160816; b=hnH3Yjfyg0NSGz3CEtrB1eSnZTuA/VON3RiSFlea6uqCg2pdEmodOC6bH8atcMP6xw tIy7/s0QONbhpYTCii0M3slHOszB0Tz+US++YB7Xj3gKw7ee2zQ7beV9/DgEX0pKMSg9 Nicw8tmkQDGvd/eT8N+8yFLYDdJaWHtXx02n9zZXViUnQT2b0KyQvmmKMZtMykz69eN0 vuxS8vAWGyhCUVMYqcYyeIl7YNOJT650ZcdRqmQ1KAENYgABB8HeZ/pxycpJm2e9AbgA riCEVov4sfWzfG6q9/dzc4Eok0UP9FliBYO5OTPfgKGAEFDCM4LHz43M3q7M/mU8vir1 4xgw== 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=1R6PniPLNMWr5brkBomFlTCMhKgUFohFxAyFLb2Rr/U=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=qQ2LymIYaJ3GS4i+GrEOxI+uU7uBqzVcOo59G76+Xu1y+UQGtrVpWJck3w7dqthtcZ aziaUOc3Fj1kmkc9zMJt7YJzf4wglb0pp9ESsPCisAkZX5Hiov6SOFIv4lt846bYLi4P px60DvQX8UDIugySUVE7bV3WXfRegzjHnaUVnMPC6PT2DNvsN9kwepQ9tKWCvSV275Dn p4VqcInGoqfCsfcTyKPXJbQsAgzeyVePxRm1Drp4FHQEDFIHq7M5i5UbxQhTNvYr2CuD STfgqSv6ey5zgwrv3XE5oOo3qMUgyyCkp6HBup9RYit2wkhFyvPscrTe5Hy1aJqq51am sX3w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DwsPC9pH; 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-441f2fed203si167659981cf.609.2024.06.19.14.04.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:04:55 -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=DwsPC9pH; 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 1sK2Pc-0002F9-3C; Wed, 19 Jun 2024 17:00:12 -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 1sK2PT-0002C8-Pm for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:05 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PQ-0000KD-U4 for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:02 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-6e4dbca52f0so177480a12.0 for ; Wed, 19 Jun 2024 14:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830799; x=1719435599; 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=1R6PniPLNMWr5brkBomFlTCMhKgUFohFxAyFLb2Rr/U=; b=DwsPC9pHX3XZFzx0xbIkplf+dwcEYudnU/nKLbORf1k7v4aFI8XqLvp7WqGDtTOcJC KXXQlPv3C9WSUdgsLxsxa2DSl6tajdOZ+ECdk7sZGqC1xFR0+5igBrwRk0h031dlvK/2 xDoaBkgN4qVh32SHCBjJ2f0d00i8PuBkEEDffCYTbwwKatuC+0TKnE5eDVJowqzj3INq +lb24o+hppp3tqCOSGx/hy3KZtltuibGSQ/5kvnx3uYlnYeX1UsRc2pats50MaBe70xu LZ6r1on4WbF5uEkxwEag7+pUNTS1GrQWzFu5yoGpUXNq9YLRh7Dj/zbtESl96dIEgYhg XTTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830799; x=1719435599; 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=1R6PniPLNMWr5brkBomFlTCMhKgUFohFxAyFLb2Rr/U=; b=XgI21Eb2T5ghtw9QIYi6361oC0fsxTa41bCOGdX9DNi2zAVFy34PunmZPq96VM7yva OocIIjua2Ey9HL6wgEVu2kYPRLRadW0zJJj0KIQb2xpRRmxhylSAPXtk0O40z8wEmGG8 SleOxB/5vCZnGTPiJAIrRJF6XTg+2GmvHnG1+btRFofw9sLsUITH7CRLkDJpX9uEo2IE VgHR8NrURkaRq/S8oRlS0NXfwRvvkMrw6KgFuAsPDotmReEXYWNsezV6vyuJoRX1DFZ+ sqsBRO6b0Ctar7Yna8b5UoNTFeWRip2ETQi7IvL2awhFztsVSfzcUGFtlE3Kk6kkkrZU uv2w== X-Gm-Message-State: AOJu0YwbkKDmk4vLcAQ9A455MaHkr2A2XdIBgnKA6RP8vf7GCAtuhEhP Mj4uwZrSWnUFwzPuNSaVH2KIBuKAmPSNjHQcqAu7pERryFo3cD/gb85YQrfQRnAXDjIOSM3KIVi O X-Received: by 2002:a17:902:f68f:b0:1f6:673c:ff2f with SMTP id d9443c01a7336-1f9aa472200mr39234485ad.68.1718830799082; Wed, 19 Jun 2024 13:59:59 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 06/24] tcg/loongarch64: Simplify tcg_out_dup_vec Date: Wed, 19 Jun 2024 13:59:34 -0700 Message-Id: <20240619205952.235946-7-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::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 980ea10211..b1d652355d 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1674,22 +1674,12 @@ 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) { - switch (vece) { - case MO_8: - tcg_out_opc_vreplgr2vr_b(s, rd, rs); - break; - case MO_16: - tcg_out_opc_vreplgr2vr_h(s, rd, rs); - break; - case MO_32: - tcg_out_opc_vreplgr2vr_w(s, rd, rs); - break; - case MO_64: - tcg_out_opc_vreplgr2vr_d(s, rd, rs); - break; - default: - g_assert_not_reached(); - } + static const LoongArchInsn repl_insn[4] = { + OPC_VREPLGR2VR_B, OPC_VREPLGR2VR_H, OPC_VREPLGR2VR_W, OPC_VREPLGR2VR_D + }; + + tcg_debug_assert(vece <= MO_64); + tcg_out32(s, encode_vdj_insn(repl_insn[vece], rd, rs)); return true; } From patchwork Wed Jun 19 20:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805628 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp13922wrt; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWvXXfK/RlDd/4fOuxZlrgXgnOpN63aN6828AtpViy+iwyl9CVbnSPYtlhAOiGvER+cuoveX180DYk9jkab80uF X-Google-Smtp-Source: AGHT+IFexK57uCDLnGbOKGAiSznOZYIYfxwzb6SaF7+2UI5zwzR4npHCd/rZkM+F5PnV8p59TW48 X-Received: by 2002:a0c:e290:0:b0:6b0:7f36:8ae1 with SMTP id 6a1803df08f44-6b501eb868emr37592856d6.52.1718830885408; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830885; cv=none; d=google.com; s=arc-20160816; b=l8KfUMr2rR43kMLITt7r0rCxNKnG3epJZMGyx+vh2JKmRYNnW/4qJpy6w5cEEQLa6F uXCEGUxfy0qs287OIv6zg9Sfw9JcTyxAhS//kALGwGkEZn/oiPiwZTK24BjMkvOwwW2c 1k0ShvDssVJuc+pfJKAY15x5lGOZLkKZg/9z6oQW8sV4Rq1a2xBN0T+IXaQYd3EM/KfF sn+Np/9JgbsFpnEPrhd6v2ft9trfpi79hqpnPTJJYUXEAw8p5/2CQ5w+LlhWfS7ecinl +9zuRpkXL/05mWCjC8GOO8ysz0UY1/bVZrowofTzZ0hU9SSxpxis1taP/L+0BLtJTQmX FkPQ== 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=uSym0G/iFtizMEI4s23S5kDZbe1VjgaGmtsZd8eQAfk=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=sBNM6L+edxCoMPWH6za1uzNmPcxtu5kmmyVYOsXexO5pHYra/2HFl0HARAePyziNZU mQHsUNbPaxTkgZYm+XgAyS1O9SkELC9vN24A72PwtzaxXwtPi6RNwJBFxh7qAOSuMfzU UUD2IEqN9+Yx/1gdrohZjHF9DdvdzNofxBRFMBK9iMtEn+C7TTxKG9NRfaVoyPH09spQ xa6W2MP1QJrudqMU/OQcIy4dexyGs/OgwHbH6ZgvN012/biv52HiGuK+Fdum4Kq1Tmer lJvn/XRjdobXapThN5apen1jFTUmwiXrjFGojFSgz7dfaOSWTmdGOxaUMNFuNoqHM9Xd G4LQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w1vHW7Fk; 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-6b2a70f5ee8si156180826d6.4.2024.06.19.14.01.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:25 -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=w1vHW7Fk; 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 1sK2Pd-0002G8-4I; Wed, 19 Jun 2024 17:00:13 -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 1sK2PT-0002Bx-7C for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:05 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PR-0000KZ-Ae for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:02 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f992388bbbso1611725ad.3 for ; Wed, 19 Jun 2024 14:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830800; x=1719435600; 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=uSym0G/iFtizMEI4s23S5kDZbe1VjgaGmtsZd8eQAfk=; b=w1vHW7FkE4gls4yEC01Xjkhx81HNDG4gxx5N1sCFYqj9rXI6n1h1ji6WiHLJWh4wOF TZNk8+TkTT1F97n/ie694uNxrYvCYTRre3ick6LO7rfW/BZL2ag0U5GDLnaCbFh9Hoft 3CZiTA9zI5LDflULQzQzxr+td6WsYixJ5Bp47t/vIjX4C4pQ2W+/uqAE+jckmPsrvMMm A6B3gwOWny3lURh1Dm3GGzHJ7pkkGUU66ar8XX4IFV7uj0uOoadnMZAjiAM9yDgMx2rd w3TB0+/dxI2018Ihvb8S8F83Gp41ScpvKYXRhzyQnu1cVCML0coIZ6UNNCT/DtjJtzWT TiUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830800; x=1719435600; 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=uSym0G/iFtizMEI4s23S5kDZbe1VjgaGmtsZd8eQAfk=; b=wu0vOSVtqcWXU4K59SWCOHAEbR6lQSEWJWx/dU3PQn6OP143STqOkcm6C5jGu9hvXG mi0aq0jR2tGrp0LYHyq5GsV/Wfs3w47CVgZdaDgbczlfVu+P7ythM17QlsiVAVBiEPzb 8DWx6SFcLVLPuGQaFSdesR98soNX2K4jcAQZo9HDuLFPPPv6Sb0eMySGYcTq0bE9lRlz bolsxctfyLQil/Y/7PTJ54eWjzdjrPipKgPRrIsfLQszuYZQeUIPncG73OvrYyO57Uam CreNmcklsdTOYKwOf2yA1gTFXbf8Mn/1zUkFH4JydjqYciVcGb4HWgcJhN54XYIbYOhx dFag== X-Gm-Message-State: AOJu0YxfY12dZCsfB3CWTAvLqA5gcwuCIAf/rbKhFPGTHsN9EaD8CjqW a82J7seyofRyxCh5mX/zOv0fiodzlgtISP3LprOqB304xT3t+MjBDsh+cK1xDpCss+24j/8WPeB T X-Received: by 2002:a17:902:c948:b0:1f7:843:e367 with SMTP id d9443c01a7336-1f9aa4878cfmr37773255ad.63.1718830799778; Wed, 19 Jun 2024 13:59:59 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 13:59:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 07/24] tcg/loongarch64: Support LASX in tcg_out_dup_vec Date: Wed, 19 Jun 2024 13:59:35 -0700 Message-Id: <20240619205952.235946-8-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 | 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; } From patchwork Wed Jun 19 20:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805648 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15193wrt; Wed, 19 Jun 2024 14:04:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWZw3LwDzGAw/3h0rbPgRYgJVYf0dtAsdFyZRX6mXZEUZn0TWl2QhAUFDWUOp9ZpQ1IEgj6E76pkJOo3M2S9GlA X-Google-Smtp-Source: AGHT+IEy9mLPMgTzBth8S7dTbXc2M6nfQi0oGnRIe8Xo/ZzxtxqtqiaorfX1KW+ouHZ/BwSbebiZ X-Received: by 2002:a05:622a:20d:b0:441:592c:e77c with SMTP id d75a77b69052e-444a79c141amr38088551cf.24.1718831079368; Wed, 19 Jun 2024 14:04:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831079; cv=none; d=google.com; s=arc-20160816; b=GltI4PWuMXBdq3r06Mq8TUA3gLNbMA9zbMFOYO4GUK/IBm+MDZTl2JAZ4lICnYX3fe CN8QAdqXWLFKeNkF7gLFSXewJ+G9dYajgfxvZ+HU7cmaYASSObwu/guFx3q1Cs3ddejX LNmfu/acBC2cMaVLRwm9jVCubJH5e3h0VT17IgjnHzV/ZhHZJ7s/8WVbo+tFwr5dFe/t +CqmeMYVmwRAQnVy8GuF1Ik+97MPWbp5MQJRxyrWkqVizZz/g3h9JRFmi6z8xXABcqK7 RrhWFBh1rxKP/A0sEer0oHw5KlE25NykgleAXu4ZOM0m7WPD080n8q1OqIFSXe84WCAp XQJg== 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=JhyNM0nowlES/o7n9KDkbawcZ8ZSGRcIDHABB3fsnYI=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=n5VMv52If4DGq9sL9LwWYuWW7FIUHvNFuZlWtKqGmervsfwUogOXMtXhoUrvz63p3u cF9heppijsnDBOSq/EJfrjaZ2m8MA1sp+cjdmNjqePIqtazNurZDwhpfjnGbmFZNFBrA O2UVeU7MfRyVN2Han0TqtC7Ot2xDAQN7utwf0cyM0OAFyr6OFnkyWDkzw2jrkMtg5+kg iZqfq013+GwFbjf1q4Ra4/2wOHAO8PKFT7IqSVbJ62fAdE//vWisS3JJI0mPPXtECxZL CS2p4QeqTuTXjuWx+Pbg3KNBi6K3IbEmZeQ0IreFd/PINpYG4HID3RNVoAgFddzGbWiz +QLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bGatzLX7; 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-444b3b73b67si10483341cf.481.2024.06.19.14.04.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:04:39 -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=bGatzLX7; 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 1sK2Pa-0002El-8e; Wed, 19 Jun 2024 17:00:10 -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 1sK2PX-0002DR-OB for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:07 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PV-0000Mg-9A for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:07 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1f44b594deeso1812395ad.2 for ; Wed, 19 Jun 2024 14:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830802; x=1719435602; 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=JhyNM0nowlES/o7n9KDkbawcZ8ZSGRcIDHABB3fsnYI=; b=bGatzLX7hVAtX+hgXv6+7a+Fz+Inn1+CzmIl1sDVbdOiMsbO0OucNag2T6zc4jfYVP 9nfynAJvzwiPo0pPv6TPFiDZ/GAToC853X0mC1vaITwIbKLAplVm/FcI5RAail17G2Ja lf5aE4q6nejN3fBxrvokSmlrXJcrDcZveq6sQn5s7v4TBMBCNCcM+7rbptNEvYNWXRNA Ueo6ctVAb9a9c7md23ByuKAI5fRVkf5lUEc30K+pJaQ0p997FxkvMgmu3i12RwFkKssd r/n+MCVhfoFknjJsAxWn0O7reHscnKPVWTyjmUeya+ScXOb7iEMumrCoQyLsvUPssrtz Vtdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830802; x=1719435602; 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=JhyNM0nowlES/o7n9KDkbawcZ8ZSGRcIDHABB3fsnYI=; b=WW3ZdF7FvA6hXAAVpnBykTPisfzExLW9rSeLEXEP0apXuXSWnwRibul1NMvf9DtnFV UwZwwbxpusDUQOLv5wS8zjg/i7h/F/SWyhWB6xzLhUL7Zf/B1FkvJIUExORMr3QnUOx5 HaD+rOlrafZCOSCAs35BKAy7yxcFi+U5yGdzG+LPAZVkVY9b+YnPB81ViGn7+Q/hvJJR 5hMVN1cYaU3hg2TK00in72QI+8EYBQLOlm9v7nMECDReqrgaIBJwRen79VH2mfnYfS8p s1vBrhj16WlfselhrCGlUbIgyf5YKJj+NtchaRZw2j6575Cpj58Z2Jp9Dq69oPkWokEG a//Q== X-Gm-Message-State: AOJu0Yx7SdP/HBpCLg19PnZJEPtayBNyrZ9LnAWK7RvgCsv9F/Hvv3bS JHzxnRkDR6gf//YpDPm8tIEq5qsxCosDixKZzKxUmdICDzWLDwn70sx/6Li3+IhEfpGuZ1Zciiv D X-Received: by 2002:a17:902:e5d0:b0:1f6:daa6:e77b with SMTP id d9443c01a7336-1f9aa96847fmr38612705ad.68.1718830800574; Wed, 19 Jun 2024 14:00:00 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.13.59.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 08/24] tcg/loongarch64: Support LASX in tcg_out_dupm_vec Date: Wed, 19 Jun 2024 13:59:36 -0700 Message-Id: <20240619205952.235946-9-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::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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 Each element size has a different encoding, so code cannot be shared in the same way as with tcg_out_dup_vec. Reviewed-by: Song Gao Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index cc54bc4a53..1e721b8b20 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1690,8 +1690,10 @@ static bool tcg_out_dup_vec(TCGContext *s, TCGType type, unsigned vece, static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, TCGReg r, TCGReg base, intptr_t offset) { - /* Handle imm overflow and division (vldrepl.d imm is divided by 8) */ - if (offset < -0x800 || offset > 0x7ff || \ + bool lasx = type == TCG_TYPE_V256; + + /* Handle imm overflow and division (vldrepl.d imm is divided by 8). */ + if (offset < -0x800 || offset > 0x7ff || (offset & ((1 << vece) - 1)) != 0) { tcg_out_addi(s, TCG_TYPE_I64, TCG_REG_TMP0, base, offset); base = TCG_REG_TMP0; @@ -1701,16 +1703,32 @@ static bool tcg_out_dupm_vec(TCGContext *s, TCGType type, unsigned vece, switch (vece) { case MO_8: - tcg_out_opc_vldrepl_b(s, r, base, offset); + if (lasx) { + tcg_out_opc_xvldrepl_b(s, r, base, offset); + } else { + tcg_out_opc_vldrepl_b(s, r, base, offset); + } break; case MO_16: - tcg_out_opc_vldrepl_h(s, r, base, offset); + if (lasx) { + tcg_out_opc_xvldrepl_h(s, r, base, offset); + } else { + tcg_out_opc_vldrepl_h(s, r, base, offset); + } break; case MO_32: - tcg_out_opc_vldrepl_w(s, r, base, offset); + if (lasx) { + tcg_out_opc_xvldrepl_w(s, r, base, offset); + } else { + tcg_out_opc_vldrepl_w(s, r, base, offset); + } break; case MO_64: - tcg_out_opc_vldrepl_d(s, r, base, offset); + if (lasx) { + tcg_out_opc_xvldrepl_d(s, r, base, offset); + } else { + tcg_out_opc_vldrepl_d(s, r, base, offset); + } break; default: g_assert_not_reached(); From patchwork Wed Jun 19 20:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805646 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15001wrt; Wed, 19 Jun 2024 14:04:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW9DtYwakz6fRMHU81MGNtXhkmcWlV6u6Tv5gsyLPUyIYKO1AxEf+X0fC360aD6NxNr8H5iPUElJ8TIldAaA1Tx X-Google-Smtp-Source: AGHT+IEE6YsNOD0d0FH0iqHf5jG2DvsVPlAqAVqTAJ+lfOHnQ+nRzQq91ZZoA+YCwHkctPe5+s89 X-Received: by 2002:a05:6214:1768:b0:6b5:1074:8b48 with SMTP id 6a1803df08f44-6b510748ca7mr4753776d6.46.1718831044039; Wed, 19 Jun 2024 14:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831044; cv=none; d=google.com; s=arc-20160816; b=cFZTqGXuer6E3evqWWqsSLXxEyj5HnHN/pzKcLKOPJwCINScLNWl9uu1S+gl7gc+de eIfXMUeNpAqH/ZgULycCvZTr4FhuDi6pipsKczKyRnRLh8FBxPC0eGk3sZcYAKiW8mSr xpOeDYMZYXtZ3lXV6IkgEa9JNhU1Q8MrsRCpeED5pXoIWnxpBmFg0rpFuSKFvuMoibq9 RQcO36lHV1Mi7ziSBqrzDQEoUOQd9896YCqE4OCWSTyxPoUoqsOsoJaiP9yO/GLfzObu rHCt1eMAzj627Y7QY+3nicrfMqlto5okUbM8rUC3fkEIwp5REHmmBGKgv17m0vJZGd+r NnXA== 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=1qLKoP392rGR/GwS6GK2IRdnJBtGIxW6JKIsV0GtUk4=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=BTjdo4A2iK74RW/TV0x0g+SVBZr8NgS//xQD6siM6N3R4kKgIstZXNGE5SJQs1AHA+ QaCJkHP5yH6vsJeFJw5S64hQA7JLNNcOMTh2iK7tt7DrRFKP+iVaCkySf5cYa2e0vUBJ 6xE6yP5QLsQLtifinbAM4fg2X7HDyMKEaa2CJ5W/vWNNl/8epC2juIwmVcp78YIuLyyZ a+fiqPYnc3nNxpT9LLnNC45jn/a6ziqcaAip7ovjDyHZzw2zR5mR59bgxhlDzsraBatH +M0lX9xXtFG8dccGLMHp8dQsp/4PSEzgjhdy0dCkcwpq1qedUGuGNwkWDA1HvW/AHIU6 qFEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kaQE3RY9; 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-6b500c76bb0si35264746d6.80.2024.06.19.14.04.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:04:04 -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=kaQE3RY9; 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 1sK2Pc-0002F8-3t; Wed, 19 Jun 2024 17:00:12 -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 1sK2PZ-0002Ds-2G for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:09 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PW-0000UG-0H for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:08 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1f9b364faddso1613935ad.3 for ; Wed, 19 Jun 2024 14:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830803; x=1719435603; 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=1qLKoP392rGR/GwS6GK2IRdnJBtGIxW6JKIsV0GtUk4=; b=kaQE3RY9haltpv7tsT3jxiEdorhGA5ZkJp1FMtTIrqvnA5JEelCuOAieEmSayHkdPF st7bgMFfyRvn/3ezflGSADSEbpfnJQbzt4JIib2fDrld2WkG+R6B74ILSVYvgyB724Nw 9GLbB8iDUfvU4OTqYnHZ1DkMRZzfh4dBe6x9JQamDf4+dlN8Y7BmvB6HO/F0DZABadhW LPqGtbHt6jwY39IOpJEhTPe1FwcpglmNLYnI23DWkivnl1g1gnPiEVjP/tw9NPx7TqdH svTgq1fLJ9ceESYZBT1Z6gSW+PD3CR+yRzZQ7RxDgXYSdV47Vzxakku0huGcAPH7wcIk o+Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830803; x=1719435603; 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=1qLKoP392rGR/GwS6GK2IRdnJBtGIxW6JKIsV0GtUk4=; b=ClEvREwiEnCGbbjAxfVXailGGXg8qvMbucmpikhxmGVZlf7jFTOQoYutiAviN8Cta/ 2wQe314oaj85u53iqfHfI/a8etksy/gsoI8dX76Yl1hybu4eRw42yUi4RSIuQamFcwcp 4swZ7oQ/dSpXj0bxykrKmhE0WD+p9xCpHw9gvyfmjgDpZhS8sgDHtEYtas0imL+EbnOg EyJjiCCxxWk+0TemoGlwFKyT6v+f7zr/+dg7KDuEx0YNEcjiVVF/B4MfR7tlbGhepiDy asr4FBWp/ull8NkvHH5kZQL3dMqGBtqAAWMuoryJD98L0NNv5B9akCxakU8nUVHGOpzd HZoQ== X-Gm-Message-State: AOJu0YwUMo8jVSWZkSpY+gWCPKNSbAiS608O6pjS0TnuCTRMCBS8Mi1+ kHiPgijAoe4eQ21yLeNyipbedMf91tKTbZ9UMz3w7Ew5GxqeW6l6a3vGM17QMJl0H/85NqPxDDO V X-Received: by 2002:a17:902:d2c5:b0:1f7:2bfe:87a2 with SMTP id d9443c01a7336-1f9aa4734ccmr44844475ad.62.1718830803389; Wed, 19 Jun 2024 14:00:03 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 09/24] tcg/loongarch64: Use tcg_out_dup_vec in tcg_out_dupi_vec Date: Wed, 19 Jun 2024 13:59:37 -0700 Message-Id: <20240619205952.235946-10-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::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 1e721b8b20..9a8f67cf3e 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1749,24 +1749,8 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, /* TODO: vldi patterns when imm 12 is set */ - /* Fallback to vreplgr2vr */ tcg_out_movi(s, TCG_TYPE_I64, TCG_REG_TMP0, value); - switch (vece) { - case MO_8: - tcg_out_opc_vreplgr2vr_b(s, rd, TCG_REG_TMP0); - break; - case MO_16: - tcg_out_opc_vreplgr2vr_h(s, rd, TCG_REG_TMP0); - break; - case MO_32: - tcg_out_opc_vreplgr2vr_w(s, rd, TCG_REG_TMP0); - break; - case MO_64: - tcg_out_opc_vreplgr2vr_d(s, rd, TCG_REG_TMP0); - break; - default: - g_assert_not_reached(); - } + tcg_out_dup_vec(s, type, vece, rd, TCG_REG_TMP0); } static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0, From patchwork Wed Jun 19 20:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805645 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14921wrt; Wed, 19 Jun 2024 14:03:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXGvsGXB/QwJPeFxylhOqePu4/eHBtMKo8Ci1jTnKIwE7ygeFJpaxL23CEjmW6Ucy+9ecJrmG7AgSmeKtYaglT7 X-Google-Smtp-Source: AGHT+IHbic6nkE3vi1Get18HuoUqAKZ3d7GEI1d63D/3h+PsM2B8yr/MTlFJ+cNGcuPBnj2YcQB3 X-Received: by 2002:a9d:7a51:0:b0:6f9:6251:46d4 with SMTP id 46e09a7af769-700741150d8mr4301745a34.2.1718831033954; Wed, 19 Jun 2024 14:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831033; cv=none; d=google.com; s=arc-20160816; b=OzBcFo0XP9E6hG4vnHldAQiEp9G539oWG3bJQmbEeSEDWhZOIi7NZ8plyVy6aTQBIl 9P9WLkKdUXlhSCZt9W6UjAiXoqmZvjWBmtUxLAL4+JC1j2F8533sdtN5t18UqHEagGSp KhbWp5QSMbp/ABs8Ji+Pde4DnEKDeYJO+CM9TIf9oY4b86ZYcFLU2ZdD3unuWiEizBaK PzQF5pmNzZTqW7kKQlffgR8GJY8QVd2CQqVkCS6Fzvj6JLl6LpACvZ6Y2WeJfLvEITMm nQtfN92cfLMk6SgB5nJHX5oMA5G/WZDxvsYALAfvT9I7rtE29VRVY06h7HLXdpScsX0S F3fA== 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=r0UfmwlzZKdf3qRpICgNO4rdEb11HLtqXJQ3Mp0c5Cw=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=EdMzIz/jbHsbd8+GVli8oEM7ztNYiEOQDcpQpl/sy9zyfzLTggZzD0ypu3svy51ZTx RwyuIA8ykI/54vssxxUX91ZrRtkb7sBRS+TebfgiHE6wDmy6B+Y399PjdTXDbm94SbvC tVFRLHhiU0YheiH0acBE9pzMx8Fy1lVqRWks3yMmJmf3R1Sg+Cm+r4DfxyOVO8h9aD6E ZElPMAxdm/O3fHnMKGqdfkxmAE3esrKWaScD8fRUZRY9og3fLgJH9fwPQgUhKWH/+DgZ 5A9DUE1G8/bAkEppuI1+32TUYdCl9TXwPxDxfRI1gWK06X+CmZFkA+rzdaY7NXhS9Znv lLqw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WEiMmB8r; 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-6b2a5b58f99si159619496d6.430.2024.06.19.14.03.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:03:53 -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=WEiMmB8r; 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 1sK2PZ-0002Dx-DG; Wed, 19 Jun 2024 17:00:09 -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 1sK2PX-0002DT-O4 for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:07 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PW-0000Yh-0N for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:07 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f480624d0dso1642815ad.1 for ; Wed, 19 Jun 2024 14:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830804; x=1719435604; 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=r0UfmwlzZKdf3qRpICgNO4rdEb11HLtqXJQ3Mp0c5Cw=; b=WEiMmB8rbFLyRZcZCrJUuel3DIeQVWir2hLWPiiqhFyQ7tBqHvL5b2XiP7KaeQbQ/v Q6WXLzraMRRBZ6US/wYR6ywMNl1nrjRBDdse7HMPdscO6PqfGYvHi+0XW5++XPk5maa7 Yuk4T1elWBF4im/09Xdr0TqRhPJIfseb9XdRhPwKNX5iQa8GyVFn2YZwZ8PFahhMKX9m WK+HX6EEwzCDsh6QmNYSeT4eFKNamI5v0OsQGpRPG9u7IsYgjRUdlQOU9iTWDvyDHabp KcmfmnArWyGwW63uzzoJfOOPVj6Z9UqOed/d+VIb/TdersQuowouEjsjLxTxmdUhBkM1 m9/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830804; x=1719435604; 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=r0UfmwlzZKdf3qRpICgNO4rdEb11HLtqXJQ3Mp0c5Cw=; b=O8gfWZ2I1OvlP7aNrmF4JMoNPI+6EjJBVHJ29N5L9X7m11GGJmqKzEDdHyS+kaD8GY Wre9Gs1MDj+lTt7J7SEOcRhMUitz55aBRVjs63tOyIJseJSR47rl5/DUvGr730BaWY+2 LJ6QYdBPG65DOnuEB8KbvF21AY5OlhnSljMy22LEJp6QbnhH3XFawg5McpxmgdGoe61v vVN20pP2uFAVzv/FwjhyFdwboDVnuoIV8td/gwhcmZKbuAjGxQWlHRzNNm7+v7NO6/1D Zq9YZEIgniNM+/sy5piJ4fAI5RQM61ZA3rkfzgfKR+TjdDxRt8iDG/V11OXIG3A7cr55 1hjw== X-Gm-Message-State: AOJu0YwdXdxKRGcMldk1zxbfuKIfXGFcm0kLSlMAyki4Or0M43KXxBV0 I2UFSnLt8+rFc1yL1NQp994KiqMUPcJHFn7GB6qM/Ya2RRZs+T3twIKCK9uAsdgDxImT/u83/FO O X-Received: by 2002:a17:902:e748:b0:1f9:9a59:871e with SMTP id d9443c01a7336-1f9aa45eb2dmr42889535ad.52.1718830804225; Wed, 19 Jun 2024 14:00:04 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 10/24] tcg/loongarch64: Support LASX in tcg_out_dupi_vec Date: Wed, 19 Jun 2024 13:59:38 -0700 Message-Id: <20240619205952.235946-11-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 | 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; } From patchwork Wed Jun 19 20:59:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805643 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14392wrt; Wed, 19 Jun 2024 14:02:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVis0dNd/GHTPjEB5r9GnjWKKZYyyOT15JDj1+RQo92Ps/hhar5XwpU2+Cv/56e+CdO7eaaKlZIu9uf5sJhxJSF X-Google-Smtp-Source: AGHT+IE7kgtD6F4gtyCIO3VuQcDfFGJCrzSXJHYi6hny62Q14pSCXv7Wl4S6BStw9Y4aZdWu0bEK X-Received: by 2002:a05:620a:2990:b0:795:967d:b1f4 with SMTP id af79cd13be357-79bb3ee6c91mr385495285a.70.1718830951449; Wed, 19 Jun 2024 14:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830951; cv=none; d=google.com; s=arc-20160816; b=TUywq02wbGc4SiujVrXd6NWXM+KlpreY3FEqFkclF3N5f5s5UHdXQWTX8UvFPusnCv Kd0DoPRECHx/ALNdU/WkwRhBOHDPqQQf/yUaXX7GUYVL7j6KF7/EyM8OlPoN8c/V4h7w ryczvIcbv0DdZNX8sOTnr/kU6qniEvpt+7S/UO9Y+WzZXRWQbnV7EyrSaHcdqjW4VOD+ 7zTsEc23/tRM+Fn1zqIRI0vnOroeLO1/VGf2rSUqbiNZKBlS7Yq1YNH/l8GiJy5fDn6b 0ywfDsjOt0QSDx+v5JEpxoCFCUUhEyNl7lHpkT0ybxKCCy/F0uAu6dFbHdKhquzeNFKm ht6g== 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=/+Ozu7ks7y96Kn86P8uNW/7FLhNhS83VVYtywBJAgxk=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=nvLG5Y9PzoBJV7chsavKldtR/ry959vslp5eOzUISbDNhQM+Kb2KUo3pZnEyeozkKp xUvHu0fr5QW3QvA+ax3uIEYBweK4JlfDlqlyKIha0ByS4YgzCxuQdx1rqZDK/nZ+ehlp t0cNwx9HMiLedz3Ou8uwq65l6Ce6oBCQ3Ikza14KE4yZrCEQNg77n7rK05uq5nHX/qLC PwG32c6+r0UsRJTVbSqOwujbpdyf8uJMbv+yE51sbCJe/nOC4ItxpR119VmpRXwkiCnO s86JcL/n16doPfFdDDXq/+H7xTEc+UdQjpK94R4pbtZPsJeQWszMXaIekBmZGlP9X3co qoYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H7n1dsR7; 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-798aac9bcfbsi1519569685a.93.2024.06.19.14.02.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:31 -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=H7n1dsR7; 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 1sK2Pd-0002Ge-Pd; Wed, 19 Jun 2024 17:00:13 -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 1sK2PZ-0002Dt-5d for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:09 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PW-0000ZT-Gq for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:08 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1f9aa039327so1636525ad.2 for ; Wed, 19 Jun 2024 14:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830805; x=1719435605; 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=/+Ozu7ks7y96Kn86P8uNW/7FLhNhS83VVYtywBJAgxk=; b=H7n1dsR7FOtmaJXG/rBsdgeq2GnelmMBK543ap3IeKuCJ9RVOHh9KQUXiC0U2gtbhe TdMDXbv7dNDXgtzzPCrmNrbpk+9OCeznIoiHFMFC5GaY+Vrw4h3ZRDzGmXW2YnMTsG/Q KWLgOZd4+hxxX4eGMUwcbUnyca2qfjPry6W5XuglvHm+dhKSAFn4h9XqTKxBK92QrDwK 08BmvgYiwcYOn3B+tFIVFjknzDOrE/QENITJsUddqSigbg+il6kkZjYFlHs5o1KuLeei K3Ayn5aLn5H6OJf3gJmlXPoQ/sZHfcze2/8ZiPQ2jT+5StYnlyWXJBBjd2xsZGQQO3TL Ermg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830805; x=1719435605; 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=/+Ozu7ks7y96Kn86P8uNW/7FLhNhS83VVYtywBJAgxk=; b=TQdoSD+CBJiFnvVSuJ1w76yDQgwbRMCPZDLR7z2RpyC8FCc1oS73CTFG6rP+cqfofR puX6e8MGRWmaOB6+C3p2j9ydpItB0oAN0SW0Jm/7fhic35IcnGc7e3kzMjWrcPHzo9O8 WBNEdLgx9XymGQqi8xxzP3xxTrUnZxQi6kDgzb3ugqDOI5X2mo2nGKRtJYRo9psbeQwY B3tARyern/tishyGHT4iOqeDsZu5oJhY9Dqq31l/+qndfohCHWe4s3Pub3qKgneSGa2o DpbPbrQEZs3RVgI6zi/WcCne6D7dnIGRa7rXFprAJv3cKRKW0Y3DZgJyiYiGhMko/usR hjMw== X-Gm-Message-State: AOJu0Yzu8WIVMNkGqty0blx8JncipVoE0ZSsmqv/kB7JK7Lum0LijX1Z SetMFJK4lZhX6fyR3D3vfh/lmmdmMMUHvau8x48hhz5SDqNp2UTwX9uwaUIvDnn8GkdVI2Ki2k5 Y X-Received: by 2002:a17:903:22cd:b0:1f9:9ea4:6b50 with SMTP id d9443c01a7336-1f9aa44fc30mr39389665ad.52.1718830805110; Wed, 19 Jun 2024 14:00:05 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 11/24] tcg/loongarch64: Simplify tcg_out_addsub_vec Date: Wed, 19 Jun 2024 13:59:39 -0700 Message-Id: <20240619205952.235946-12-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::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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 | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index c7d0c7839b..47011488dd 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1774,33 +1774,34 @@ static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0, static const LoongArchInsn sub_vec_imm_insn[4] = { OPC_VSUBI_BU, OPC_VSUBI_HU, OPC_VSUBI_WU, OPC_VSUBI_DU }; + LoongArchInsn insn; if (a2_is_const) { int64_t value = sextract64(a2, 0, 8 << vece); + if (!is_add) { value = -value; } - - /* Try vaddi/vsubi */ - if (0 <= value && value <= 0x1f) { - tcg_out32(s, encode_vdvjuk5_insn(add_vec_imm_insn[vece], a0, \ - a1, value)); - return; - } else if (-0x1f <= value && value < 0) { - tcg_out32(s, encode_vdvjuk5_insn(sub_vec_imm_insn[vece], a0, \ - a1, -value)); - return; + if (value < 0) { + insn = sub_vec_imm_insn[vece]; + value = -value; + } else { + insn = add_vec_imm_insn[vece]; } - /* constraint TCG_CT_CONST_VADD ensures unreachable */ - g_assert_not_reached(); + /* Constraint TCG_CT_CONST_VADD ensures validity. */ + tcg_debug_assert(0 <= value && value <= 0x1f); + + tcg_out32(s, encode_vdvjuk5_insn(insn, a0, a1, value)); + return; } if (is_add) { - tcg_out32(s, encode_vdvjvk_insn(add_vec_insn[vece], a0, a1, a2)); + insn = add_vec_insn[vece]; } else { - tcg_out32(s, encode_vdvjvk_insn(sub_vec_insn[vece], a0, a1, a2)); + insn = sub_vec_insn[vece]; } + tcg_out32(s, encode_vdvjvk_insn(insn, a0, a1, a2)); } static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, From patchwork Wed Jun 19 20:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805631 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp13923wrt; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLMXmz+hk+5JNb5vuFeQs4+sAbmvKcdpL305d3lvXFFIiYm1i9Fugc2km5l4hLSehVTR24JMngvq1F9Zj2T09l X-Google-Smtp-Source: AGHT+IE7+Zk0i4A/WGJX0B7CoxOZOzp1MU4/F7e01O7+iShGsf2mcb4/PGR/mgqRYAOhbB+7NHl0 X-Received: by 2002:a05:622a:130c:b0:441:58ac:6763 with SMTP id d75a77b69052e-444a79bf8a5mr39594981cf.21.1718830885564; Wed, 19 Jun 2024 14:01:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830885; cv=none; d=google.com; s=arc-20160816; b=Zl6Cbgya3OYerXuZejMxgHymjhTGU8pNi/gQHjVFzO3Y2IzBxWbahHGGxCLvEIkyHw 9yxzf3imfE11NhAieHQ8KJ+uqaJpwoFHyNMB+BYqSB9zxvT0rhOiIxhrgq1JtRv/9tR6 gFsNCGoognzVz3kr5wtPyixqZBcj6T1Ssud7I2uyib5SCEmkjVUGBxofBLLx0EIDkcsc /yeJCo4Me0Dxc3HIXAW/kXaKAc6VpScbOZRbCoVY1PPbN03Y3uGr1TkRNwnPm4W9zmA6 7vlzMSFxNdOQP6WoaR4jcIZjsFkNfxXi1XKcwxXaU9KnqjVWGArOMcGdno1ZtlyXIHDf as6g== 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=aV9/9tUhy1q3lTqTAPm4aB01/qjHdGqJPt4bfSkOPy0=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=g11x2aqBI+FvpMwWf7mnyuln2N1GH/P5XeI2RYyOHMiefpKKF7Cn7DX+ooR06mCJ4v XoDtKsGRegco1Fx/ASe5N9kGBD7yb7RpIZ2En2DBztXX1NHmh8gsaxtIXgCWTIDMX/fL EFW0W8bCzN6FYxd6W62Cv+C8uYdHW/dP9yPT/KavbQE3ImRBdXrriWLBsZa0Q7nGs4Z0 qLrWDwLlaycSdEyvqOhI5utEQIIwTtF+gfGLpslIIwvB8m8fW1SR9Qy7HX7fg+8SdotH GoH0nQhdHIkHxvaUYjtU4BIdwMKZAVCiH81RWbRZJ87A5qdBQuXNd6GJ0LqeMhav5m+V /kkw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d2N77oMg; 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-441f2fbb53csi138519101cf.467.2024.06.19.14.01.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:25 -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=d2N77oMg; 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 1sK2Pe-0002H2-Ib; Wed, 19 Jun 2024 17:00:14 -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 1sK2PZ-0002ED-DV for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:09 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2PX-0000Zl-FP for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:09 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-6bce380eb96so157050a12.0 for ; Wed, 19 Jun 2024 14:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830806; x=1719435606; 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=aV9/9tUhy1q3lTqTAPm4aB01/qjHdGqJPt4bfSkOPy0=; b=d2N77oMg7m+MkNClX6pmqcZQDeor5tqlIZOZLuPCUrCUq3zG9452S1njaWfD5gIIM+ F+zsRbB2YFMSouPoTQlbPBF5u2sDt43WmHJLoQv65frCKUr8Tb5yPuzZknhGJWwm42rF B0GohWgZD5evrIB5gCeLALreJXx5z4CL5SXaNsDwJi1Lmve9BTbLOreRrDzchwzq69zn 9zilqmKimUIygZhCNBBES9BehlH9UyXl38ZmivEt0pSzCtcs8YwEjjD6ql6RaMfoEL2A mm6Pp2Yp39GLpbu2hiR5JIQUEaxGYgoB4D7J9M99LIb1cBo50QYMcq+XuRu8V6OSXzE4 H09w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830806; x=1719435606; 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=aV9/9tUhy1q3lTqTAPm4aB01/qjHdGqJPt4bfSkOPy0=; b=Y8iINnSzOdzOCfWGGSIJX0PuPiKVtt8F2010NYt17gUEHsWWWYQ+VFCn3BKj+i22Rg pBLJkA3R3jEizXBOKBPS8OuZRHX+5KYwfzxj2ZtmND2+rdaHpALfBK/x6P2rIRbN0a9K pvTHivZVs3GLebAFb5LIrZeQx1vhPf4duo92KAeZwI8CoiTOoVYyXCDspT6peT5p04+f Hn3DgwEhb8Suxzb+LYMdCdmtEoHNsH0/IT93Jpgc27xW+yfZzGfCtNxc5HTiIDSpGcfX OI4yireONrwUE4d9k4ymSRwpoIvxPLje70ohLJS33sJSEy2cFligw7PHTGKn4mtqdc7S mbtA== X-Gm-Message-State: AOJu0YwhI/Bes8/yQA+3wGDnnlFZmxyuA2PNFz4+vsTkmsx4JgsUldcS tuWNUE2irB3fHu67sQGgpVNXG6hLWRZJaC68IJGbC47XCXAgbuTp54flwKuFNs7nzGLfUbCkbv9 P X-Received: by 2002:a17:902:f544:b0:1f7:111c:2d53 with SMTP id d9443c01a7336-1f9aa4612a0mr39522375ad.45.1718830805847; Wed, 19 Jun 2024 14:00:05 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 12/24] tcg/loongarch64: Support LASX in tcg_out_addsub_vec Date: Wed, 19 Jun 2024 13:59:40 -0700 Message-Id: <20240619205952.235946-13-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::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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 | 36 ++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 47011488dd..652aa261a3 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1758,21 +1758,25 @@ static void tcg_out_dupi_vec(TCGContext *s, TCGType type, unsigned vece, tcg_out_dup_vec(s, type, vece, rd, TCG_REG_TMP0); } -static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0, - const TCGArg a1, const TCGArg a2, +static void tcg_out_addsub_vec(TCGContext *s, bool lasx, unsigned vece, + TCGArg a0, TCGArg a1, TCGArg a2, bool a2_is_const, bool is_add) { - static const LoongArchInsn add_vec_insn[4] = { - OPC_VADD_B, OPC_VADD_H, OPC_VADD_W, OPC_VADD_D + static const LoongArchInsn add_vec_insn[2][4] = { + { OPC_VADD_B, OPC_VADD_H, OPC_VADD_W, OPC_VADD_D }, + { OPC_XVADD_B, OPC_XVADD_H, OPC_XVADD_W, OPC_XVADD_D }, }; - static const LoongArchInsn add_vec_imm_insn[4] = { - OPC_VADDI_BU, OPC_VADDI_HU, OPC_VADDI_WU, OPC_VADDI_DU + static const LoongArchInsn add_vec_imm_insn[2][4] = { + { OPC_VADDI_BU, OPC_VADDI_HU, OPC_VADDI_WU, OPC_VADDI_DU }, + { OPC_XVADDI_BU, OPC_XVADDI_HU, OPC_XVADDI_WU, OPC_XVADDI_DU }, }; - static const LoongArchInsn sub_vec_insn[4] = { - OPC_VSUB_B, OPC_VSUB_H, OPC_VSUB_W, OPC_VSUB_D + static const LoongArchInsn sub_vec_insn[2][4] = { + { OPC_VSUB_B, OPC_VSUB_H, OPC_VSUB_W, OPC_VSUB_D }, + { OPC_XVSUB_B, OPC_XVSUB_H, OPC_XVSUB_W, OPC_XVSUB_D }, }; - static const LoongArchInsn sub_vec_imm_insn[4] = { - OPC_VSUBI_BU, OPC_VSUBI_HU, OPC_VSUBI_WU, OPC_VSUBI_DU + static const LoongArchInsn sub_vec_imm_insn[2][4] = { + { OPC_VSUBI_BU, OPC_VSUBI_HU, OPC_VSUBI_WU, OPC_VSUBI_DU }, + { OPC_XVSUBI_BU, OPC_XVSUBI_HU, OPC_XVSUBI_WU, OPC_XVSUBI_DU }, }; LoongArchInsn insn; @@ -1783,10 +1787,10 @@ static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0, value = -value; } if (value < 0) { - insn = sub_vec_imm_insn[vece]; + insn = sub_vec_imm_insn[lasx][vece]; value = -value; } else { - insn = add_vec_imm_insn[vece]; + insn = add_vec_imm_insn[lasx][vece]; } /* Constraint TCG_CT_CONST_VADD ensures validity. */ @@ -1797,9 +1801,9 @@ static void tcg_out_addsub_vec(TCGContext *s, unsigned vece, const TCGArg a0, } if (is_add) { - insn = add_vec_insn[vece]; + insn = add_vec_insn[lasx][vece]; } else { - insn = sub_vec_insn[vece]; + insn = sub_vec_insn[lasx][vece]; } tcg_out32(s, encode_vdvjvk_insn(insn, a0, a1, a2)); } @@ -1963,10 +1967,10 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, } break; case INDEX_op_add_vec: - tcg_out_addsub_vec(s, vece, a0, a1, a2, const_args[2], true); + tcg_out_addsub_vec(s, false, vece, a0, a1, a2, const_args[2], true); break; case INDEX_op_sub_vec: - tcg_out_addsub_vec(s, vece, a0, a1, a2, const_args[2], false); + tcg_out_addsub_vec(s, false, vece, a0, a1, a2, const_args[2], false); break; case INDEX_op_neg_vec: tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], a0, a1)); From patchwork Wed Jun 19 20:59:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805640 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14261wrt; Wed, 19 Jun 2024 14:02:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWED3arGgedQYnLKWhnqKaT98cpjol3MdO72Gc2NBAlF+n39IDamcqJxM+eDkZl7w0K7SuLrDB6bNbXPTawfAfA X-Google-Smtp-Source: AGHT+IF5u3i9M356Inf4hGLGo5147sMcEdX8EYeWJ6+TUG3dX55CiErZcdIx0GwYe6WDqo+0pdeK X-Received: by 2002:a05:622a:44f:b0:43e:26ab:4fc1 with SMTP id d75a77b69052e-444a7a5e95dmr35416211cf.42.1718830931301; Wed, 19 Jun 2024 14:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830931; cv=none; d=google.com; s=arc-20160816; b=VJ+YpYfNUb7AOyPvFFq7TOVyGT31zZ4tg4PG21jO8xL2W0ICYRCXIcY+m/0mXSRkra 9MTWRsWAqovifBvZUILH4zmLVshngAn98lr7ImxSVgsFpi2h69zPV9z3GKayOgXy3pfw 5zbZrzF6lYZfJlkzbc6JA72wg/C3YScHlijWJBv8DEl030V1Qfx4saYlau/R8HLsMOpX Mz5dNTQqVahIU7D+NjWEDPfkWI7nC/tt2o7u/+pH+//Grntp7839D/5eKrUSx8j+XGH6 xo4LMstjAKUQgUBViMBKXKx5LpDm6rhR085COpRaJ38YVZxZbCDJWVlqHzufSRnP1g1r TelQ== 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:to:from :dkim-signature; bh=QaWwTBCdRRXgMoR1CYWn0PFxysR4ccqinTVsqlx0hVw=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=EVnLKWY90SjF18rnMdWeaE/tb6fbIOzmMloMuXaexCqtVTXfjLavTpy0CNnM5LcTSK 6f2IQNhXFOWppvzkkstRkqNRQrGvTs1MM6aMxGDwUwWZXwGoq8sQdedkqdL5gU1PLmZ5 BFrY2k9sBVeXPogO5EKWBmSzTzXUFNvepSiSgXA3T8pKiKSIxe0DtdSFY6jkW57pBWia tmHLRBjmgZH4P8gJVIa10a+bnWQWlXreu6i1h0ymIK8Q3cpevwhG3GWal38RZtv798F9 +wQ6xCdGVL51PrBTMU/FAdFgZFZnOjoA02CaY4M6JLZ7Vhsb1/3pXtArIUVXbiLjA2ao C9gg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d6nK09Vs; 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-444aba43300si22566691cf.101.2024.06.19.14.02.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:11 -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=d6nK09Vs; 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 1sK2Pf-0002IX-5r; Wed, 19 Jun 2024 17:00:15 -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 1sK2Pd-0002Gd-LA for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:13 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pa-0000bD-Cw for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:13 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-6e4dbca52f0so177575a12.0 for ; Wed, 19 Jun 2024 14:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830808; x=1719435608; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QaWwTBCdRRXgMoR1CYWn0PFxysR4ccqinTVsqlx0hVw=; b=d6nK09VswNkxvHfRMkGC3tlhKGZxyNEo73nHhILruNeo2XyoKY8POQojy8mibc4ikb m/SWka26+B3iDYr/iPN5cMhfqM2y3dhPEacXhVLPyK9FrnUpAzBUWkv5Zix0xxSeKEEd ewXpiqtgXwXFMA8y6Ncmn1rgeQc9BOsiIgBfFQcGRTuT3AxbnpUKHw29LNHmIfou2E6K kGQVG718wwCPe9luqJ6o2Xrpp/2SsN5vcHMvM9DleXHNGXVFMJrxYCVoz45a4TBQtcTZ ygxxGHN4TUScP6/ZETbFmxbl3gxGEaEWd++qg7XPwHUnqNxeY+kDc8yWS7Otq2n5vmhq jvCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830808; x=1719435608; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QaWwTBCdRRXgMoR1CYWn0PFxysR4ccqinTVsqlx0hVw=; b=CvsxTn9i+fwJoSHUiZwE9+rEN6lY6XWsLf+IxFlFIAMfvJXAmCt5+tAljzRBv7DT3o xg3Zrq4uf3wNZky//j7Nc8SMIfL4OJ9tipNgTpwYGL7DSejETVwvW+hT8/VWozq+Biq8 sQgJBn9PdppvQrlKomPh4LJ1QTTieOdk8WB92hdYRCYjXR2QaUjaYbOHETMSEdIfMkcl rV8ZjkL7l+nrl6iz/2LkddfEsdxS3zCRy6aRJ0KewpHzBb6pP2ylxZSaUn7inyk9Kk41 oLvS4XgQmf7JbZQV9BdOV13CspF5lZKFz3/uam9YAfMf1Wf0IgDko5VozgMOKLHTKTP8 JCUg== X-Gm-Message-State: AOJu0YwDzpcMjD9RKTKfd3PksmAkRoZ4TzTQTtk61/JCl9jGuNYPQGrT UFnqVBNrVtE9WPd1WJb7ZbsXQCXx9FEegiA9hMfqiXbND2L+p11Jv9B+xKUSxtI1CEfDmvIyJ50 X X-Received: by 2002:a17:903:11ce:b0:1f4:b859:cb60 with SMTP id d9443c01a7336-1f9aa396f5amr39165055ad.10.1718830806656; Wed, 19 Jun 2024 14:00:06 -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 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 13/24] tcg/loongarch64: Split out vdvjvk in tcg_out_vec_op Date: Wed, 19 Jun 2024 13:59:41 -0700 Message-Id: <20240619205952.235946-14-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::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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 --- tcg/loongarch64/tcg-target.c.inc | 119 ++++++++++++++++--------------- 1 file changed, 63 insertions(+), 56 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 652aa261a3..8f5f38aa0a 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1900,49 +1900,55 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, tcg_out_ld(s, type, a0, a1, a2); break; case INDEX_op_and_vec: - tcg_out_opc_vand_v(s, a0, a1, a2); - break; + insn = OPC_VAND_V; + goto vdvjvk; case INDEX_op_andc_vec: /* * vandn vd, vj, vk: vd = vk & ~vj * andc_vec vd, vj, vk: vd = vj & ~vk - * vk and vk are swapped + * vj and vk are swapped */ - tcg_out_opc_vandn_v(s, a0, a2, a1); - break; + a1 = a2; + a2 = args[1]; + insn = OPC_VANDN_V; + goto vdvjvk; case INDEX_op_or_vec: - tcg_out_opc_vor_v(s, a0, a1, a2); - break; + insn = OPC_VOR_V; + goto vdvjvk; case INDEX_op_orc_vec: - tcg_out_opc_vorn_v(s, a0, a1, a2); - break; + insn = OPC_VORN_V; + goto vdvjvk; case INDEX_op_xor_vec: - tcg_out_opc_vxor_v(s, a0, a1, a2); - break; - case INDEX_op_nor_vec: - tcg_out_opc_vnor_v(s, a0, a1, a2); - break; + insn = OPC_VXOR_V; + goto vdvjvk; case INDEX_op_not_vec: - tcg_out_opc_vnor_v(s, a0, a1, a1); - break; + a2 = a1; + /* fall through */ + case INDEX_op_nor_vec: + insn = OPC_VNOR_V; + goto vdvjvk; case INDEX_op_cmp_vec: { TCGCond cond = args[3]; + if (const_args[2]) { /* * cmp_vec dest, src, value * Try vseqi/vslei/vslti */ int64_t value = sextract64(a2, 0, 8 << vece); - if ((cond == TCG_COND_EQ || cond == TCG_COND_LE || \ - cond == TCG_COND_LT) && (-0x10 <= value && value <= 0x0f)) { - tcg_out32(s, encode_vdvjsk5_insn(cmp_vec_imm_insn[cond][vece], \ - a0, a1, value)); + if ((cond == TCG_COND_EQ || + cond == TCG_COND_LE || + cond == TCG_COND_LT) && + (-0x10 <= value && value <= 0x0f)) { + insn = cmp_vec_imm_insn[cond][vece]; + tcg_out32(s, encode_vdvjsk5_insn(insn, a0, a1, value)); break; - } else if ((cond == TCG_COND_LEU || cond == TCG_COND_LTU) && - (0x00 <= value && value <= 0x1f)) { - tcg_out32(s, encode_vdvjuk5_insn(cmp_vec_imm_insn[cond][vece], \ - a0, a1, value)); + } else if ((cond == TCG_COND_LEU || + cond == TCG_COND_LTU) && + (0x00 <= value && value <= 0x1f)) { + insn = cmp_vec_imm_insn[cond][vece]; + tcg_out32(s, encode_vdvjuk5_insn(insn, a0, a1, value)); break; } @@ -1963,9 +1969,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, insn = cmp_vec_insn[cond][vece]; tcg_debug_assert(insn != 0); } - tcg_out32(s, encode_vdvjvk_insn(insn, a0, a1, a2)); } - break; + goto vdvjvk; case INDEX_op_add_vec: tcg_out_addsub_vec(s, false, vece, a0, a1, a2, const_args[2], true); break; @@ -1976,41 +1981,41 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], a0, a1)); break; case INDEX_op_mul_vec: - tcg_out32(s, encode_vdvjvk_insn(mul_vec_insn[vece], a0, a1, a2)); - break; + insn = mul_vec_insn[vece]; + goto vdvjvk; case INDEX_op_smin_vec: - tcg_out32(s, encode_vdvjvk_insn(smin_vec_insn[vece], a0, a1, a2)); - break; + insn = smin_vec_insn[vece]; + goto vdvjvk; case INDEX_op_smax_vec: - tcg_out32(s, encode_vdvjvk_insn(smax_vec_insn[vece], a0, a1, a2)); - break; + insn = smax_vec_insn[vece]; + goto vdvjvk; case INDEX_op_umin_vec: - tcg_out32(s, encode_vdvjvk_insn(umin_vec_insn[vece], a0, a1, a2)); - break; + insn = umin_vec_insn[vece]; + goto vdvjvk; case INDEX_op_umax_vec: - tcg_out32(s, encode_vdvjvk_insn(umax_vec_insn[vece], a0, a1, a2)); - break; + insn = umax_vec_insn[vece]; + goto vdvjvk; case INDEX_op_ssadd_vec: - tcg_out32(s, encode_vdvjvk_insn(ssadd_vec_insn[vece], a0, a1, a2)); - break; + insn = ssadd_vec_insn[vece]; + goto vdvjvk; case INDEX_op_usadd_vec: - tcg_out32(s, encode_vdvjvk_insn(usadd_vec_insn[vece], a0, a1, a2)); - break; + insn = usadd_vec_insn[vece]; + goto vdvjvk; case INDEX_op_sssub_vec: - tcg_out32(s, encode_vdvjvk_insn(sssub_vec_insn[vece], a0, a1, a2)); - break; + insn = sssub_vec_insn[vece]; + goto vdvjvk; case INDEX_op_ussub_vec: - tcg_out32(s, encode_vdvjvk_insn(ussub_vec_insn[vece], a0, a1, a2)); - break; + insn = ussub_vec_insn[vece]; + goto vdvjvk; case INDEX_op_shlv_vec: - tcg_out32(s, encode_vdvjvk_insn(shlv_vec_insn[vece], a0, a1, a2)); - break; + insn = shlv_vec_insn[vece]; + goto vdvjvk; case INDEX_op_shrv_vec: - tcg_out32(s, encode_vdvjvk_insn(shrv_vec_insn[vece], a0, a1, a2)); - break; + insn = shrv_vec_insn[vece]; + goto vdvjvk; case INDEX_op_sarv_vec: - tcg_out32(s, encode_vdvjvk_insn(sarv_vec_insn[vece], a0, a1, a2)); - break; + insn = sarv_vec_insn[vece]; + goto vdvjvk; case INDEX_op_shli_vec: tcg_out32(s, encode_vdvjuk3_insn(shli_vec_insn[vece], a0, a1, a2)); break; @@ -2020,15 +2025,14 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_sari_vec: tcg_out32(s, encode_vdvjuk3_insn(sari_vec_insn[vece], a0, a1, a2)); break; - case INDEX_op_rotrv_vec: - tcg_out32(s, encode_vdvjvk_insn(rotrv_vec_insn[vece], a0, a1, a2)); - break; case INDEX_op_rotlv_vec: /* rotlv_vec a1, a2 = rotrv_vec a1, -a2 */ tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], temp_vec, a2)); - tcg_out32(s, encode_vdvjvk_insn(rotrv_vec_insn[vece], a0, a1, - temp_vec)); - break; + a2 = temp_vec; + /* fall through */ + case INDEX_op_rotrv_vec: + insn = rotrv_vec_insn[vece]; + goto vdvjvk; case INDEX_op_rotli_vec: /* rotli_vec a1, a2 = rotri_vec a1, -a2 */ a2 = extract32(-a2, 0, 3 + vece); @@ -2058,6 +2062,9 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, break; default: g_assert_not_reached(); + vdvjvk: + tcg_out32(s, encode_vdvjvk_insn(insn, a0, a1, a2)); + break; } } 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(); } From patchwork Wed Jun 19 20:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805632 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp13947wrt; Wed, 19 Jun 2024 14:01:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUDmBV8Nx04vAOKRY9P6WAE2vaSeRZlgMlX0C22UswqLtFJd+cHzQBjw/dk/1OekyElqPTLnd+Z1T2sHSgrYNZU X-Google-Smtp-Source: AGHT+IGAtr3Y2Qo9gmad94HvIx64wiC3F/h8fFceH4wLo7+iskK6IgHloTMXsYkTqZbvzUHJo2Cy X-Received: by 2002:a81:b65c:0:b0:62c:e939:2ffe with SMTP id 00721157ae682-63a968de222mr39708317b3.7.1718830888533; Wed, 19 Jun 2024 14:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830888; cv=none; d=google.com; s=arc-20160816; b=YzNLFHlem4xDzCm9NI12F1x8M+kKusQ4xRmffkfnsXarIkyIDjb51fKJ45ROfMhSXx kGEfxdraiP6+FtacNIZChcMjrIZ99DAmjIwn2ditNYH//Ecty1XR3beeRuX4ESanP43k oqJcRmrgah20+3+FA3lp+RjhzhnsXrVyjdqdbPG/s89zQMKK/lmUxZ1d2gi+50IeAS2c CEO5Tj86YOHMy8O4sso0/n6v317G4fA6AhT50i533EQnmVP2HcXLmNbNISGpeofoxrWE +MgGDDIPdtAo+PlCcc55B5tSRam0nDBSA7GOBvXV/hSUaRl8y16U/PxGrOn5UGnvUrg6 Ofhg== 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=EaeM+0q5EwrcxAQIdVCE42v6QSxVbiZP1wP+3ptJ+AM=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=oOf9gLx7j+VWI7UU7Chj2iAyeHPIJspnirOyrOTR+jspsyO+AxDHPgpa4IfBNfRz03 qitFFf1q0n/trwNuwjvCPvon32QdRpHujtGn1XKJ0tQ4RNWZ89OKlfl+e58D2nVgAJxq 5myooCcMIwFI4G1ahHBilFRXyGfZfPzjuwcPfuPR8CwftCKI+NcvQAEdBqoIn5gGoW0G GndBImeDgGGxtjOeES+D/KOzYle2FvcHXM58xalwa/lhudiktVDxpWVmiyYmW5j0VHhK INsi5lQRqDxmzFY57VMiiFolKzAC4+QWYu1l23DAg1XImoBGwVYREHFBpkIeVpum8bWh 0tDA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MyukPaXz; 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-6b5060f8b8fsi21787246d6.295.2024.06.19.14.01.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:28 -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=MyukPaXz; 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-0002KU-IS; 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 1sK2Pe-0002Ga-Fc for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:14 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pa-0000bI-GD for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:13 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1f44b594deeso1813665ad.2 for ; Wed, 19 Jun 2024 14:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830808; x=1719435608; 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=EaeM+0q5EwrcxAQIdVCE42v6QSxVbiZP1wP+3ptJ+AM=; b=MyukPaXzToy9KErCYOmdPtTpt42FKwJTVagNk0RE2uQRREq1RIqPgjk0tXsZtVSmw4 DxDgpOFLQKKajKEa4My2924bCcZ42cYamNFbJr2Wsmv1PK/uuOVO1SAVXhDITZ85bhr8 Mu3qRhKy59C2/b4rPc78cB6QHIeuTVYCS2F/MEY6RdNDdmcgnhU5shItCHIAYX7wBfoH /WD2UCmlWyiJUWL8s9TKjrTRhAMPoilc/LtwsY0klMo2xVLBb9GGg/hSbBi0oBvVfY9T K6/UdS//ek5ma6GM3eygG2thjLdOT5yBqfPmtmheJwx9l0EdlZ9wZpd6Z1wQRk/VvVAn UMjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830808; x=1719435608; 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=EaeM+0q5EwrcxAQIdVCE42v6QSxVbiZP1wP+3ptJ+AM=; b=IYl9iR7ZwA2QG2nhkrb9wkmTYIIN5QGhX9eX2gRj5wcfFyl8bh+T19g1Fh67WQ8eX/ NqIeyFyKLB7akBpKuREgO1yIiCDn+XeZNKY12aQAjT7VA7VW9A3EWjL95C+MmHk0p2Xo 2rcixAQCiGH50ar/E8AjCH3Tj0ENPxiAowZ1My0bZBkQpE4HKLOLhZv3oZawcFQVJ+ac VopnHVCRCIwbcm0YEZ6CsztLSAdzijnYda+h6JQxCafD2wXAZfvARDKWOvhjMydFWdlN rFPd/y+7idFuWBbo5+5g/ShBvzbJg9RMpxoXM5KxEbqzNEVJJZAeUc3VFUBpayEIhz9a ZIGw== X-Gm-Message-State: AOJu0Yz+LRaMfIwD5xJQFSWzRsN4CXnf8titlRbgro8WAY37CyCUlRra yLvOSXAyqndUeeTLbREAVqbLUmaLWE1S9JgXVdwcJj5WZsS0m2dfI6B+jTGjGOITEWhQxJrhQfE 7 X-Received: by 2002:a17:902:e543:b0:1f4:9e69:a8f9 with SMTP id d9443c01a7336-1f9aa67dffamr35951495ad.62.1718830808218; Wed, 19 Jun 2024 14:00:08 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.07 (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 , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/24] tcg/loongarch64: Remove temp_vec from tcg_out_vec_op Date: Wed, 19 Jun 2024 13:59:43 -0700 Message-Id: <20240619205952.235946-16-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::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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 Use TCG_VEC_TMP0 directly. Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 4ead3bedef..1d9e0bf028 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1834,7 +1834,6 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, { TCGType type = vecl + TCG_TYPE_V64; TCGArg a0, a1, a2, a3; - TCGReg temp_vec = TCG_VEC_TMP0; static const LoongArchInsn cmp_vec_insn[16][4] = { [TCG_COND_EQ] = {OPC_VSEQ_B, OPC_VSEQ_H, OPC_VSEQ_W, OPC_VSEQ_D}, @@ -1976,8 +1975,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, * dupi_vec temp, a2 * cmp_vec a0, a1, temp, cond */ - tcg_out_dupi_vec(s, type, vece, temp_vec, a2); - a2 = temp_vec; + tcg_out_dupi_vec(s, type, vece, TCG_VEC_TMP0, a2); + a2 = TCG_VEC_TMP0; } insn = cmp_vec_insn[cond][vece]; @@ -2046,8 +2045,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, break; case INDEX_op_rotlv_vec: /* rotlv_vec a1, a2 = rotrv_vec a1, -a2 */ - tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], temp_vec, a2)); - a2 = temp_vec; + tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], TCG_VEC_TMP0, a2)); + a2 = TCG_VEC_TMP0; /* fall through */ case INDEX_op_rotrv_vec: insn = rotrv_vec_insn[vece]; From patchwork Wed Jun 19 20:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805641 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14277wrt; Wed, 19 Jun 2024 14:02:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwhz1aw8I7pAe5Ey+l8dxTFnPL+wrHGRMRMsaZWcur7qp1rXGJv+u+1WarN1Bly1iULbZQLZPM9iCjGkYiC05+ X-Google-Smtp-Source: AGHT+IGGYS5KwAhG6ueLzTtPqSZBXd0IYWyRdHEo6h27SK7S6rqgYNNi9gdSUy2bpEoe4vEJD8wp X-Received: by 2002:a05:620a:45a0:b0:795:a5d3:70f3 with SMTP id af79cd13be357-79bb3e38c21mr398972085a.22.1718830934073; Wed, 19 Jun 2024 14:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830934; cv=none; d=google.com; s=arc-20160816; b=iSbnx05cog3orKHwBYHHS+bG93AvFfBnhmHeIM92aqNrsCGifOn0+KeJ1nsGZNxOhg mX9uxhqRhFDr8gT6W3CUyGld+eYW2B0AXD24dPebqVgJtKnAuKyHl4Txyek92mHY5/nW X3SSqMhc6sifqSHuMqi87qT5jDcwVlEJvd0TwVi3ecDBYqp2G/wZlF4/Y3WgzHz3DJeT GdTQa+bOe8CYyuuIVdZkXuSORKLvSaOe/R6OKOLZuxH7UhNgOPhFBX/DyUwCBQuXSScG 4uK7svBSukBpvTA15NIChKMDEmw6ChYa24MV3CcbPBkIQucauyp151OiosVPdDu7UBqr cs6g== 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=JXrcZPJg9tD8QWTHQJSaM14aI8LugozoDgK8l3jvBvo=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=St/i0+2JSKcI1vaKS7hEznyP5oj3QLTrr8HQoTCWC5SWHfx69wg6MS89zaB1C0W6EH rdDVLZE9uhh6sSIpctiTrjKXb3HEGgW2nGCWDPfC8/pMM7eQIX6TSZzh7taAK0BgWtcw rqybvnjVQq6pgTZg0CzKeNRX702rwgXknjJ9i5qAiGZDHK9vyLt80XDHBuWZnOLsu+zn ZAjcrMnnIiSpwF4k6chW/mMHbvKKUtCF6gXYY1mieD7nLJ9hmuaS/XnE6k2tugT60lZS nwfxuRBpsxhIWFK8JQJ610MZRsUfnJcKUbEMCF971coJRb4kR3y76C6VnO2OtMXqufkl FbGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YwCBA3DO; 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-798aadc0db0si1530039585a.190.2024.06.19.14.02.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02:14 -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=YwCBA3DO; 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 1sK2Pi-0002Lo-Di; Wed, 19 Jun 2024 17:00:18 -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-0002Ia-4S for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:15 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pc-0000cX-0s for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:14 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1f64ecb1766so1513645ad.1 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=JXrcZPJg9tD8QWTHQJSaM14aI8LugozoDgK8l3jvBvo=; b=YwCBA3DOhof1nrSC3TBqGkKlt5bS1sZG3OCTBVKqlawz6M7e/yPXgznCiud2qP93c9 a8y6STFxIGPK1Z0fRCPX/ElGv45SeVkh/22xELzhOzMU7z9ZoxQyaMW63/PBOaTK+gAp JFlNHt/lcn402fiI7cTde4FOuaoePCtV0HnQAIIg4E0oAt1EtGEcQ7Gn/nnhD2v2rM4s tND22N8cdse4ko4WYK734l+SrZA2Dr6uW4uHreXfoRYhXIm+QlodI0ciquz/ibdWo6i8 Jm/EEukj+9rUo+yo6UmlbXDzEdSh6d73Xgo9ORLv+5EAOx4ydLzL3rrgFtZsT4NqUbHB mEgg== 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=JXrcZPJg9tD8QWTHQJSaM14aI8LugozoDgK8l3jvBvo=; b=N+H/zFkUHJbdt6h0/dn+NL8L1xAx7co2jbWgkmoX9zb4npMMd9d7BelLqzp0YPG/Bb QQyveP5Bazy2zsVU18hLJo5F8nPIzpwk8+CMn8/ztP3nXiiw9/eeNTHw+ksGC3hVWljr r4lxK8bWj/AsWVYmR+bD+g8IvMwIaqSx7cpgTzfGp93gyM56T2auIxBXBHQkwHUsfHuX WiCOgY7CDQnQlHJ8lHbDTZALkLdApMUci7MvEacY6AMVWxxbjlsx8B0OlrmfarMh8lmc 7yRlUaPyOcArU82JZcY2/oqvqGrbN16NWfNG2uP6J5K1NAz3D4K8noW3VhUA1PTCgCFo 3gnw== X-Gm-Message-State: AOJu0YzS62TA46jy/MJFMr0GiC3MM3l9lLDNyCggZ2bgGTkfXZH3DTcJ isMGXa1W2Wp/CoDiqkiWUgvaWUSf0jYCQxRw7b+KDHDWhM5ZuxGZTkJ0gLe2R2IFa2ah4c4XBzW A X-Received: by 2002:a17:902:dac6:b0:1f8:6bc7:e9db with SMTP id d9443c01a7336-1f9aa3c33b3mr30597725ad.23.1718830808988; Wed, 19 Jun 2024 14:00:08 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 16/24] tcg/loongarch64: Split out vdvjukN in tcg_out_vec_op Date: Wed, 19 Jun 2024 13:59:44 -0700 Message-Id: <20240619205952.235946-17-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::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 Fixes a bug in the immediate shifts, because the exact encoding depends on the element size. Reviewed-by: Song Gao Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 58 ++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 1d9e0bf028..ab1b67e028 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1901,6 +1901,9 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, static const LoongArchInsn rotrv_vec_insn[4] = { OPC_VROTR_B, OPC_VROTR_H, OPC_VROTR_W, OPC_VROTR_D }; + static const LoongArchInsn rotri_vec_insn[4] = { + OPC_VROTRI_B, OPC_VROTRI_H, OPC_VROTRI_W, OPC_VROTRI_D + }; a0 = args[0]; a1 = args[1]; @@ -2034,15 +2037,6 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_sarv_vec: insn = sarv_vec_insn[vece]; goto vdvjvk; - case INDEX_op_shli_vec: - tcg_out32(s, encode_vdvjuk3_insn(shli_vec_insn[vece], a0, a1, a2)); - break; - case INDEX_op_shri_vec: - tcg_out32(s, encode_vdvjuk3_insn(shri_vec_insn[vece], a0, a1, a2)); - break; - case INDEX_op_sari_vec: - tcg_out32(s, encode_vdvjuk3_insn(sari_vec_insn[vece], a0, a1, a2)); - break; case INDEX_op_rotlv_vec: /* rotlv_vec a1, a2 = rotrv_vec a1, -a2 */ tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], TCG_VEC_TMP0, a2)); @@ -2051,26 +2045,20 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_rotrv_vec: insn = rotrv_vec_insn[vece]; goto vdvjvk; + case INDEX_op_shli_vec: + insn = shli_vec_insn[vece]; + goto vdvjukN; + case INDEX_op_shri_vec: + insn = shri_vec_insn[vece]; + goto vdvjukN; + case INDEX_op_sari_vec: + insn = sari_vec_insn[vece]; + goto vdvjukN; case INDEX_op_rotli_vec: /* rotli_vec a1, a2 = rotri_vec a1, -a2 */ a2 = extract32(-a2, 0, 3 + vece); - switch (vece) { - case MO_8: - tcg_out_opc_vrotri_b(s, a0, a1, a2); - break; - case MO_16: - tcg_out_opc_vrotri_h(s, a0, a1, a2); - break; - case MO_32: - tcg_out_opc_vrotri_w(s, a0, a1, a2); - break; - case MO_64: - tcg_out_opc_vrotri_d(s, a0, a1, a2); - break; - default: - g_assert_not_reached(); - } - break; + insn = rotri_vec_insn[vece]; + goto vdvjukN; case INDEX_op_bitsel_vec: /* vbitsel vd, vj, vk, va = bitsel_vec vd, va, vk, vj */ tcg_out_opc_vbitsel_v(s, a0, a3, a2, a1); @@ -2083,6 +2071,24 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, vdvjvk: tcg_out32(s, encode_vdvjvk_insn(insn, a0, a1, a2)); break; + vdvjukN: + switch (vece) { + case MO_8: + tcg_out32(s, encode_vdvjuk3_insn(insn, a0, a1, a2)); + break; + case MO_16: + tcg_out32(s, encode_vdvjuk4_insn(insn, a0, a1, a2)); + break; + case MO_32: + tcg_out32(s, encode_vdvjuk5_insn(insn, a0, a1, a2)); + break; + case MO_64: + tcg_out32(s, encode_vdvjuk6_insn(insn, a0, a1, a2)); + break; + default: + g_assert_not_reached(); + } + break; } } From patchwork Wed Jun 19 20:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805642 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14364wrt; Wed, 19 Jun 2024 14:02:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWphAe0Dh2AzIiDXKHZDoes0JXdusWLCUDZsRzozYHZHsExv2NX6HCOkmDrbgWjzRSkdS5dT9NljT+CUre0bVud X-Google-Smtp-Source: AGHT+IF74s4uYrfN7auisxyu7yP2EAElLsHF+vKmhU+U6ttZjv5wbYl0VwvCu21dCKYlZfJjmH1X X-Received: by 2002:a05:622a:447:b0:43d:e502:ca3a with SMTP id d75a77b69052e-444a7ae1373mr42437411cf.61.1718830947233; Wed, 19 Jun 2024 14:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830947; cv=none; d=google.com; s=arc-20160816; b=v4ZLGSiYz1yzPVezyF2UnzeZ3voWLqeehTaOdosthJlKxR2x4C1zIzVGp0Bbr4zZmv CP4ElnoXarhaCV0YSiCmZRTyX1c/W/LzX+I16Ser3xm/vyr1m4EqwbIXQIFRXEF2DBTr zoJCDlzxeYBdNrkFgu9d7MZ6hfpcNRaOJTlr922K22CnJXbytU9hb0Z8Tf0AZGyx384z 0fORnOKQJkd5L2MQX5JEjZEDrG/5mK5OPEPFH07qeQf4mW6fEmp82SjIu4T6QhhUB4j6 +sg5l1jAoJgSo3Uy/49xVuZVZZuoWxEiSC3V/7VTVs+N7gUPSaFVPOVmJrYz8ugTRTO3 FAZw== 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=pKF85XYBPRWVEg3m5iDHLtbCWhvyq+hgk87lkUx4Hqo=; fh=KXT8skN7RFTc7N6YjUNlSMSjM9WXZW43UAg6bOEDSoc=; b=FWN7+rzrCxZAY7CwVcGj7DvsnOI+4D3TjznrR07zBp/aeYHd06tU7It1+YWMauAjQL u2b5B42n8hJnhIucxTAZk6mK2MgAFcM6aY3b+ZTkXIvmK9h/8K1S1IEfppemDtf8nZtJ E5QGqJcjewPgUq1hbIaNPcRR/XuSXvlglcZRVENry4+wkZ5c+Gu0O7sPL2TAMBK+jy6J AzN7bur5DJ0c7pO+EejALPWYkp3sJ7QHELeNL5jxrlWArP2j4obgjbUByt5lA7hE3DBM gkFrs4SZ+tVeiPI1ExYrYvEsVH+QGf0cT9bnX3CLc4ZlJbVsRVfgHqBwG4BBPqkI28lE pqUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uR+gGS9H; 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-441f2fe0bfcsi165186691cf.561.2024.06.19.14.02.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:02: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=uR+gGS9H; 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 1sK2Pi-0002Lk-Bh; Wed, 19 Jun 2024 17:00:18 -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-0002J9-DU for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:15 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pc-0000d9-8E for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:15 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1f480624d0dso1643855ad.1 for ; Wed, 19 Jun 2024 14:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830810; x=1719435610; 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=pKF85XYBPRWVEg3m5iDHLtbCWhvyq+hgk87lkUx4Hqo=; b=uR+gGS9HSEgrFLzqmKrKw8ZEQ6qRzVa/8vJE92YQMCcPwmHUxJytDunFtI1rZXt7yu rrl65NgZNqZtkwQqljaNwa1KyGd5rFQuUQnnKQZBAJnbisiyLabTOk5jAY60clm96ooi MTm3iMRr3bM36ytndqLIk3JK2UDjDxjM1vZsU/r3m1kF+yUt3d0soKAwv/amGMT18oM8 vxMaqbr+PSo+V1efxtuuU7LbQqq3sVkdlWvNMt1x1l+jrlcS4Pzpnw302a+L95YhD5S0 GfLbovbnYnjftiKxphfjxXB5lJvti77hyAxqOhlfAPWw9K4ac5TAbGYVxbxpRm3qKeCW wlPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830810; x=1719435610; 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=pKF85XYBPRWVEg3m5iDHLtbCWhvyq+hgk87lkUx4Hqo=; b=RJdapb1N3hstIRNmt0rc3D9lybql3KwzCt3Izuu6jzrO0ArQhbBApbZ1eEXAqxuV0f 7c4vLyl536DQIbwWCvDEDQDtRQsjCIJwR4W0lRTv9v1MrqXl/tilCFsRllZB0qQr9iZC 3PJ7EFNAYpOZ14TxNSh9YAE0XHfmZrcmx2QlD1skD1Z/r1nL15S2p0xdVetBTeNRE4u9 igAF6ocKawfoBHmKk4BKlL1fXZUWKp9rKiJ8CL6jIIUJUCVT2jBfjJUtSIwFjTt/45d4 C9f318KM/cUGSX3QICuBFCYubzVolKdXJXTXrbVTqtbHdLzXdF2pjHAs6BpysAocnW43 HgUQ== X-Gm-Message-State: AOJu0YwPFfnkImLfpuuIX4KiDrmtFs2EELb8OGWJBT08SJKDyRy9Zmj/ UkHgbyINCTT978u52nI5b81AvL/hT4zGAq2UqQgOmnJj+D2Jk0WT36wWJCfME90uMkKmqgraqnR d X-Received: by 2002:a17:902:cece:b0:1f7:167d:e289 with SMTP id d9443c01a7336-1f9aa466115mr42797375ad.55.1718830809904; Wed, 19 Jun 2024 14:00:09 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao Subject: [PULL 17/24] tcg/loongarch64: Support LASX in tcg_out_vec_op Date: Wed, 19 Jun 2024 13:59:45 -0700 Message-Id: <20240619205952.235946-18-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::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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 | 223 +++++++++++++++++++------------ 1 file changed, 137 insertions(+), 86 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index ab1b67e028..dff966c395 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -1833,76 +1833,125 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, const int const_args[TCG_MAX_OP_ARGS]) { TCGType type = vecl + TCG_TYPE_V64; + bool lasx = type == TCG_TYPE_V256; TCGArg a0, a1, a2, a3; - - static const LoongArchInsn cmp_vec_insn[16][4] = { - [TCG_COND_EQ] = {OPC_VSEQ_B, OPC_VSEQ_H, OPC_VSEQ_W, OPC_VSEQ_D}, - [TCG_COND_LE] = {OPC_VSLE_B, OPC_VSLE_H, OPC_VSLE_W, OPC_VSLE_D}, - [TCG_COND_LEU] = {OPC_VSLE_BU, OPC_VSLE_HU, OPC_VSLE_WU, OPC_VSLE_DU}, - [TCG_COND_LT] = {OPC_VSLT_B, OPC_VSLT_H, OPC_VSLT_W, OPC_VSLT_D}, - [TCG_COND_LTU] = {OPC_VSLT_BU, OPC_VSLT_HU, OPC_VSLT_WU, OPC_VSLT_DU}, - }; - static const LoongArchInsn cmp_vec_imm_insn[16][4] = { - [TCG_COND_EQ] = {OPC_VSEQI_B, OPC_VSEQI_H, OPC_VSEQI_W, OPC_VSEQI_D}, - [TCG_COND_LE] = {OPC_VSLEI_B, OPC_VSLEI_H, OPC_VSLEI_W, OPC_VSLEI_D}, - [TCG_COND_LEU] = {OPC_VSLEI_BU, OPC_VSLEI_HU, OPC_VSLEI_WU, OPC_VSLEI_DU}, - [TCG_COND_LT] = {OPC_VSLTI_B, OPC_VSLTI_H, OPC_VSLTI_W, OPC_VSLTI_D}, - [TCG_COND_LTU] = {OPC_VSLTI_BU, OPC_VSLTI_HU, OPC_VSLTI_WU, OPC_VSLTI_DU}, - }; LoongArchInsn insn; - static const LoongArchInsn neg_vec_insn[4] = { - OPC_VNEG_B, OPC_VNEG_H, OPC_VNEG_W, OPC_VNEG_D + + static const LoongArchInsn cmp_vec_insn[16][2][4] = { + [TCG_COND_EQ] = { + { OPC_VSEQ_B, OPC_VSEQ_H, OPC_VSEQ_W, OPC_VSEQ_D }, + { OPC_XVSEQ_B, OPC_XVSEQ_H, OPC_XVSEQ_W, OPC_XVSEQ_D }, + }, + [TCG_COND_LE] = { + { OPC_VSLE_B, OPC_VSLE_H, OPC_VSLE_W, OPC_VSLE_D }, + { OPC_XVSLE_B, OPC_XVSLE_H, OPC_XVSLE_W, OPC_XVSLE_D }, + }, + [TCG_COND_LEU] = { + { OPC_VSLE_BU, OPC_VSLE_HU, OPC_VSLE_WU, OPC_VSLE_DU }, + { OPC_XVSLE_BU, OPC_XVSLE_HU, OPC_XVSLE_WU, OPC_XVSLE_DU }, + }, + [TCG_COND_LT] = { + { OPC_VSLT_B, OPC_VSLT_H, OPC_VSLT_W, OPC_VSLT_D }, + { OPC_XVSLT_B, OPC_XVSLT_H, OPC_XVSLT_W, OPC_XVSLT_D }, + }, + [TCG_COND_LTU] = { + { OPC_VSLT_BU, OPC_VSLT_HU, OPC_VSLT_WU, OPC_VSLT_DU }, + { OPC_XVSLT_BU, OPC_XVSLT_HU, OPC_XVSLT_WU, OPC_XVSLT_DU }, + } }; - static const LoongArchInsn mul_vec_insn[4] = { - OPC_VMUL_B, OPC_VMUL_H, OPC_VMUL_W, OPC_VMUL_D + static const LoongArchInsn cmp_vec_imm_insn[16][2][4] = { + [TCG_COND_EQ] = { + { OPC_VSEQI_B, OPC_VSEQI_H, OPC_VSEQI_W, OPC_VSEQI_D }, + { OPC_XVSEQI_B, OPC_XVSEQI_H, OPC_XVSEQI_W, OPC_XVSEQI_D }, + }, + [TCG_COND_LE] = { + { OPC_VSLEI_B, OPC_VSLEI_H, OPC_VSLEI_W, OPC_VSLEI_D }, + { OPC_XVSLEI_B, OPC_XVSLEI_H, OPC_XVSLEI_W, OPC_XVSLEI_D }, + }, + [TCG_COND_LEU] = { + { OPC_VSLEI_BU, OPC_VSLEI_HU, OPC_VSLEI_WU, OPC_VSLEI_DU }, + { OPC_XVSLEI_BU, OPC_XVSLEI_HU, OPC_XVSLEI_WU, OPC_XVSLEI_DU }, + }, + [TCG_COND_LT] = { + { OPC_VSLTI_B, OPC_VSLTI_H, OPC_VSLTI_W, OPC_VSLTI_D }, + { OPC_XVSLTI_B, OPC_XVSLTI_H, OPC_XVSLTI_W, OPC_XVSLTI_D }, + }, + [TCG_COND_LTU] = { + { OPC_VSLTI_BU, OPC_VSLTI_HU, OPC_VSLTI_WU, OPC_VSLTI_DU }, + { OPC_XVSLTI_BU, OPC_XVSLTI_HU, OPC_XVSLTI_WU, OPC_XVSLTI_DU }, + } }; - static const LoongArchInsn smin_vec_insn[4] = { - OPC_VMIN_B, OPC_VMIN_H, OPC_VMIN_W, OPC_VMIN_D + static const LoongArchInsn neg_vec_insn[2][4] = { + { OPC_VNEG_B, OPC_VNEG_H, OPC_VNEG_W, OPC_VNEG_D }, + { OPC_XVNEG_B, OPC_XVNEG_H, OPC_XVNEG_W, OPC_XVNEG_D }, }; - static const LoongArchInsn umin_vec_insn[4] = { - OPC_VMIN_BU, OPC_VMIN_HU, OPC_VMIN_WU, OPC_VMIN_DU + static const LoongArchInsn mul_vec_insn[2][4] = { + { OPC_VMUL_B, OPC_VMUL_H, OPC_VMUL_W, OPC_VMUL_D }, + { OPC_XVMUL_B, OPC_XVMUL_H, OPC_XVMUL_W, OPC_XVMUL_D }, }; - static const LoongArchInsn smax_vec_insn[4] = { - OPC_VMAX_B, OPC_VMAX_H, OPC_VMAX_W, OPC_VMAX_D + static const LoongArchInsn smin_vec_insn[2][4] = { + { OPC_VMIN_B, OPC_VMIN_H, OPC_VMIN_W, OPC_VMIN_D }, + { OPC_XVMIN_B, OPC_XVMIN_H, OPC_XVMIN_W, OPC_XVMIN_D }, }; - static const LoongArchInsn umax_vec_insn[4] = { - OPC_VMAX_BU, OPC_VMAX_HU, OPC_VMAX_WU, OPC_VMAX_DU + static const LoongArchInsn umin_vec_insn[2][4] = { + { OPC_VMIN_BU, OPC_VMIN_HU, OPC_VMIN_WU, OPC_VMIN_DU }, + { OPC_XVMIN_BU, OPC_XVMIN_HU, OPC_XVMIN_WU, OPC_XVMIN_DU }, }; - static const LoongArchInsn ssadd_vec_insn[4] = { - OPC_VSADD_B, OPC_VSADD_H, OPC_VSADD_W, OPC_VSADD_D + static const LoongArchInsn smax_vec_insn[2][4] = { + { OPC_VMAX_B, OPC_VMAX_H, OPC_VMAX_W, OPC_VMAX_D }, + { OPC_XVMAX_B, OPC_XVMAX_H, OPC_XVMAX_W, OPC_XVMAX_D }, }; - static const LoongArchInsn usadd_vec_insn[4] = { - OPC_VSADD_BU, OPC_VSADD_HU, OPC_VSADD_WU, OPC_VSADD_DU + static const LoongArchInsn umax_vec_insn[2][4] = { + { OPC_VMAX_BU, OPC_VMAX_HU, OPC_VMAX_WU, OPC_VMAX_DU }, + { OPC_XVMAX_BU, OPC_XVMAX_HU, OPC_XVMAX_WU, OPC_XVMAX_DU }, }; - static const LoongArchInsn sssub_vec_insn[4] = { - OPC_VSSUB_B, OPC_VSSUB_H, OPC_VSSUB_W, OPC_VSSUB_D + static const LoongArchInsn ssadd_vec_insn[2][4] = { + { OPC_VSADD_B, OPC_VSADD_H, OPC_VSADD_W, OPC_VSADD_D }, + { OPC_XVSADD_B, OPC_XVSADD_H, OPC_XVSADD_W, OPC_XVSADD_D }, }; - static const LoongArchInsn ussub_vec_insn[4] = { - OPC_VSSUB_BU, OPC_VSSUB_HU, OPC_VSSUB_WU, OPC_VSSUB_DU + static const LoongArchInsn usadd_vec_insn[2][4] = { + { OPC_VSADD_BU, OPC_VSADD_HU, OPC_VSADD_WU, OPC_VSADD_DU }, + { OPC_XVSADD_BU, OPC_XVSADD_HU, OPC_XVSADD_WU, OPC_XVSADD_DU }, }; - static const LoongArchInsn shlv_vec_insn[4] = { - OPC_VSLL_B, OPC_VSLL_H, OPC_VSLL_W, OPC_VSLL_D + static const LoongArchInsn sssub_vec_insn[2][4] = { + { OPC_VSSUB_B, OPC_VSSUB_H, OPC_VSSUB_W, OPC_VSSUB_D }, + { OPC_XVSSUB_B, OPC_XVSSUB_H, OPC_XVSSUB_W, OPC_XVSSUB_D }, }; - static const LoongArchInsn shrv_vec_insn[4] = { - OPC_VSRL_B, OPC_VSRL_H, OPC_VSRL_W, OPC_VSRL_D + static const LoongArchInsn ussub_vec_insn[2][4] = { + { OPC_VSSUB_BU, OPC_VSSUB_HU, OPC_VSSUB_WU, OPC_VSSUB_DU }, + { OPC_XVSSUB_BU, OPC_XVSSUB_HU, OPC_XVSSUB_WU, OPC_XVSSUB_DU }, }; - static const LoongArchInsn sarv_vec_insn[4] = { - OPC_VSRA_B, OPC_VSRA_H, OPC_VSRA_W, OPC_VSRA_D + static const LoongArchInsn shlv_vec_insn[2][4] = { + { OPC_VSLL_B, OPC_VSLL_H, OPC_VSLL_W, OPC_VSLL_D }, + { OPC_XVSLL_B, OPC_XVSLL_H, OPC_XVSLL_W, OPC_XVSLL_D }, }; - static const LoongArchInsn shli_vec_insn[4] = { - OPC_VSLLI_B, OPC_VSLLI_H, OPC_VSLLI_W, OPC_VSLLI_D + static const LoongArchInsn shrv_vec_insn[2][4] = { + { OPC_VSRL_B, OPC_VSRL_H, OPC_VSRL_W, OPC_VSRL_D }, + { OPC_XVSRL_B, OPC_XVSRL_H, OPC_XVSRL_W, OPC_XVSRL_D }, }; - static const LoongArchInsn shri_vec_insn[4] = { - OPC_VSRLI_B, OPC_VSRLI_H, OPC_VSRLI_W, OPC_VSRLI_D + static const LoongArchInsn sarv_vec_insn[2][4] = { + { OPC_VSRA_B, OPC_VSRA_H, OPC_VSRA_W, OPC_VSRA_D }, + { OPC_XVSRA_B, OPC_XVSRA_H, OPC_XVSRA_W, OPC_XVSRA_D }, }; - static const LoongArchInsn sari_vec_insn[4] = { - OPC_VSRAI_B, OPC_VSRAI_H, OPC_VSRAI_W, OPC_VSRAI_D + static const LoongArchInsn shli_vec_insn[2][4] = { + { OPC_VSLLI_B, OPC_VSLLI_H, OPC_VSLLI_W, OPC_VSLLI_D }, + { OPC_XVSLLI_B, OPC_XVSLLI_H, OPC_XVSLLI_W, OPC_XVSLLI_D }, }; - static const LoongArchInsn rotrv_vec_insn[4] = { - OPC_VROTR_B, OPC_VROTR_H, OPC_VROTR_W, OPC_VROTR_D + static const LoongArchInsn shri_vec_insn[2][4] = { + { OPC_VSRLI_B, OPC_VSRLI_H, OPC_VSRLI_W, OPC_VSRLI_D }, + { OPC_XVSRLI_B, OPC_XVSRLI_H, OPC_XVSRLI_W, OPC_XVSRLI_D }, }; - static const LoongArchInsn rotri_vec_insn[4] = { - OPC_VROTRI_B, OPC_VROTRI_H, OPC_VROTRI_W, OPC_VROTRI_D + static const LoongArchInsn sari_vec_insn[2][4] = { + { OPC_VSRAI_B, OPC_VSRAI_H, OPC_VSRAI_W, OPC_VSRAI_D }, + { OPC_XVSRAI_B, OPC_XVSRAI_H, OPC_XVSRAI_W, OPC_XVSRAI_D }, + }; + static const LoongArchInsn rotrv_vec_insn[2][4] = { + { OPC_VROTR_B, OPC_VROTR_H, OPC_VROTR_W, OPC_VROTR_D }, + { OPC_XVROTR_B, OPC_XVROTR_H, OPC_XVROTR_W, OPC_XVROTR_D }, + }; + static const LoongArchInsn rotri_vec_insn[2][4] = { + { OPC_VROTRI_B, OPC_VROTRI_H, OPC_VROTRI_W, OPC_VROTRI_D }, + { OPC_XVROTRI_B, OPC_XVROTRI_H, OPC_XVROTRI_W, OPC_XVROTRI_D }, }; a0 = args[0]; @@ -1910,9 +1959,6 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, a2 = args[2]; a3 = args[3]; - /* Currently only supports V64 & V128 */ - tcg_debug_assert(type == TCG_TYPE_V64 || type == TCG_TYPE_V128); - switch (opc) { case INDEX_op_st_vec: tcg_out_st(s, type, a0, a1, a2); @@ -1921,7 +1967,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, tcg_out_ld(s, type, a0, a1, a2); break; case INDEX_op_and_vec: - insn = OPC_VAND_V; + insn = lasx ? OPC_XVAND_V : OPC_VAND_V; goto vdvjvk; case INDEX_op_andc_vec: /* @@ -1931,22 +1977,22 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, */ a1 = a2; a2 = args[1]; - insn = OPC_VANDN_V; + insn = lasx ? OPC_XVANDN_V : OPC_VANDN_V; goto vdvjvk; case INDEX_op_or_vec: - insn = OPC_VOR_V; + insn = lasx ? OPC_XVOR_V : OPC_VOR_V; goto vdvjvk; case INDEX_op_orc_vec: - insn = OPC_VORN_V; + insn = lasx ? OPC_XVORN_V : OPC_VORN_V; goto vdvjvk; case INDEX_op_xor_vec: - insn = OPC_VXOR_V; + insn = lasx ? OPC_XVXOR_V : OPC_VXOR_V; goto vdvjvk; case INDEX_op_not_vec: a2 = a1; /* fall through */ case INDEX_op_nor_vec: - insn = OPC_VNOR_V; + insn = lasx ? OPC_XVNOR_V : OPC_VNOR_V; goto vdvjvk; case INDEX_op_cmp_vec: { @@ -1962,13 +2008,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, cond == TCG_COND_LE || cond == TCG_COND_LT) && (-0x10 <= value && value <= 0x0f)) { - insn = cmp_vec_imm_insn[cond][vece]; + insn = cmp_vec_imm_insn[cond][lasx][vece]; tcg_out32(s, encode_vdvjsk5_insn(insn, a0, a1, value)); break; } else if ((cond == TCG_COND_LEU || cond == TCG_COND_LTU) && (0x00 <= value && value <= 0x1f)) { - insn = cmp_vec_imm_insn[cond][vece]; + insn = cmp_vec_imm_insn[cond][lasx][vece]; tcg_out32(s, encode_vdvjuk5_insn(insn, a0, a1, value)); break; } @@ -1982,86 +2028,91 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, a2 = TCG_VEC_TMP0; } - insn = cmp_vec_insn[cond][vece]; + insn = cmp_vec_insn[cond][lasx][vece]; if (insn == 0) { TCGArg t; t = a1, a1 = a2, a2 = t; cond = tcg_swap_cond(cond); - insn = cmp_vec_insn[cond][vece]; + insn = cmp_vec_insn[cond][lasx][vece]; tcg_debug_assert(insn != 0); } } goto vdvjvk; case INDEX_op_add_vec: - tcg_out_addsub_vec(s, false, vece, a0, a1, a2, const_args[2], true); + tcg_out_addsub_vec(s, lasx, vece, a0, a1, a2, const_args[2], true); break; case INDEX_op_sub_vec: - tcg_out_addsub_vec(s, false, vece, a0, a1, a2, const_args[2], false); + tcg_out_addsub_vec(s, lasx, vece, a0, a1, a2, const_args[2], false); break; case INDEX_op_neg_vec: - tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], a0, a1)); + tcg_out32(s, encode_vdvj_insn(neg_vec_insn[lasx][vece], a0, a1)); break; case INDEX_op_mul_vec: - insn = mul_vec_insn[vece]; + insn = mul_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_smin_vec: - insn = smin_vec_insn[vece]; + insn = smin_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_smax_vec: - insn = smax_vec_insn[vece]; + insn = smax_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_umin_vec: - insn = umin_vec_insn[vece]; + insn = umin_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_umax_vec: - insn = umax_vec_insn[vece]; + insn = umax_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_ssadd_vec: - insn = ssadd_vec_insn[vece]; + insn = ssadd_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_usadd_vec: - insn = usadd_vec_insn[vece]; + insn = usadd_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_sssub_vec: - insn = sssub_vec_insn[vece]; + insn = sssub_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_ussub_vec: - insn = ussub_vec_insn[vece]; + insn = ussub_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_shlv_vec: - insn = shlv_vec_insn[vece]; + insn = shlv_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_shrv_vec: - insn = shrv_vec_insn[vece]; + insn = shrv_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_sarv_vec: - insn = sarv_vec_insn[vece]; + insn = sarv_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_rotlv_vec: /* rotlv_vec a1, a2 = rotrv_vec a1, -a2 */ - tcg_out32(s, encode_vdvj_insn(neg_vec_insn[vece], TCG_VEC_TMP0, a2)); + tcg_out32(s, encode_vdvj_insn(neg_vec_insn[lasx][vece], + TCG_VEC_TMP0, a2)); a2 = TCG_VEC_TMP0; /* fall through */ case INDEX_op_rotrv_vec: - insn = rotrv_vec_insn[vece]; + insn = rotrv_vec_insn[lasx][vece]; goto vdvjvk; case INDEX_op_shli_vec: - insn = shli_vec_insn[vece]; + insn = shli_vec_insn[lasx][vece]; goto vdvjukN; case INDEX_op_shri_vec: - insn = shri_vec_insn[vece]; + insn = shri_vec_insn[lasx][vece]; goto vdvjukN; case INDEX_op_sari_vec: - insn = sari_vec_insn[vece]; + insn = sari_vec_insn[lasx][vece]; goto vdvjukN; case INDEX_op_rotli_vec: /* rotli_vec a1, a2 = rotri_vec a1, -a2 */ a2 = extract32(-a2, 0, 3 + vece); - insn = rotri_vec_insn[vece]; + insn = rotri_vec_insn[lasx][vece]; goto vdvjukN; case INDEX_op_bitsel_vec: /* vbitsel vd, vj, vk, va = bitsel_vec vd, va, vk, vj */ - tcg_out_opc_vbitsel_v(s, a0, a3, a2, a1); + if (lasx) { + tcg_out_opc_xvbitsel_v(s, a0, a3, a2, a1); + } else { + tcg_out_opc_vbitsel_v(s, a0, a3, a2, a1); + } break; case INDEX_op_dupm_vec: tcg_out_dupm_vec(s, type, vece, a0, a1, a2); From patchwork Wed Jun 19 20:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805651 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15405wrt; Wed, 19 Jun 2024 14:05:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUqrubOiNPq+98FdAbRa4yKyQu1LcUhV8s2pDst3f6j6u3qdY64+rM/mEuPC5pxxWo9QzYowAeX8DI3h/MeccnX X-Google-Smtp-Source: AGHT+IFAj/n19nUcyBRiscpY1iIvnVfrSIL9tdVMtNaUl7RarG602CW4qiEqfBz7ACg0SeywvFLE X-Received: by 2002:a05:6214:164b:b0:6b5:116:eb54 with SMTP id 6a1803df08f44-6b501ea36b3mr39306896d6.47.1718831119212; Wed, 19 Jun 2024 14:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831119; cv=none; d=google.com; s=arc-20160816; b=Nzb2BHPNHJ0kSkBtWpuid3D8ujtueciCQ3Jpevx4lvmwTcKffXCFC+ikBon+7fX6cM TQ1ZX8PBto38JDLZ3USC/VU2ooov/bYQXJA1TzZtTdZk6VVMRkgzuzbfel088FjbbZJj E4pz3nuz1bpH++NJCYZ4l8LuabuY2apJ26ZFiFO7r6dONM0CiqYVD92gYQgybv8Pj9k6 I1tcOD0EY8hksZuGiewtVOUWcPFmYp0i5AimR7ttkpAfvSBR2/AZIxgb4WU2ngTs32WM d/D6coTs44BmQzzjZ/kfyHzYUz5TBXkBwAqN4TWXX3PIh5cOP5ZIveftif5gDGm2KL7n QZFQ== 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=NO9QAgtpGX3Q9btoKo0syeXWtnXyKqXnE75euESvqBE=; fh=WHbKwsB9jlgssve14/eRnAYNW4p1c+a/TobPlehjgd8=; b=lPZvesLwbqxlfpXn6zJDB9Hh57fcJGxdGtXcjWbTscih+lGw+x2HPIymkOEkDPGI/A RZ1ND3RqomBs5ddM/sFkLv+zwlZxgVhBSEa623fj3Rm08QbPgKltbvR3UE7Mr9hlwbVB /1UewOoCvJ9wlxnews1yknPyICiMe7CJR7odOOjfA4Ywi9dvpOcniKDHuu+E981d72nu vOaY2DOLnb8jX9HYVJajoMAi2T+2t2WYc2QsEw9sKBc76hy5dDFHF/Y6qr2jxyHMKGAY 1fZ2MdZVxkPaPF/ZLaenpskkJH11YbT6SeOMq1HMJRLlY71S9ZW/RDmPLuBZOnOnTpxe +Fjw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U92gdv6w; 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-6b2a5a153fasi130845306d6.113.2024.06.19.14.05.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:05:19 -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=U92gdv6w; 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 1sK2Pl-0002OB-9L; Wed, 19 Jun 2024 17:00:21 -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 1sK2Pi-0002Lf-4Q for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pc-0000ec-Nx for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:17 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f9c2847618so1793665ad.1 for ; Wed, 19 Jun 2024 14:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830811; x=1719435611; 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=NO9QAgtpGX3Q9btoKo0syeXWtnXyKqXnE75euESvqBE=; b=U92gdv6wYtNhSlke6ii51S1tn3AKUR7ts6eNxFiAoI9dr6TPA2QYGw4ir5d/gmKvqR qsIKNrfwmljqlWDsnvt1wrCkecX0MNL55ZFwG/Fr5VO/wPcQGxouSWNOKY0QMdi69eD3 7o4+K6gHcYjTeeqkIio1+WuGhQVY9Ydumyr6d6no65F11j/rbF/TcubHwCuyTcDj/0Xh lXmW7KDNjwokBchR2GtKPk4SjOieQBin+vILuU2YS+n9ERVOUNHe5GXRmiiDAksvGDuC mLJ0HpoUyrb9CjwQtD9rxExbitb8hzKin6ZXvU/CKEILCuIyMS8TDynVQ+9fQqVJp7TH zBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830811; x=1719435611; 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=NO9QAgtpGX3Q9btoKo0syeXWtnXyKqXnE75euESvqBE=; b=P7KWk92Ra+Saq8sxWN4Z0MNLdZfVbrvBlpd6ghNiFjXJ1KFzDvXcNmSbc6KFWm+p6p 2/vzq1xv1FZtah1TwlGSJGlVIPnNLsEFry4ExZpic1JKcmbKvBT3MT6gXKadnzbvTxIy LQoLYbNpTksyeINLAVwSvPUYS3Zb/fIHrt5mzFs7UtYIye2BNMVpgpVEdqGe04s4ajkL daJNWAqu/pt2RUlM2NCrMpD7fuT44IV+3znWia9vo2mrS9XUsPAh2N31TGvswe0IdQcA jzdrxbdwClynBKH8CE4a/gc7gzflwZgH290fW5Ayb1oOxVSCD/mBHLU9/57L7UYZgmFS zAcw== X-Gm-Message-State: AOJu0YwgHKajEGCId9S0+L0nzzdX9qZ1a6cMT6wmlKJz+vF9GYq1ot8S eSkWtksMGiPv052PEV8QFh5l+b746IpfKgEZ1c+15vlX9pD0zPxte+qVEQrmFr9KidW0TtHWlJq M X-Received: by 2002:a17:902:eccc:b0:1f7:42de:e7e5 with SMTP id d9443c01a7336-1f9aa45a7d2mr47291025ad.45.1718830810848; Wed, 19 Jun 2024 14:00:10 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 18/24] tcg/loongarch64: Enable v256 with LASX Date: Wed, 19 Jun 2024 13:59:46 -0700 Message-Id: <20240619205952.235946-19-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 2 +- tcg/loongarch64/tcg-target.c.inc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h index 990bad1d51..58bd7d258e 100644 --- a/tcg/loongarch64/tcg-target.h +++ b/tcg/loongarch64/tcg-target.h @@ -173,7 +173,7 @@ typedef enum { #define TCG_TARGET_HAS_v64 (cpuinfo & CPUINFO_LSX) #define TCG_TARGET_HAS_v128 (cpuinfo & CPUINFO_LSX) -#define TCG_TARGET_HAS_v256 0 +#define TCG_TARGET_HAS_v256 (cpuinfo & CPUINFO_LASX) #define TCG_TARGET_HAS_not_vec 1 #define TCG_TARGET_HAS_neg_vec 1 diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index dff966c395..1c4dc4decb 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -2487,6 +2487,9 @@ static void tcg_target_init(TCGContext *s) if (cpuinfo & CPUINFO_LSX) { tcg_target_available_regs[TCG_TYPE_V64] = ALL_VECTOR_REGS; tcg_target_available_regs[TCG_TYPE_V128] = ALL_VECTOR_REGS; + if (cpuinfo & CPUINFO_LASX) { + tcg_target_available_regs[TCG_TYPE_V256] = ALL_VECTOR_REGS; + } tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V24); tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V25); tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V26); From patchwork Wed Jun 19 20:59:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805650 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15359wrt; Wed, 19 Jun 2024 14:05:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV4AbxO5cTAwMj6jAc5Tlajwvs9LRRYihH0zUxf8oG036THIZzOaA5/OWQOQu1ZganB8Slv7a0iGAqTXJxG1bOO X-Google-Smtp-Source: AGHT+IEWYTd9o+TFjqAtydNge6DYsEUaXVtE1wuPGgt3Hjf9AV9B3qzJfewnGgDJxlaUMkFQAI+N X-Received: by 2002:a0c:c302:0:b0:6b0:48fb:138e with SMTP id 6a1803df08f44-6b501e24895mr34797576d6.14.1718831108379; Wed, 19 Jun 2024 14:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831108; cv=none; d=google.com; s=arc-20160816; b=fulpOGeSJiOG0B3VdzVQmeT3076coOm5OpUSohgH6c6Qeo647/ncSkUKa1z+OwZjU1 j1sgT1Cl0YpmZTL+9pgDimqrrFsi9+XiU2RSr3qOMVGlJ0BRDGx/uqLEaZbS14Kx0b7A yz5w/pv+JW3Reb3SP3prfaAQlg5MGlGdKijYZlXgKnGxiTW4kMf+RVOaArCOW/icUL7y OY8La9yzz7VLFp82CKriNQXNh/8HlKaDyDGF8fXgmRETGeDbNFNU2/4TH9QwtEfCSViD urcQu1FqfjskKm4rCzzv8ce5KhwM9b5bL4UdQ/fBq7bL/IzO8CmIUO2m0WFOQ1HErmcr NqGA== 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=we/cC6SV/OHCnqxYCDPX0iolNzRY4+fOCUveM9lfOU8=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=Bf/cPO2g4cWWKt5VWSgNzsQ1pKvT9lmDuCdUVBWDGundjIaLPipw6r8kiUNN/Az+lC rfC2EiG5lX3BUw4QtvPvbwHvnxnwIKOY1FxBMnW8tFM/BmXe/XUJN/roj3ww4h+VcNSz eh0Wp4YJJP1Nl3b4jUPB9w+OOw/gaZrJhNeM+z/3UjnRLknAY5/K2XM2VfgLo/nATGeZ aBaDNBj8pcLwPKF9CsG/kHl8af7Z2J48NNceX5m9oGmoReL7/qGGEPRPjgtW39PAQEm7 L/m8hOInOeGOxspJR+1gC+r/UWTzITIE2p4E5H67JLZyvUtbZkqi/iBXfMgNCvlgqBlD bdKg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LYfqdkGa; 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-6b2a5a399adsi161638906d6.169.2024.06.19.14.05.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:05:08 -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=LYfqdkGa; 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 1sK2Pl-0002OQ-Gl; Wed, 19 Jun 2024 17:00:21 -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 1sK2Pg-0002KX-Hr for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:16 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pd-0000fT-Ot for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:16 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-70435f4c330so245555b3a.1 for ; Wed, 19 Jun 2024 14:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830812; x=1719435612; 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=we/cC6SV/OHCnqxYCDPX0iolNzRY4+fOCUveM9lfOU8=; b=LYfqdkGaNxRRVIbbGt+GRnjIa4rdLRV3vzXnlwLi7Tp6ZI7CpS6sMSCQ0HG8+EQhBG UlCRwsJUujFxOVF0wwbxWkzNBl+Mf3sAUYbI9GsU5x80Tstic2oxuXlZqKF3Ysf2l+SD mtPFsk8Y7H+LwWfLchHg3xQT3bpYNtGwUjfUdeTIKBCn6zpxdeWmV2/lp4RbH4Nu+cPW sr2yL8So+b5VD8uuI8/FyQJ7wiaqqrS//wu1BBka+WmKSrZG8tlo99pv7/x4OspGvQ12 1nq0m7dvqy7RJOMleljMTaw6un10kNLkCzbKEFQLZv8Od2547Hl3oXmbRtzk8gO7LgNJ +yjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830812; x=1719435612; 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=we/cC6SV/OHCnqxYCDPX0iolNzRY4+fOCUveM9lfOU8=; b=ucEcjMb0JzNAljED7/YD+Q75McecbSexIBKBvJzHmBn0+6qpBuo9nMRrYKlF8DICio YWKVdviG2ibW7c4JXBQKnSFcKJwKCEOB5cCckg9YuKt10gKgF1MhBvA+/zIYUN021Gu2 sgRCKCh8DW3CdM5o002lHNxM7/wV71FXXfTeQAYanUwC4Xl0HVhTDebSpsba9ZXoLt8V VqkTfAFumekP2BW3kMf/TWRjr6qd6IQQ5FISjS0ki7cJQjsM+LrIW48XXICvYSWJe8v7 8P5UJESQkyYyuHO1Jqp2BJ/E+IapJM/1PKO6MjPPThtfJxA9S65otGGwfmmE7Vqihe9s GcyA== X-Gm-Message-State: AOJu0YwkE/YS6bj/YwVDPfSMq7pJpZMiPy7aewVRKzU+9NqZh8BdBeW2 3wGC6mO/cOSNs7d4sz65TAXS6/68fu9MKpK5NNYh0aN2WZ6SqCeCK4dfeFL1NRtf7ashKTaBWSx A X-Received: by 2002:a05:6a20:78a4:b0:1b8:a341:e590 with SMTP id adf61e73a8af0-1bcbb665a8amr3160078637.58.1718830811578; Wed, 19 Jun 2024 14:00:11 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 19/24] util/bufferiszero: Split out host include files Date: Wed, 19 Jun 2024 13:59:47 -0700 Message-Id: <20240619205952.235946-20-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::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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 Split out host/bufferiszero.h.inc for x86, aarch64 and generic in order to avoid an overlong ifdef ladder. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- util/bufferiszero.c | 191 +------------------ host/include/aarch64/host/bufferiszero.c.inc | 76 ++++++++ host/include/generic/host/bufferiszero.c.inc | 10 + host/include/i386/host/bufferiszero.c.inc | 124 ++++++++++++ host/include/x86_64/host/bufferiszero.c.inc | 1 + 5 files changed, 212 insertions(+), 190 deletions(-) create mode 100644 host/include/aarch64/host/bufferiszero.c.inc create mode 100644 host/include/generic/host/bufferiszero.c.inc create mode 100644 host/include/i386/host/bufferiszero.c.inc create mode 100644 host/include/x86_64/host/bufferiszero.c.inc diff --git a/util/bufferiszero.c b/util/bufferiszero.c index 11c080e02c..522146dab9 100644 --- a/util/bufferiszero.c +++ b/util/bufferiszero.c @@ -81,196 +81,7 @@ static bool buffer_is_zero_int_ge256(const void *buf, size_t len) return t == 0; } -#if defined(CONFIG_AVX2_OPT) || defined(__SSE2__) -#include - -/* Helper for preventing the compiler from reassociating - chains of binary vector operations. */ -#define SSE_REASSOC_BARRIER(vec0, vec1) asm("" : "+x"(vec0), "+x"(vec1)) - -/* Note that these vectorized functions may assume len >= 256. */ - -static bool __attribute__((target("sse2"))) -buffer_zero_sse2(const void *buf, size_t len) -{ - /* Unaligned loads at head/tail. */ - __m128i v = *(__m128i_u *)(buf); - __m128i w = *(__m128i_u *)(buf + len - 16); - /* Align head/tail to 16-byte boundaries. */ - const __m128i *p = QEMU_ALIGN_PTR_DOWN(buf + 16, 16); - const __m128i *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 16); - __m128i zero = { 0 }; - - /* Collect a partial block at tail end. */ - v |= e[-1]; w |= e[-2]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-3]; w |= e[-4]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-5]; w |= e[-6]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-7]; v |= w; - - /* - * Loop over complete 128-byte blocks. - * With the head and tail removed, e - p >= 14, so the loop - * must iterate at least once. - */ - do { - v = _mm_cmpeq_epi8(v, zero); - if (unlikely(_mm_movemask_epi8(v) != 0xFFFF)) { - return false; - } - v = p[0]; w = p[1]; - SSE_REASSOC_BARRIER(v, w); - v |= p[2]; w |= p[3]; - SSE_REASSOC_BARRIER(v, w); - v |= p[4]; w |= p[5]; - SSE_REASSOC_BARRIER(v, w); - v |= p[6]; w |= p[7]; - SSE_REASSOC_BARRIER(v, w); - v |= w; - p += 8; - } while (p < e - 7); - - return _mm_movemask_epi8(_mm_cmpeq_epi8(v, zero)) == 0xFFFF; -} - -#ifdef CONFIG_AVX2_OPT -static bool __attribute__((target("avx2"))) -buffer_zero_avx2(const void *buf, size_t len) -{ - /* Unaligned loads at head/tail. */ - __m256i v = *(__m256i_u *)(buf); - __m256i w = *(__m256i_u *)(buf + len - 32); - /* Align head/tail to 32-byte boundaries. */ - const __m256i *p = QEMU_ALIGN_PTR_DOWN(buf + 32, 32); - const __m256i *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 32); - __m256i zero = { 0 }; - - /* Collect a partial block at tail end. */ - v |= e[-1]; w |= e[-2]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-3]; w |= e[-4]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-5]; w |= e[-6]; - SSE_REASSOC_BARRIER(v, w); - v |= e[-7]; v |= w; - - /* Loop over complete 256-byte blocks. */ - for (; p < e - 7; p += 8) { - /* PTEST is not profitable here. */ - v = _mm256_cmpeq_epi8(v, zero); - if (unlikely(_mm256_movemask_epi8(v) != 0xFFFFFFFF)) { - return false; - } - v = p[0]; w = p[1]; - SSE_REASSOC_BARRIER(v, w); - v |= p[2]; w |= p[3]; - SSE_REASSOC_BARRIER(v, w); - v |= p[4]; w |= p[5]; - SSE_REASSOC_BARRIER(v, w); - v |= p[6]; w |= p[7]; - SSE_REASSOC_BARRIER(v, w); - v |= w; - } - - return _mm256_movemask_epi8(_mm256_cmpeq_epi8(v, zero)) == 0xFFFFFFFF; -} -#endif /* CONFIG_AVX2_OPT */ - -static biz_accel_fn const accel_table[] = { - buffer_is_zero_int_ge256, - buffer_zero_sse2, -#ifdef CONFIG_AVX2_OPT - buffer_zero_avx2, -#endif -}; - -static unsigned best_accel(void) -{ -#ifdef CONFIG_AVX2_OPT - unsigned info = cpuinfo_init(); - - if (info & CPUINFO_AVX2) { - return 2; - } -#endif - return 1; -} - -#elif defined(__aarch64__) && defined(__ARM_NEON) -#include - -/* - * Helper for preventing the compiler from reassociating - * chains of binary vector operations. - */ -#define REASSOC_BARRIER(vec0, vec1) asm("" : "+w"(vec0), "+w"(vec1)) - -static bool buffer_is_zero_simd(const void *buf, size_t len) -{ - uint32x4_t t0, t1, t2, t3; - - /* Align head/tail to 16-byte boundaries. */ - const uint32x4_t *p = QEMU_ALIGN_PTR_DOWN(buf + 16, 16); - const uint32x4_t *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 16); - - /* Unaligned loads at head/tail. */ - t0 = vld1q_u32(buf) | vld1q_u32(buf + len - 16); - - /* Collect a partial block at tail end. */ - t1 = e[-7] | e[-6]; - t2 = e[-5] | e[-4]; - t3 = e[-3] | e[-2]; - t0 |= e[-1]; - REASSOC_BARRIER(t0, t1); - REASSOC_BARRIER(t2, t3); - t0 |= t1; - t2 |= t3; - REASSOC_BARRIER(t0, t2); - t0 |= t2; - - /* - * Loop over complete 128-byte blocks. - * With the head and tail removed, e - p >= 14, so the loop - * must iterate at least once. - */ - do { - /* - * Reduce via UMAXV. Whatever the actual result, - * it will only be zero if all input bytes are zero. - */ - if (unlikely(vmaxvq_u32(t0) != 0)) { - return false; - } - - t0 = p[0] | p[1]; - t1 = p[2] | p[3]; - t2 = p[4] | p[5]; - t3 = p[6] | p[7]; - REASSOC_BARRIER(t0, t1); - REASSOC_BARRIER(t2, t3); - t0 |= t1; - t2 |= t3; - REASSOC_BARRIER(t0, t2); - t0 |= t2; - p += 8; - } while (p < e - 7); - - return vmaxvq_u32(t0) == 0; -} - -#define best_accel() 1 -static biz_accel_fn const accel_table[] = { - buffer_is_zero_int_ge256, - buffer_is_zero_simd, -}; -#else -#define best_accel() 0 -static biz_accel_fn const accel_table[1] = { - buffer_is_zero_int_ge256 -}; -#endif +#include "host/bufferiszero.c.inc" static biz_accel_fn buffer_is_zero_accel; static unsigned accel_index; diff --git a/host/include/aarch64/host/bufferiszero.c.inc b/host/include/aarch64/host/bufferiszero.c.inc new file mode 100644 index 0000000000..947ee7ca1f --- /dev/null +++ b/host/include/aarch64/host/bufferiszero.c.inc @@ -0,0 +1,76 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * buffer_is_zero acceleration, aarch64 version. + */ + +#ifdef __ARM_NEON +#include + +/* + * Helper for preventing the compiler from reassociating + * chains of binary vector operations. + */ +#define REASSOC_BARRIER(vec0, vec1) asm("" : "+w"(vec0), "+w"(vec1)) + +static bool buffer_is_zero_simd(const void *buf, size_t len) +{ + uint32x4_t t0, t1, t2, t3; + + /* Align head/tail to 16-byte boundaries. */ + const uint32x4_t *p = QEMU_ALIGN_PTR_DOWN(buf + 16, 16); + const uint32x4_t *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 16); + + /* Unaligned loads at head/tail. */ + t0 = vld1q_u32(buf) | vld1q_u32(buf + len - 16); + + /* Collect a partial block at tail end. */ + t1 = e[-7] | e[-6]; + t2 = e[-5] | e[-4]; + t3 = e[-3] | e[-2]; + t0 |= e[-1]; + REASSOC_BARRIER(t0, t1); + REASSOC_BARRIER(t2, t3); + t0 |= t1; + t2 |= t3; + REASSOC_BARRIER(t0, t2); + t0 |= t2; + + /* + * Loop over complete 128-byte blocks. + * With the head and tail removed, e - p >= 14, so the loop + * must iterate at least once. + */ + do { + /* + * Reduce via UMAXV. Whatever the actual result, + * it will only be zero if all input bytes are zero. + */ + if (unlikely(vmaxvq_u32(t0) != 0)) { + return false; + } + + t0 = p[0] | p[1]; + t1 = p[2] | p[3]; + t2 = p[4] | p[5]; + t3 = p[6] | p[7]; + REASSOC_BARRIER(t0, t1); + REASSOC_BARRIER(t2, t3); + t0 |= t1; + t2 |= t3; + REASSOC_BARRIER(t0, t2); + t0 |= t2; + p += 8; + } while (p < e - 7); + + return vmaxvq_u32(t0) == 0; +} + +static biz_accel_fn const accel_table[] = { + buffer_is_zero_int_ge256, + buffer_is_zero_simd, +}; + +#define best_accel() 1 +#else +# include "host/include/generic/host/bufferiszero.c.inc" +#endif diff --git a/host/include/generic/host/bufferiszero.c.inc b/host/include/generic/host/bufferiszero.c.inc new file mode 100644 index 0000000000..ea0875c24a --- /dev/null +++ b/host/include/generic/host/bufferiszero.c.inc @@ -0,0 +1,10 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * buffer_is_zero acceleration, generic version. + */ + +static biz_accel_fn const accel_table[1] = { + buffer_is_zero_int_ge256 +}; + +#define best_accel() 0 diff --git a/host/include/i386/host/bufferiszero.c.inc b/host/include/i386/host/bufferiszero.c.inc new file mode 100644 index 0000000000..3b9605d806 --- /dev/null +++ b/host/include/i386/host/bufferiszero.c.inc @@ -0,0 +1,124 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * buffer_is_zero acceleration, x86 version. + */ + +#if defined(CONFIG_AVX2_OPT) || defined(__SSE2__) +#include + +/* Helper for preventing the compiler from reassociating + chains of binary vector operations. */ +#define SSE_REASSOC_BARRIER(vec0, vec1) asm("" : "+x"(vec0), "+x"(vec1)) + +/* Note that these vectorized functions may assume len >= 256. */ + +static bool __attribute__((target("sse2"))) +buffer_zero_sse2(const void *buf, size_t len) +{ + /* Unaligned loads at head/tail. */ + __m128i v = *(__m128i_u *)(buf); + __m128i w = *(__m128i_u *)(buf + len - 16); + /* Align head/tail to 16-byte boundaries. */ + const __m128i *p = QEMU_ALIGN_PTR_DOWN(buf + 16, 16); + const __m128i *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 16); + __m128i zero = { 0 }; + + /* Collect a partial block at tail end. */ + v |= e[-1]; w |= e[-2]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-3]; w |= e[-4]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-5]; w |= e[-6]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-7]; v |= w; + + /* + * Loop over complete 128-byte blocks. + * With the head and tail removed, e - p >= 14, so the loop + * must iterate at least once. + */ + do { + v = _mm_cmpeq_epi8(v, zero); + if (unlikely(_mm_movemask_epi8(v) != 0xFFFF)) { + return false; + } + v = p[0]; w = p[1]; + SSE_REASSOC_BARRIER(v, w); + v |= p[2]; w |= p[3]; + SSE_REASSOC_BARRIER(v, w); + v |= p[4]; w |= p[5]; + SSE_REASSOC_BARRIER(v, w); + v |= p[6]; w |= p[7]; + SSE_REASSOC_BARRIER(v, w); + v |= w; + p += 8; + } while (p < e - 7); + + return _mm_movemask_epi8(_mm_cmpeq_epi8(v, zero)) == 0xFFFF; +} + +#ifdef CONFIG_AVX2_OPT +static bool __attribute__((target("avx2"))) +buffer_zero_avx2(const void *buf, size_t len) +{ + /* Unaligned loads at head/tail. */ + __m256i v = *(__m256i_u *)(buf); + __m256i w = *(__m256i_u *)(buf + len - 32); + /* Align head/tail to 32-byte boundaries. */ + const __m256i *p = QEMU_ALIGN_PTR_DOWN(buf + 32, 32); + const __m256i *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 32); + __m256i zero = { 0 }; + + /* Collect a partial block at tail end. */ + v |= e[-1]; w |= e[-2]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-3]; w |= e[-4]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-5]; w |= e[-6]; + SSE_REASSOC_BARRIER(v, w); + v |= e[-7]; v |= w; + + /* Loop over complete 256-byte blocks. */ + for (; p < e - 7; p += 8) { + /* PTEST is not profitable here. */ + v = _mm256_cmpeq_epi8(v, zero); + if (unlikely(_mm256_movemask_epi8(v) != 0xFFFFFFFF)) { + return false; + } + v = p[0]; w = p[1]; + SSE_REASSOC_BARRIER(v, w); + v |= p[2]; w |= p[3]; + SSE_REASSOC_BARRIER(v, w); + v |= p[4]; w |= p[5]; + SSE_REASSOC_BARRIER(v, w); + v |= p[6]; w |= p[7]; + SSE_REASSOC_BARRIER(v, w); + v |= w; + } + + return _mm256_movemask_epi8(_mm256_cmpeq_epi8(v, zero)) == 0xFFFFFFFF; +} +#endif /* CONFIG_AVX2_OPT */ + +static biz_accel_fn const accel_table[] = { + buffer_is_zero_int_ge256, + buffer_zero_sse2, +#ifdef CONFIG_AVX2_OPT + buffer_zero_avx2, +#endif +}; + +static unsigned best_accel(void) +{ +#ifdef CONFIG_AVX2_OPT + unsigned info = cpuinfo_init(); + if (info & CPUINFO_AVX2) { + return 2; + } +#endif + return 1; +} + +#else +# include "host/include/generic/host/bufferiszero.c.inc" +#endif diff --git a/host/include/x86_64/host/bufferiszero.c.inc b/host/include/x86_64/host/bufferiszero.c.inc new file mode 100644 index 0000000000..1d3f1fd6f5 --- /dev/null +++ b/host/include/x86_64/host/bufferiszero.c.inc @@ -0,0 +1 @@ +#include "host/include/i386/host/bufferiszero.c.inc" From patchwork Wed Jun 19 20:59:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805634 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14041wrt; Wed, 19 Jun 2024 14:01:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjVAcVVBgnhormjhFaF+pLFTcQmS6GKllUAfq3mP1EEIapqqD4UChu1jhHOrOn/fvHUtqp55FBG7dD+O1Wx7CI X-Google-Smtp-Source: AGHT+IEAyQsGLuHAYk5Gtaj1O+ccj6mPsg+VrElBnH+yL1h2qmXe8UxmP97fFpet2nkG0M4fZZW/ X-Received: by 2002:a0c:e0c3:0:b0:6b0:7939:5407 with SMTP id 6a1803df08f44-6b501e9f6f0mr38531076d6.51.1718830902894; Wed, 19 Jun 2024 14:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830902; cv=none; d=google.com; s=arc-20160816; b=oRnUFEQTMt5VHOJq2MZtioladx/K9tOfIxvuPY4gvdnBP754R0emGh2P5ih7DskDdG 6xqxKBbbZlbc7iJb5G4uA8mUHdeMao77Dn5QAS12tH+fLIEEIyx69If7zVUALb2LCtWE +1nfM2V6nqPPkXH+7bxe+jXZMReFML9iqsQ9o1A8dBqEWmgn2aTrUNTansFWFVQNhXk1 9eoFNTkzC94hvTTIPMwj7wbiCFGITBkrj5aqTzQPozz5bDdSvdHYt9B9mTNdiSKtGSk0 0l2jHwTs28smz0UFNqmXKbME89pPksQeAOM7WoRPXiQwdCKvud6gK+ebl+thE2AKb7Ku UYxg== 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=Pj+qvvjA1OpTR0kovCqFcBz5fTkZz/8axEDe30k10Pc=; fh=OVgymd28pUmfcTrDX+yqc931pDX4vCR2zLhdUgy8MOQ=; b=TfC/Dt7umA57GMO6nKJ2T9HLKH9c6fQctbxar0VnfKdqlmeSKABMca+xjBTjFi8LqU bjSy7KC4VZHhHteoCFXP6XBLdI7KxKKwFGjExrSD0QrF9VI20we5YHpnYH/N9QO66OUT AU68i90stjjocWPwWOt5mJTYXMay0nZ4t1OVXbNXJn0RgZZ75bUj870qRUbz35kUym9s PBlUYIHT/JDDzT8jaGxAeBMRULgM9YzeBucOlLi14W4r6p7P0WvfsZIv1IJzrvBRh3n6 yh73OLkaXQ7pJpDXNz0iz4b8KVdKuHv+PRU4kvR3KRMsakMo8A8x7Ogfvf2pZUxbTaQT tt8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UL6OGZ2f; 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-6b502f0e9f9si31316456d6.341.2024.06.19.14.01.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:42 -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=UL6OGZ2f; 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 1sK2Pm-0002PG-7t; Wed, 19 Jun 2024 17:00:22 -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 1sK2Pg-0002Ks-OI for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:16 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pe-0000fw-0B for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:16 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1f700e4cb92so1732485ad.2 for ; Wed, 19 Jun 2024 14:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830812; x=1719435612; 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=Pj+qvvjA1OpTR0kovCqFcBz5fTkZz/8axEDe30k10Pc=; b=UL6OGZ2fMqJJC7Grh+yk0myXfh+KVjBk/piJQeJQNW+wubD7fmBFzx3/KYz9QP/tX7 CooiZy2oaCGZ3ty/gwE6OHJeIy3IApnKj9x2N9Gsl++QEV2y0tHW/J6fpJhTuwF2DaC9 ms4XTwkm0PGWdaHY1E7hCj+jd3E6QrJbHsJWomCsaDpWnm2X84kdR0BvVY8MdHii3n9u IoD9MdhUFbxkaxMFM87ahJoh2fTzko+YDgAczK8hPOvfdPv1qq/ddRb1HhA0OSEmhH8b 15bcRJsM4tBTv7TDT4wFpMwITpMOMXKdqNcgAkCMFmtz3D8A02z3WlBXtcyZD3ai+pA1 1gJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830812; x=1719435612; 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=Pj+qvvjA1OpTR0kovCqFcBz5fTkZz/8axEDe30k10Pc=; b=NbNSnX0tIrJq1eAGUMDAItSZi6h21o2QOx1PyMmfz1FgWGxcsyuRTcSuyrESIY5OZt VLoRu5ZKILpBnOdnyxvU1cDRlBR+9UE+wgNbVhBaWCGp2h2zlWyY7DPfdYoX6IgqBnRH JZDJ3JxrYBr0LF+6SbRYqWZUi87AnNXffDRtS9d2o0OBlFvdfzzhMVKLclgJ8RM3LXCk +7ICIG9jEwfIxgkx1nqUvBAAUSznWwzNuPYwiJhFcU2WnreIum+OYUB5QWPnleYZynl4 gGFt1p9+sFVcTrYaQY5vLryikmvNdcENEXf1K8cvqh96IXvZYxJeqJbCfqXL7UcN4yM/ K6FQ== X-Gm-Message-State: AOJu0YxUIVYrnWrHLQubdaa8MdGdjEhUyb44lVuNb/v+zYhXpGThV2k+ qDnuJIdmVPqzpFHZHtvir+ylgIoioaU+p17ya7Hj0fHj6bzXS00sWBg5eb2+22bwWJv3qJtXUSr 4 X-Received: by 2002:a17:903:1cf:b0:1f6:92f1:b01c with SMTP id d9443c01a7336-1f9aa481248mr43110975ad.69.1718830812268; Wed, 19 Jun 2024 14:00:12 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Bibo Mao Subject: [PULL 20/24] util/bufferiszero: Add loongarch64 vector acceleration Date: Wed, 19 Jun 2024 13:59:48 -0700 Message-Id: <20240619205952.235946-21-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::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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 Use inline assembly because no release compiler allows per-function selection of the ISA. Tested-by: Bibo Mao Signed-off-by: Richard Henderson --- .../loongarch64/host/bufferiszero.c.inc | 143 ++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 host/include/loongarch64/host/bufferiszero.c.inc diff --git a/host/include/loongarch64/host/bufferiszero.c.inc b/host/include/loongarch64/host/bufferiszero.c.inc new file mode 100644 index 0000000000..69891eac80 --- /dev/null +++ b/host/include/loongarch64/host/bufferiszero.c.inc @@ -0,0 +1,143 @@ +/* + * SPDX-License-Identifier: GPL-2.0-or-later + * buffer_is_zero acceleration, loongarch64 version. + */ + +/* + * Builtins for LSX and LASX are introduced by gcc 14 and llvm 18, + * but as yet neither has support for attribute target, so neither + * is able to enable the optimization without globally enabling + * vector support. Since we want runtime detection, use assembly. + */ + +static bool buffer_is_zero_lsx(const void *buf, size_t len) +{ + const void *p = QEMU_ALIGN_PTR_DOWN(buf + 16, 16); + const void *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 16) - (7 * 16); + const void *l = buf + len; + bool ret; + + asm("vld $vr0,%2,0\n\t" /* first: buf + 0 */ + "vld $vr1,%4,-16\n\t" /* last: buf + len - 16 */ + "vld $vr2,%3,0\n\t" /* e[0] */ + "vld $vr3,%3,16\n\t" /* e[1] */ + "vld $vr4,%3,32\n\t" /* e[2] */ + "vld $vr5,%3,48\n\t" /* e[3] */ + "vld $vr6,%3,64\n\t" /* e[4] */ + "vld $vr7,%3,80\n\t" /* e[5] */ + "vld $vr8,%3,96\n\t" /* e[6] */ + "vor.v $vr0,$vr0,$vr1\n\t" + "vor.v $vr2,$vr2,$vr3\n\t" + "vor.v $vr4,$vr4,$vr5\n\t" + "vor.v $vr6,$vr6,$vr7\n\t" + "vor.v $vr0,$vr0,$vr2\n\t" + "vor.v $vr4,$vr4,$vr6\n\t" + "vor.v $vr0,$vr0,$vr4\n\t" + "vor.v $vr0,$vr0,$vr8\n\t" + "or %0,$r0,$r0\n" /* prepare return false */ + "1:\n\t" + "vsetnez.v $fcc0,$vr0\n\t" + "bcnez $fcc0,2f\n\t" + "vld $vr0,%1,0\n\t" /* p[0] */ + "vld $vr1,%1,16\n\t" /* p[1] */ + "vld $vr2,%1,32\n\t" /* p[2] */ + "vld $vr3,%1,48\n\t" /* p[3] */ + "vld $vr4,%1,64\n\t" /* p[4] */ + "vld $vr5,%1,80\n\t" /* p[5] */ + "vld $vr6,%1,96\n\t" /* p[6] */ + "vld $vr7,%1,112\n\t" /* p[7] */ + "addi.d %1,%1,128\n\t" + "vor.v $vr0,$vr0,$vr1\n\t" + "vor.v $vr2,$vr2,$vr3\n\t" + "vor.v $vr4,$vr4,$vr5\n\t" + "vor.v $vr6,$vr6,$vr7\n\t" + "vor.v $vr0,$vr0,$vr2\n\t" + "vor.v $vr4,$vr4,$vr6\n\t" + "vor.v $vr0,$vr0,$vr4\n\t" + "bltu %1,%3,1b\n\t" + "vsetnez.v $fcc0,$vr0\n\t" + "bcnez $fcc0,2f\n\t" + "ori %0,$r0,1\n" + "2:" + : "=&r"(ret), "+r"(p) + : "r"(buf), "r"(e), "r"(l) + : "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "fcc0"); + + return ret; +} + +static bool buffer_is_zero_lasx(const void *buf, size_t len) +{ + const void *p = QEMU_ALIGN_PTR_DOWN(buf + 32, 32); + const void *e = QEMU_ALIGN_PTR_DOWN(buf + len - 1, 32) - (7 * 32); + const void *l = buf + len; + bool ret; + + asm("xvld $xr0,%2,0\n\t" /* first: buf + 0 */ + "xvld $xr1,%4,-32\n\t" /* last: buf + len - 32 */ + "xvld $xr2,%3,0\n\t" /* e[0] */ + "xvld $xr3,%3,32\n\t" /* e[1] */ + "xvld $xr4,%3,64\n\t" /* e[2] */ + "xvld $xr5,%3,96\n\t" /* e[3] */ + "xvld $xr6,%3,128\n\t" /* e[4] */ + "xvld $xr7,%3,160\n\t" /* e[5] */ + "xvld $xr8,%3,192\n\t" /* e[6] */ + "xvor.v $xr0,$xr0,$xr1\n\t" + "xvor.v $xr2,$xr2,$xr3\n\t" + "xvor.v $xr4,$xr4,$xr5\n\t" + "xvor.v $xr6,$xr6,$xr7\n\t" + "xvor.v $xr0,$xr0,$xr2\n\t" + "xvor.v $xr4,$xr4,$xr6\n\t" + "xvor.v $xr0,$xr0,$xr4\n\t" + "xvor.v $xr0,$xr0,$xr8\n\t" + "or %0,$r0,$r0\n\t" /* prepare return false */ + "bgeu %1,%3,2f\n" + "1:\n\t" + "xvsetnez.v $fcc0,$xr0\n\t" + "bcnez $fcc0,3f\n\t" + "xvld $xr0,%1,0\n\t" /* p[0] */ + "xvld $xr1,%1,32\n\t" /* p[1] */ + "xvld $xr2,%1,64\n\t" /* p[2] */ + "xvld $xr3,%1,96\n\t" /* p[3] */ + "xvld $xr4,%1,128\n\t" /* p[4] */ + "xvld $xr5,%1,160\n\t" /* p[5] */ + "xvld $xr6,%1,192\n\t" /* p[6] */ + "xvld $xr7,%1,224\n\t" /* p[7] */ + "addi.d %1,%1,256\n\t" + "xvor.v $xr0,$xr0,$xr1\n\t" + "xvor.v $xr2,$xr2,$xr3\n\t" + "xvor.v $xr4,$xr4,$xr5\n\t" + "xvor.v $xr6,$xr6,$xr7\n\t" + "xvor.v $xr0,$xr0,$xr2\n\t" + "xvor.v $xr4,$xr4,$xr6\n\t" + "xvor.v $xr0,$xr0,$xr4\n\t" + "bltu %1,%3,1b\n" + "2:\n\t" + "xvsetnez.v $fcc0,$xr0\n\t" + "bcnez $fcc0,3f\n\t" + "ori %0,$r0,1\n" + "3:" + : "=&r"(ret), "+r"(p) + : "r"(buf), "r"(e), "r"(l) + : "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "fcc0"); + + return ret; +} + +static biz_accel_fn const accel_table[] = { + buffer_is_zero_int_ge256, + buffer_is_zero_lsx, + buffer_is_zero_lasx, +}; + +static unsigned best_accel(void) +{ + unsigned info = cpuinfo_init(); + if (info & CPUINFO_LASX) { + return 2; + } + if (info & CPUINFO_LSX) { + return 1; + } + return 0; +} From patchwork Wed Jun 19 20:59:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805647 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15011wrt; Wed, 19 Jun 2024 14:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1uymlN6e+TulhPsIzPHg4FxYl8gX3w1EHaQNgdTnb6x9/CMCr0Ex/fQ6q0Pd7SCgm1DGB0ijJ5bxJ5g3h/eW8 X-Google-Smtp-Source: AGHT+IGv13rER5bfpdJWCBwefiIqNwsfwXgz06iGZFoRHNa1Mfmy2hklDXJL6nZxyEU8AgibH9dM X-Received: by 2002:a05:620a:1a9e:b0:795:5ca2:3742 with SMTP id af79cd13be357-79bb3e55929mr358290985a.34.1718831045767; Wed, 19 Jun 2024 14:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831045; cv=none; d=google.com; s=arc-20160816; b=qwFVQZCEfmqRd8kGgYyRq6C/S/71B3FMtDTC4vod16QlxOGdMHBY7D5GTKzhld1CSy 2Qs/lqWtH9MwKF89bYdMDFZAYh6ZoXFv0hx8WxoXeVs4psg40hZVdT97T+9vOulekkgP vOfit5aAiTNVW2+I7BxDoV2gUUmLwvaV+VesrfNC5JdgZgvdLdfHXN7SO7OsHaq1xdPQ XmAq91HsSRoN7X6hhR9bLFDESvsGTHE2UGn4PsDLRQZfh2GCHWmJTWO+7F95X+zBtYqg JnLNYGaQqHIkgn9W4iTZRgUkd4WMzV/X3yuJHCBKt0wrTB2BN2t09UKftuEhCtNPjIFb HEmw== 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=kWCrz2KU8h744vxLguDhIrWWg2q5qa6M3b4q4pYmIRw=; fh=BVGnS8WLajkqYel2RhVPfl4Sswy7Qsiw9pHqIy9Wjhw=; b=pMGnE4BMn6ZDsrtE8ia8f8bDvHj/ed29roO7G/4KjSYR37IBTYBlt3bJ9uacNZoVg8 H1ogTTaioR/FJ7Ippyc8sPwF975xqZvmi6Fo0fzhksQi5x0bqHYCeS566uz/uJACInIF h3Pmw/+7s11JBSUT7IJizvVIFIWrgcxA/ZS2qOtiNncxqCQLr5GVHPeM1SsKiASNH9hL TEhcO9NP+X+vPWUr+An+ypQELM82ZBFmFilY7PG8+N8+fDjKJwHa5sOp3TxWO5qEhoLj chBZolazCHWppy7w3HHxYuumh3E3ExgcQsZCByxAU+ewEW62eW1bpIJmp84sZ7tNLDx/ +f0g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mBXKUZ1I; 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-798abd1d54fsi1519669385a.462.2024.06.19.14.04.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:04:05 -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=mBXKUZ1I; 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 1sK2Pj-0002ML-2Q; Wed, 19 Jun 2024 17:00: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 1sK2Ph-0002L9-1r for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:17 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pf-0000h9-6e for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:16 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1f6fabe9da3so1749825ad.0 for ; Wed, 19 Jun 2024 14:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830813; x=1719435613; 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=kWCrz2KU8h744vxLguDhIrWWg2q5qa6M3b4q4pYmIRw=; b=mBXKUZ1I4lHVSJcaHvCDDCIQZSzQXEttWhrRkuewz7fa3Sm2YPMBPJ7QE9bfH9BudY /j1+KHwKZYRdUEozPD+926N5OGM9UDNkIy2U4OQ8opPXUkSYDOftftzWJu8MFgoY+lOo BFyekneKM2DG5en86zduLVmBoJxOLsbjo73mLn5r59KFTx3rOtj094QUTnOb0D2gOIH+ KI7wJMBZJOByEsYSuig1mNSO8QDCW+A5kTw5g/HmaRejv+eL5PEs96+gg6vaN+Q2mc5X 1Li6IorUHOnWKw1EAokqp32fl8xBqfMK9b9XvRIlN18RcThA7+RrvGyu4PZbsbb6fFDE chJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830813; x=1719435613; 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=kWCrz2KU8h744vxLguDhIrWWg2q5qa6M3b4q4pYmIRw=; b=TB9KTh3vxC+RcefLNsWuO4dpbQ70mubqW8KqddP0ZIPbbMPIJJhaVOv9bV/NAIa4PZ WFbh/sZ3QP+EA5cgDeFo97f6iWk950qtt6F+7OmN5Z8VVeOWZAOkJy7YoZYL9bk24+Qy AzpB0ZVB9yNpeLYuiuTj/K4jym6ckXNPK5XsuhX/EQuqNxTE0B6WtKs81NUCKlfCOmps E7GHj9Kk/gsAD7q0PP36nSgB97rSbHtKiNAX8ofnGwxy9YWxYwZYZOn4equQ3k/uSor/ 6bpnuz2+Fstog55uOTvtngPn3HOtdRHiQY9xquT59eCJq24SVcZ9TZ3DsJEU5FfqUhxJ n1Ug== X-Gm-Message-State: AOJu0YyKe8T828iTOnflt566cjKj2bJ83R0mKLE3Vsh0ULTc1gXDfLbE WElK/OwimO6YvnTxxqqI0PCocpekPh+19TSe7rQu2J3s9PZ0ealG6nW9snYhoQlbOmzdiAgBfV4 s X-Received: by 2002:a17:902:fc4e:b0:1f9:c661:7b9 with SMTP id d9443c01a7336-1f9c661092amr6024045ad.42.1718830813126; Wed, 19 Jun 2024 14:00:13 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Anton Johansson , qemu-stable@nongnu.org, Manos Pitsidianakis , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= Subject: [PULL 21/24] accel/tcg: Fix typo causing tb->page_addr[1] to not be recorded Date: Wed, 19 Jun 2024 13:59:49 -0700 Message-Id: <20240619205952.235946-22-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::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 From: Anton Johansson For TBs crossing page boundaries, the 2nd page will never be recorded/removed, as the index of the 2nd page is computed from the address of the 1st page. This is due to a typo, fix it. Cc: qemu-stable@nongnu.org Fixes: deba78709a ("accel/tcg: Always lock pages before translation") Signed-off-by: Anton Johansson Reviewed-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20240612133031.15298-1-anjo@rev.ng> Signed-off-by: Richard Henderson --- accel/tcg/tb-maint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 19ae6793f3..cc0f5afd47 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -713,7 +713,7 @@ static void tb_record(TranslationBlock *tb) tb_page_addr_t paddr0 = tb_page_addr0(tb); tb_page_addr_t paddr1 = tb_page_addr1(tb); tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS; - tb_page_addr_t pindex1 = paddr0 >> TARGET_PAGE_BITS; + tb_page_addr_t pindex1 = paddr1 >> TARGET_PAGE_BITS; assert(paddr0 != -1); if (unlikely(paddr1 != -1) && pindex0 != pindex1) { @@ -745,7 +745,7 @@ static void tb_remove(TranslationBlock *tb) tb_page_addr_t paddr0 = tb_page_addr0(tb); tb_page_addr_t paddr1 = tb_page_addr1(tb); tb_page_addr_t pindex0 = paddr0 >> TARGET_PAGE_BITS; - tb_page_addr_t pindex1 = paddr0 >> TARGET_PAGE_BITS; + tb_page_addr_t pindex1 = paddr1 >> TARGET_PAGE_BITS; assert(paddr0 != -1); if (unlikely(paddr1 != -1) && pindex0 != pindex1) { From patchwork Wed Jun 19 20:59:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805644 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp14720wrt; Wed, 19 Jun 2024 14:03:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWg4dV85s/2rQ6yKpOxQQw61Uy4VUCeNuns20A41YLdmOBoSHfvbMLX1bj7yNcYHiQLyM7DRu5Rj6bXmCm5h4g0 X-Google-Smtp-Source: AGHT+IHPxa3xYgvaOre5fPiASwO2D0W+GtFiLjUIdQF4LP77JTJCpoB0KFMmueIl0coPfKHMtwBw X-Received: by 2002:ad4:4bb0:0:b0:6b4:ee84:905e with SMTP id 6a1803df08f44-6b501ea4245mr33764216d6.43.1718831001495; Wed, 19 Jun 2024 14:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831001; cv=none; d=google.com; s=arc-20160816; b=yc3ahFCou3/8Wiy/2V4LBLmGElhdmNuSrbqJxdCa9tCdxn4KqeJA/H4YGXq8+WC9Vi a7aVaGnNVSR1BxroEbDgDsxpx56gYF9EcIxgSsZUMjrOt7fkL4ZWqB6rDylvVUO+hwc8 To24E1caqMdwZ0He/dCpEo36RTqMS/q2N6uL+aAsyE8C0yT0vblmi0j2Z8+I18DStQ9t wrmYeE0SidUoivX5x8kGEW2bxfEB0zJaglYfpC83AgsKpYQlVjufTaK9R3/4Xikq5vQs 2oYtzexZICPXmWo7gFZNA2rVhAMGZ4szgYJuFlID4SRVPst+EsblQh2ZqekOOi3nbD7h kBPQ== 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=3SDNjdEkTqvqZmekms95ys+/GW3YEsb5HtHOIrwzGFc=; fh=tXc8/PegD6StpQY3Zjfq1FUKW8t8Wvrgbx4ymQHH960=; b=DNYI0uTfwy3FLgV8daFpdPtg1EPhnO6x8bRHb23BeKHEb3fG1feKNs/cDSaXfdrXuj rzIDkwsxd3MplX1lQcvvqQLngAnH2Enjlgmgh2QDsJx81fZHrtCvVPpiLrfwWn4Yk0jO 7ZESp90aQQ2M6MhMQtbHR0F8CXkRzW0G6+r/L9qchMWDREMTOQFmOqeQl6/LB8Mrfvvk rPf8BTXdH4t+p5Y7Dei4KMIqdVdpKDKoof+SNK78y+tmGBcHo0qDqSSJJ6QmN9bgI6K0 g5BTeofGrxWLgKZ62P4pMQuVh+UlEUW90ZFF9WPaUOXmwF36yrGTFMv4OdhFZZ9Zzaqo ZJqw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ikZHgM/r"; 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-6b2a5b7013fsi154896576d6.500.2024.06.19.14.03.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:03:21 -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="ikZHgM/r"; 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 1sK2Pk-0002Nr-PM; Wed, 19 Jun 2024 17:00:20 -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 1sK2Pi-0002Lu-Df for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pg-0000jK-Lc for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1f44b594deeso1815165ad.2 for ; Wed, 19 Jun 2024 14:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830815; x=1719435615; 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=3SDNjdEkTqvqZmekms95ys+/GW3YEsb5HtHOIrwzGFc=; b=ikZHgM/rWxdhby3f+G9r9wK03T2EXP902AVvaZAzoTFTTbAPhk7bSnLDz8lGVw4Zk0 HooAv3VvguuYyLuVuqM0QQfdhXIiWCknH8qktNl5hUAag9dbg8QS2bkzaRx8mFd0axFv O9tC0yWyDOZb/5zgMWA16X1jjrHqJOi5d9EByxRB047hIhB+xTVOfkxmgAIl8TDB9ZSt PvOSllYJZtEhLlCfL+OlgCt16PW6jikv5mOdCasVkc4yxG86iFN+V5Rc8y0lLSwvtG08 +9qmzAy0rPMHcV0Pm5NzVPyEs7YDQNSZEISF1QA1enHAED6E6v02DvsEU3T4mxwOL5oV jg4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830815; x=1719435615; 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=3SDNjdEkTqvqZmekms95ys+/GW3YEsb5HtHOIrwzGFc=; b=eA98S0ZX3FeUOl9+C007iEq0g4O7Wxe3H1FLgwCdgiNk+RtfNR087vhx+pCoQt4w0y 5Q1Awc1w7zOC/inUjASIYI470dRQBNPKSfK3cIpsZ1Rv6vABTsGMD26xVaXnMG1U14Ys tZ3QBdx0qh3JGv2UEfXySRBJ9A+/v3LsPTbPRjYe8ANze/YZefwkzyPZXQAn6OdvKQ6f HmuBj2CKEHuGGkH38ahJLCEsjI3OXfOBnrWwtWYJibrU+n8DFDlbze93Qg98IHajUymn qwHs/J9y8nGzGnZNeSaj6qGw1mvkMFvdvn2IHV4b0COFempTn638lI8Xvd2TyR5o+Qhd X5Iw== X-Gm-Message-State: AOJu0YwDDXEcoAtVThTvGJ/mbgFcgbI0uBwQ4KtF1n27956QiUK1ij/j Hb0tsRCVZr0F2U34PvkuS8/klzPjmxch2s8I3K3l/vQ+tV0xdUeHQ+vuu9K9a6IH3+aSakznp5B p X-Received: by 2002:a17:902:d581:b0:1f9:93fe:a1ea with SMTP id d9443c01a7336-1f9aa4335cbmr40059525ad.35.1718830814139; Wed, 19 Jun 2024 14:00:14 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 22/24] linux-user: Make TARGET_NR_setgroups affect only the current thread Date: Wed, 19 Jun 2024 13:59:50 -0700 Message-Id: <20240619205952.235946-23-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::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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 From: Ilya Leoshkevich Like TARGET_NR_setuid, TARGET_NR_setgroups should affect only the calling thread, and not the entire process. Therefore, implement it using a syscall, and not a libc call. Cc: qemu-stable@nongnu.org Fixes: 19b84f3c35d7 ("added setgroups and getgroups syscalls") Signed-off-by: Ilya Leoshkevich Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240614154710.1078766-1-iii@linux.ibm.com> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- linux-user/syscall.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b9b5a387b3..e2804312fc 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7209,11 +7209,17 @@ static inline int tswapid(int id) #else #define __NR_sys_setresgid __NR_setresgid #endif +#ifdef __NR_setgroups32 +#define __NR_sys_setgroups __NR_setgroups32 +#else +#define __NR_sys_setgroups __NR_setgroups +#endif _syscall1(int, sys_setuid, uid_t, uid) _syscall1(int, sys_setgid, gid_t, gid) _syscall3(int, sys_setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) _syscall3(int, sys_setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) +_syscall2(int, sys_setgroups, int, size, gid_t *, grouplist) void syscall_init(void) { @@ -11891,7 +11897,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, unlock_user(target_grouplist, arg2, gidsetsize * sizeof(target_id)); } - return get_errno(setgroups(gidsetsize, grouplist)); + return get_errno(sys_setgroups(gidsetsize, grouplist)); } case TARGET_NR_fchown: return get_errno(fchown(arg1, low2highuid(arg2), low2highgid(arg3))); @@ -12227,7 +12233,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, } unlock_user(target_grouplist, arg2, 0); } - return get_errno(setgroups(gidsetsize, grouplist)); + return get_errno(sys_setgroups(gidsetsize, grouplist)); } #endif #ifdef TARGET_NR_fchown32 From patchwork Wed Jun 19 20:59:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805652 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp15411wrt; Wed, 19 Jun 2024 14:05:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWFQHvL2fhsBfcjme15djhlobTPcRz0RHk9lOPkCNUPaapA4npvTBypmBttVgc+qK4TksohDHr2+x9dGTsVr2EW X-Google-Smtp-Source: AGHT+IGDuXcT3d8AJoOF3L+b0/QeT7MoLnb1d64jQjrtUsBHh5GFRkCktn8yTXS5InCg0KcsYkJx X-Received: by 2002:a05:622a:296:b0:444:9af1:7fd with SMTP id d75a77b69052e-4449bcce3ddmr109490541cf.29.1718831120869; Wed, 19 Jun 2024 14:05:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718831120; cv=none; d=google.com; s=arc-20160816; b=WThZ2r3qWFQE0+BSE4kPG1jpt/ktG0sj4HV/ORhopIx/KXBkKGPB1usqFaCf9LHkwY BeeDWZQWtUIgesJP9ZsmxEk9/yqTAbzYs+PsPOPuYVJ0999sLYFsuR+UIdwv4by8/jbh gmUxqH7BtFCc51I5WVB/eWgbjZVdrADGEpabNleS7W6augutQ8upLCtFnTm0zwzEE/v1 /jTO1X1sl+lAB0CFEgIN0ETR7ff83LpD5AHTqN/LXDnvnGR66V0dbNWEeysW1UVOHVru aTSjpZMg5T9l+oQdWqVQ0Z9XLRQwC0Twn+jpshzROgBILSU1jdZyqM1JzXL/DmpoMxIO AwNA== 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=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; fh=OC4ixu/5vNet7q64PegWeKP0/xroTwWbFU2yqdVXnjs=; b=ZCXSidSbY3IhPSmGfBl6cCblIrriJDnWk4dWKiBeY8NGxQi9SRhWvEqvOgzbprPwZw EPhn23LYQpE8hi3ZJrC683fJ6rIJ/Zmi/UZE0SpLmKVJ3OGl/tmAfsxZ6ytWWW+qOmm1 xQCo5p/rnZhyJ6NnwEvZxbUHOoyPI7Apc0gm83fEbv+DsoaSrMBNh0mshttlHmewtGJk zFE7XC0rMfXjdgyygosVHl+N7s6+HNbAVcUpOYLqR8LgU0deSI7x7lgiFM5o/wUXwmDC VK/oAClFKdks5RnhC08VeofCfBl4FeXNzGHjOm5btiLEBCYKFaOy9Io8nt2PT9hrjDXe 7LYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IIy6ns+n; 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-441ef3dcbc5si157109061cf.229.2024.06.19.14.05.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:05:20 -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=IIy6ns+n; 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 1sK2Pl-0002OS-J3; Wed, 19 Jun 2024 17:00:21 -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 1sK2Pi-0002Ln-B3 for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Pg-0000jE-Kr for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:18 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-70346ae2c43so916740a12.1 for ; Wed, 19 Jun 2024 14:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830815; x=1719435615; 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=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; b=IIy6ns+nConpkdezXu+VmOc6doR/SpZddMTcpUmMxW8zVPDno1mVFWtJQKzb4W6RbK Kp7Zdj3LNtUV6WMG/Ye4V8qNVJQF1fzLCViKTXXq4TnLbaIlRKBtv06F2IcSKh8KCBrD ABFsG+hIC0OEdarL9m02+JtAnlX5CY5kImv/MAe+CV0sYHUG3sc+lQo0KPDcAihYyMIR wCf6lsJ7TlawxkyO58P+6P3/Oz/UiHOmBrrrt36yXtq7ymAEtAXuRv6pTjVy/AL481fO Us5X3XzNcTHOM67Nl2X4m67Ipo8/Kdk3FHH+kU39NWDnvMtxDUwwj9VBZeijcev5GfCJ 40nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830815; x=1719435615; 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=FtNxjFE/f89KWIDXkuZChFJ2j7WRxZA+Mhz/JhRC3yg=; b=wh5TwMo3Thx0Nw+S388rzPtoYEZdnGTZRBO82Yeh1d3+oWsiKO/ZDDBDDiXsTcKr52 7knjo/6tHjaQ4bWqePYGA5sT5zOW74M9Ay4xd/iKEHwdcuPYa5TQ0tfcxjpyiX2sC+T7 5vr3geEZ2N7rxRayvOxkeNXV9LDaf2DiWSg3+2V1vHj9m0YgMoj3hzDSr3YQmTPbOrCR Fy2xQAh50lWU1y0hBO+bnjMwszkucZyLUhHCR+UTMYkZt1FIBtazEcRsIbNviU8ufmYT P9rwOXNRfq/NhAZXEZAK3i2IrrwhlEI039QE72XmIs42MmKe9m8+Zj32+oQvefIDGbxO 96Pw== X-Gm-Message-State: AOJu0Yx4Duwn+bky6mtvb+MD4ixRM6ZwotIJ1VM8YXdEwdyC8UChpQEN 2GndD9n7hGDVgnzDELUmLlTSJ0/ccR6eXoPI4QvIZr6alxPjPqkxUE3dXaFDQSEUcDC+3SvKz1Y n X-Received: by 2002:a17:902:f9c4:b0:1f8:3e2c:d66f with SMTP id d9443c01a7336-1f98b23f6d9mr67753515ad.17.1718830814841; Wed, 19 Jun 2024 14:00:14 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Cl=C3=A9ment_Chigot?= , qemu-stable@nongnu.org Subject: [PULL 23/24] target/sparc: use signed denominator in sdiv helper Date: Wed, 19 Jun 2024 13:59:51 -0700 Message-Id: <20240619205952.235946-24-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::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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=unavailable 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 From: Clément Chigot The result has to be done with the signed denominator (b32) instead of the unsigned value passed in argument (b). Cc: qemu-stable@nongnu.org Fixes: 1326010322d6 ("target/sparc: Remove CC_OP_DIV") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2319 Signed-off-by: Clément Chigot Reviewed-by: Richard Henderson Message-Id: <20240606144331.698361-1-chigot@adacore.com> Signed-off-by: Richard Henderson --- target/sparc/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/helper.c b/target/sparc/helper.c index 2247e243b5..7846ddd6f6 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -121,7 +121,7 @@ uint64_t helper_sdiv(CPUSPARCState *env, target_ulong a, target_ulong b) return (uint32_t)(b32 < 0 ? INT32_MAX : INT32_MIN) | (-1ull << 32); } - a64 /= b; + a64 /= b32; r = a64; if (unlikely(r != a64)) { return (uint32_t)(a64 < 0 ? INT32_MIN : INT32_MAX) | (-1ull << 32); From patchwork Wed Jun 19 20:59:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 805630 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp13937wrt; Wed, 19 Jun 2024 14:01:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOHBObn+8RoK3GH2+GNOodTz7MN6WzNENZudzyyF1HecHXK9FCjmUgmlGEOfxLd6qgGEqLMrudyu08TgSilo+b X-Google-Smtp-Source: AGHT+IFpJhvFxsqVc5fn72Ev90YwdNvjPJhdw0aDL4BCOftY6sqmAljDCtPm9C+6gth31Al0ZHCy X-Received: by 2002:ad4:4484:0:b0:6b5:6a1:f899 with SMTP id 6a1803df08f44-6b506a1fbf6mr25158176d6.10.1718830886899; Wed, 19 Jun 2024 14:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718830886; cv=none; d=google.com; s=arc-20160816; b=MtHrL0fH+t4OklNfgUDSFJe8Wu6ePnDihBZ9Q/A+qGCxKejgfZ+Bl5ywD4ms8FrM5e K5w+nOXNUfGPitMgS+tRWKOnPcm0BhYX9rnd09OjyRp1wXgisK3XGQemyehDcgpOf+bn 8mYDJpBGMs+jWi2RZp4HQYUiCX/71k9taW/9Shiet06USdgF22BiWapjelX14AHDw5fp uu7HttUsecJz/q8WKO9Ni+jT2iTTS6cGb7TCQZX5gTX55Sh61WvdossBrfhX6V7lcoRz t7stzmao7lOXAlBfkFtsQx4ib4ZZR2CGr1XaeaOMROIgO6UTlW2WqVFLodbX60OJvqfr /inQ== 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=V+5WPOQQn7wdJFBxPC03WeaiWKObhZXvJYhNjI8CS4I=; fh=dEwFLx4RlFeIdEjB+81df8rw+g2kcnWwTIpTqh+QlBQ=; b=U6UTNByrUo7bm4WL6gW3R+ototAGSF83gD8ywsqYnsh0GxwgI9FKGt0+vnqlOGeRNm oUtq2Yq1NRd93ZB/DU/oq2Rg3z6yX+sUoKhz29wzsjE5m8HFHA8T2VsOzm0IN6EpMV+T 3LluTor9QE4xF0BdbL2t5VLs0w6FwoPAI2f7hCICl9qzP9cySJH0TNl9DbeL3JwR7UJS Ou0mYT3jyEKelIXQdAh9uQKM/b0NC5ZiEFPdUjsFCx2Nn1PKrl/lqSdluHd8BhL+3mSX 5pF3CRD5ukoxGV7QQfjlVY2wfdAjW8MI1BIMytDPCLpC+joI972J5DjTLjeGsOhzk3Iz BLUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zHAo2QIQ; 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-6b4f7de896csi46786476d6.418.2024.06.19.14.01.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Jun 2024 14:01:26 -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=zHAo2QIQ; 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 1sK2Pm-0002Pi-O3; Wed, 19 Jun 2024 17:00:22 -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 1sK2Pj-0002N4-IX for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:19 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sK2Ph-0000jk-5b for qemu-devel@nongnu.org; Wed, 19 Jun 2024 17:00:19 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7062c0ee254so249994b3a.0 for ; Wed, 19 Jun 2024 14:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718830816; x=1719435616; 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=V+5WPOQQn7wdJFBxPC03WeaiWKObhZXvJYhNjI8CS4I=; b=zHAo2QIQYJDkGsYuQh7Ekaa3n31GljJLlAlSfEhV40V8BzV0GEwWl8MdwmqcaI5Gqg PXeKHG75DK+fLuVZsuBHxBltqoaQU7YPIVS/hPR8LXJoMH7XF7waBo7MfY96VQrTfHKc JmtwPJ9rZY8vdj+C6sh+on0FxFEBfTGtKpKqBfECljq+//8ArTT87MP+Xk2JdOOauXwB 4OjyzT6ghxcD/KVpDfvjlBMvmGVMRMmEhTmkoF7rxOvBNY3Yr0oMQTMAzqJz+khPE9XP k9X4pGQMPMFRe2zGK/aatFYrMndALD/kKNz/OKbA+1U+3bnTBD5WT5QA+44lay78xnB8 iHTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718830816; x=1719435616; 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=V+5WPOQQn7wdJFBxPC03WeaiWKObhZXvJYhNjI8CS4I=; b=W9BpkqBMyGIgp3gwiejOTG3lrVabiAMhHcdBQD9qGm0CW8Lcc5WMg6tSfp6piNqLBG njEI9xbKocHFPJaFAmshYw9ad19ZuemBH8twcTiKB4n2f8+4dW4klb53vQ56UcbQhEBE GN1yKuWmKGb6gMVG6rsrcxAyKQtvPYGyFYfw5zEVdOWV/91D16sOw1Pi2KTFlTXBTSF7 lDhJCwrNHDbrGFXau2+sZ9K3qR4s9c+RZroZdPpnJWQSORgm253SFf1EZ2LK8QSOjfr1 5xUgMHwACuZ0sm4NBCiBjGbsNHW+5cqIJ2p4P5/qEHRxpLvz4LNFXc0qfatgk+GDV5zf H5KQ== X-Gm-Message-State: AOJu0Yx9yRPzbZEbFIpnW3rmiZNrf4dpTJDONHPCx6+KJCR2Y6Zd8sz0 yVgiQLbF98uraj0rHkOxHnQosbPUY9D9gCAEzPMNmk9w9Dyr6mAPN3xLD0xLnu8NgQ3OBFWLk/S 2 X-Received: by 2002:a05:6a20:7929:b0:1b8:a2ca:3b6d with SMTP id adf61e73a8af0-1bcbb5d4cfamr3375701637.37.1718830815679; Wed, 19 Jun 2024 14:00:15 -0700 (PDT) Received: from stoup.. ([71.212.132.216]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f98f8f8c42sm39183765ad.162.2024.06.19.14.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 14:00:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Song Gao Subject: [PULL 24/24] tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers Date: Wed, 19 Jun 2024 13:59:52 -0700 Message-Id: <20240619205952.235946-25-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::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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=unavailable 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 Simplify the logic for two-part, 32-bit pc-relative addresses. Rather than assume all such fit in int32_t, do some arithmetic and assert a result, do some arithmetic first and then check to see if the pieces are in range. Cc: qemu-stable@nongnu.org Fixes: dacc51720db ("tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi") Reviewed-by: Song Gao Reported-by: Song Gao Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 1c4dc4decb..5b7ed5c176 100644 --- a/tcg/loongarch64/tcg-target.c.inc +++ b/tcg/loongarch64/tcg-target.c.inc @@ -382,8 +382,7 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd, * back to the slow path. */ - intptr_t pc_offset; - tcg_target_long val_lo, val_hi, pc_hi, offset_hi; + intptr_t src_rx, pc_offset; tcg_target_long hi12, hi32, hi52; /* Value fits in signed i32. */ @@ -393,24 +392,23 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd, } /* PC-relative cases. */ - pc_offset = tcg_pcrel_diff(s, (void *)val); - if (pc_offset == sextreg(pc_offset, 0, 22) && (pc_offset & 3) == 0) { - /* Single pcaddu2i. */ - tcg_out_opc_pcaddu2i(s, rd, pc_offset >> 2); - return; + src_rx = (intptr_t)tcg_splitwx_to_rx(s->code_ptr); + if ((val & 3) == 0) { + pc_offset = val - src_rx; + if (pc_offset == sextreg(pc_offset, 0, 22)) { + /* Single pcaddu2i. */ + tcg_out_opc_pcaddu2i(s, rd, pc_offset >> 2); + return; + } } - if (pc_offset == (int32_t)pc_offset) { - /* Offset within 32 bits; load with pcalau12i + ori. */ - val_lo = sextreg(val, 0, 12); - val_hi = val >> 12; - pc_hi = (val - pc_offset) >> 12; - offset_hi = val_hi - pc_hi; - - tcg_debug_assert(offset_hi == sextreg(offset_hi, 0, 20)); - tcg_out_opc_pcalau12i(s, rd, offset_hi); + pc_offset = (val >> 12) - (src_rx >> 12); + if (pc_offset == sextreg(pc_offset, 0, 20)) { + /* Load with pcalau12i + ori. */ + tcg_target_long val_lo = val & 0xfff; + tcg_out_opc_pcalau12i(s, rd, pc_offset); if (val_lo != 0) { - tcg_out_opc_ori(s, rd, rd, val_lo & 0xfff); + tcg_out_opc_ori(s, rd, rd, val_lo); } return; }