From nobody Mon Nov 25 03:31:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1718831095; cv=none; d=zohomail.com; s=zohoarc; b=HUF8YCtnWhAzvBnEZaGsjdK51bp6Cx//jmQvtSf4q6mhOc5KcBdnVuhTVszzWfOGMz/KItmQsHXZIbZulzachZk776DE2JWONb2dWUzM8qrgQQMX8qZwqTwh8fb0hN+ULuECg5cwE9nmQ4Hdxa/jpRbNpS4YV4EDHoK7uJVLYc4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718831095; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1R6PniPLNMWr5brkBomFlTCMhKgUFohFxAyFLb2Rr/U=; b=bOFSQhsbiwqvvypu4QH+rL0VIhlXruQa3t/gfdoJqHBIEpPbeOnJ+aSpuN3B2zckrfQKfMYH5IbXvtBaXcl0A0Ej8BcGmtNuEUx0nx6v2BiHwJ1DMAQmyIIiMgU7/4zIp+gSBovKK+f5Bp3E9aSOwGG4Gk0S8XEthhOwuD5weU8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17188310953621010.5298213081284; Wed, 19 Jun 2024 14:04:55 -0700 (PDT) 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) 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) 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-Google-Smtp-Source: AGHT+IFpTRNcv0313QMDfjFS1Ep11oQST3wo1aTJLp2Xa6fm9pV4nuub5XHsndlPuI9o5zKIHLDVnA== 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) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Song Gao , =?UTF-8?q?Philippe=20Mathieu-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1718831097506100003 Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daud=C3=A9 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] =3D { + OPC_VREPLGR2VR_B, OPC_VREPLGR2VR_H, OPC_VREPLGR2VR_W, OPC_VREPLGR2= VR_D + }; + + tcg_debug_assert(vece <=3D MO_64); + tcg_out32(s, encode_vdj_insn(repl_insn[vece], rd, rs)); return true; } =20 --=20 2.34.1