From nobody Thu Sep 19 01:00:12 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=1721196779; cv=none; d=zohomail.com; s=zohoarc; b=iNNl7Zg0GfpIhrCqsbA6CllJKTAiNgA11z3cKOXVHRvmKlBCh9JcTiWxOcv1kHZOTPHskOp1w/vEVyYVaqUsGWvxO2hZ56NV5lYEM2NxtBHUJVOZioB1NlbxLhhg8IgkQs1QbVpsvmX5XgH7cWOeMtNb5L93K7OSvT963GodLxo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721196779; h=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=shR5dO6yp58OnhkL2VwnGKfoxEn8l1B1D1MBIepMKeA=; b=ZAUwLNH4r7WUIo1/cMpuYH7wsIXH4H/PbRrdHkfELSUHp3UV1rnTopFPsTlwOwEUbARO/QL7MOblhWuKXRipLn+6nv1zs2ljyKkNbMKoYYhXmi/TFbqNvAWbjbFmSzvOt5KsfRK6b6g4xAWEUFw6bAoP6BW5UsFyLBnnJFqQ294= 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 1721196779875629.5979262368128; Tue, 16 Jul 2024 23:12:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sTxrr-0008AS-S2; Wed, 17 Jul 2024 02:10:23 -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 1sTxrN-0005bp-JJ for qemu-devel@nongnu.org; Wed, 17 Jul 2024 02:09:53 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sTxrJ-00036I-I7 for qemu-devel@nongnu.org; Wed, 17 Jul 2024 02:09:52 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-70448cae1e0so3545276a34.3 for ; Tue, 16 Jul 2024 23:09:48 -0700 (PDT) Received: from stoup.. ([203.56.128.103]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b7ecd603bsm7330404b3a.219.2024.07.16.23.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jul 2024 23:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721196588; x=1721801388; 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=shR5dO6yp58OnhkL2VwnGKfoxEn8l1B1D1MBIepMKeA=; b=Ki0ZGPmz8Nnnf8hYtB/KLkYOVtPTLOZAetHgXzbaMpXVTm/4VGk25+twsch7hpFrmE uCcFE3K1f3Poj58qQawlwBkwIfx5jm8rcDJhw7uO1qRUySx9FLOUyV4uKI1lCbzZp1Qg gRBLv5RcLrCB00HiEellPMd056Zz0NWebOVvw69luvyoeRY4TURMoE1I1lCJp6nw6nxf VZMUCaTqKMlpdsy0dpB3/VnRLjRgYI6lXb4bk2PN/OvCj38wPf7MmOF0BlGx6Pc1dVzb A4eXUMsc/xIPjS14VtU0WeziEiOQ5xiSQON0PIHLokcUM76o8wnJpkFyxPoOxftRYok9 p1jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721196588; x=1721801388; 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=shR5dO6yp58OnhkL2VwnGKfoxEn8l1B1D1MBIepMKeA=; b=a2SLBVWZ/FtaTgTTQ4eZtLd7KU4mneVicT+ipeCriT0Ng5fBqL6QuEPCksa0SzQQoo U8rBZPhl4USNEHdSBkiZdT1mNiu2Biyfk35e0FjyF0Kpxm+pjujw+yTaEGx8LjiOh9hF lOUQSIc/GP+uWOxZoJ0FTKzWcQGrdDTfN6Onw1rP3R79iDH/DtpwYHBzNCkDfzM4I5kw liPtMD6WbWeRMAoIolglKiZo9hxnhRHRnymq7gn70lCCzQgMhbcwhFKZPceglT3M0guo hmb+9RDrjRIst5Eqe8HeBfRQ1ayupWG2S9OZ9da5rZsefLdjaa+skCC4731aarkOcj9R WslQ== X-Gm-Message-State: AOJu0YxLhXkIv1kLw1nU1n/FiTXC0l27iYujpuH4RYvvHmk7sNHWYq+1 L61K1JFJFngRtpg5Vd0dQvBG2f0F8Q+SY7tbcvNK2rV7rIupdGuHLOUHwQFnkn7dtvfHNtaEoR8 g+hk= X-Google-Smtp-Source: AGHT+IHXdI3qRlOirqdTEp/qvlK2rKbjNAbsWEF0ROQkgpQeDm+SAjhBzLzZxpeQnJjRElH1msw6mw== X-Received: by 2002:a05:6830:6e09:b0:704:47db:cd68 with SMTP id 46e09a7af769-708e3778001mr1007107a34.4.1721196588116; Tue, 16 Jul 2024 23:09:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 15/17] target/arm: Use {,s}extract in handle_vec_simd_wshli Date: Wed, 17 Jul 2024 16:09:01 +1000 Message-ID: <20240717060903.205098-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240717060903.205098-1-richard.henderson@linaro.org> References: <20240717060903.205098-1-richard.henderson@linaro.org> MIME-Version: 1.0 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::32f; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x32f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: 1721196781463116600 Content-Type: text/plain; charset="utf-8" Combine the right shift with the extension via the tcg extract operations. Signed-off-by: Richard Henderson --- target/arm/tcg/translate-a64.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index d0ad6c90bc..627d4311bb 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -10466,8 +10466,11 @@ static void handle_vec_simd_wshli(DisasContext *s,= bool is_q, bool is_u, read_vec_element(s, tcg_rn, rn, is_q ? 1 : 0, MO_64); =20 for (i =3D 0; i < elements; i++) { - tcg_gen_shri_i64(tcg_rd, tcg_rn, i * esize); - ext_and_shift_reg(tcg_rd, tcg_rd, size | (!is_u << 2), 0); + if (is_u) { + tcg_gen_extract_i64(tcg_rd, tcg_rn, i * esize, esize); + } else { + tcg_gen_sextract_i64(tcg_rd, tcg_rn, i * esize, esize); + } tcg_gen_shli_i64(tcg_rd, tcg_rd, shift); write_vec_element(s, tcg_rd, rd, i, size + 1); } --=20 2.43.0