From patchwork Fri Oct 29 08:58:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Chang X-Patchwork-Id: 12592345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DACDEC433F5 for ; Fri, 29 Oct 2021 09:50:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A0081610D2 for ; Fri, 29 Oct 2021 09:50:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A0081610D2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:53126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mgOWR-0003tB-Kb for qemu-devel@archiver.kernel.org; Fri, 29 Oct 2021 05:50:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mgNmE-0006pn-1v for qemu-devel@nongnu.org; Fri, 29 Oct 2021 05:02:18 -0400 Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]:45618) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mgNmA-00069O-1f for qemu-devel@nongnu.org; Fri, 29 Oct 2021 05:02:15 -0400 Received: by mail-pg1-x530.google.com with SMTP id f5so9271786pgc.12 for ; Fri, 29 Oct 2021 02:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=msn2vYfPMSfmjcvhvCuoNT+Xnj+wzoOeb8IO8wdHfk4=; b=Jcsl7eJcfzUzHWO+WyYJmNzsXSDEygjCWi9eoEzfoLvwOUhmd6EK9i2q4jPD6rqujV +fhlA9Me1UWSDZXwDW5Cr7zsA6/jasg1KQUgD+Flpnd2oJyi52ZBaICO2Bpsr2BNnkUW K5YqQHv3PLXYPlcByCqDrOyTZaO4l66GkQDYjGGNUBxi2uHVlDcmftjmRFYHR53dUzAE luIBx/wCz723XNjWhRK3jYh6joNqSSmw5aSMQ0wjtMq7u1BOppkkMFIYnaUs5qFAahM5 0jomVIKKRINnf/r1XhMTKhIfb2tudGSIRJ0hP44jk+74TU2QJKKu3OnfOMmD61W+kPUx MUlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=msn2vYfPMSfmjcvhvCuoNT+Xnj+wzoOeb8IO8wdHfk4=; b=7OpKq7qY5xOigikxv+9eT/rKDXdrXt9gnQMBN7s2GP/+F+9MWkb/zIyVOxJ2B9TzwS Rt0ogRL2Pv8IDp3LEPjTKfTYzaYWSSnzXG5EtpN4DkUfX9iDH5m887Z98Z7e5zDLxova wb+xuiaQEu4KLe2cpjWlZsezoHmqUUsZAt8VvRpGDmibFxxPc6pkKyzam3sXBj7iXHXL k83X9YXwzTEZWBiz4VAfmBzHQ4JnzM2Rk5/gY0RZ8Y+NoKiiBNZqtn3ty34Hv/0GQpYv Hg9gj+aFUfXFBfhKACzvHLXX4lgxFOpcHtseosik4rMv2egvbxVNnyX47nRW8mgao9/v Iqkw== X-Gm-Message-State: AOAM532w32zWufU/0Fa+LxCgIXxNC23CIrlfPwyeI4CRonVngLCkjiNo lFhhml76uklRiXti+vYQeu7ulCbchIOitfgi X-Google-Smtp-Source: ABdhPJz1mC2T7k9gsws6A+2UDvUDBSTH4wCSHI/zqRTijUUcBcE9aVJTAf2N3ARUL7SVSu+Sc8X02w== X-Received: by 2002:a63:6f0e:: with SMTP id k14mr7387782pgc.351.1635498132676; Fri, 29 Oct 2021 02:02:12 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:46b:ce55:983b:6962:38ac:e1b9]) by smtp.gmail.com with ESMTPSA id t13sm5081477pgn.94.2021.10.29.02.02.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 02:02:12 -0700 (PDT) From: frank.chang@sifive.com To: qemu-devel@nongnu.org Subject: [PATCH v9 42/76] target/riscv: rvv-1.0: single-width bit shift instructions Date: Fri, 29 Oct 2021 16:58:47 +0800 Message-Id: <20211029085922.255197-43-frank.chang@sifive.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211029085922.255197-1-frank.chang@sifive.com> References: <20211029085922.255197-1-frank.chang@sifive.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=frank.chang@sifive.com; 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-riscv@nongnu.org, Frank Chang , Bin Meng , Richard Henderson , Alistair Francis , Palmer Dabbelt , LIU Zhiwei Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Frank Chang Truncate vsll.vi, vsrl.vi, vsra.vi's immediate values to lg2(SEW) bits. Signed-off-by: Frank Chang Reviewed-by: Richard Henderson --- target/riscv/insn_trans/trans_rvv.c.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc index 0076ce5a0a9..48942129135 100644 --- a/target/riscv/insn_trans/trans_rvv.c.inc +++ b/target/riscv/insn_trans/trans_rvv.c.inc @@ -1685,9 +1685,9 @@ GEN_OPIVX_GVEC_SHIFT_TRANS(vsll_vx, shls) GEN_OPIVX_GVEC_SHIFT_TRANS(vsrl_vx, shrs) GEN_OPIVX_GVEC_SHIFT_TRANS(vsra_vx, sars) -GEN_OPIVI_GVEC_TRANS(vsll_vi, IMM_ZX, vsll_vx, shli) -GEN_OPIVI_GVEC_TRANS(vsrl_vi, IMM_ZX, vsrl_vx, shri) -GEN_OPIVI_GVEC_TRANS(vsra_vi, IMM_ZX, vsra_vx, sari) +GEN_OPIVI_GVEC_TRANS(vsll_vi, IMM_TRUNC_SEW, vsll_vx, shli) +GEN_OPIVI_GVEC_TRANS(vsrl_vi, IMM_TRUNC_SEW, vsrl_vx, shri) +GEN_OPIVI_GVEC_TRANS(vsra_vi, IMM_TRUNC_SEW, vsra_vx, sari) /* Vector Narrowing Integer Right Shift Instructions */ static bool opivv_narrow_check(DisasContext *s, arg_rmrr *a)