From patchwork Wed Mar 6 09:20:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Tao X-Patchwork-Id: 13584052 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4B47AC5475B for ; Wed, 6 Mar 2024 13:04:21 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rhqvZ-00017h-SQ; Wed, 06 Mar 2024 08:03:21 -0500 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 1rhnXT-00041N-LZ; Wed, 06 Mar 2024 04:26:15 -0500 Received: from out30-111.freemail.mail.aliyun.com ([115.124.30.111]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rhnXL-00066D-Iu; Wed, 06 Mar 2024 04:26:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1709717155; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=FhejODjRj1Dtn0Zhchn7KBEXK/O6sSKNl7UgAJpwpDw=; b=PgxabykFG9ubL0+1M7MSMeT01yxvz3gAvfFvbD9mvi6L5JCPjFF0h5c5l/GOMG51Dezf/oyRZ4d1JONpaEDM6m2fX2eAuD28efqmDjJ/+23pBIgi24NNsjhJPdtE4U9H1Z3h7AzBYA+HpAhyOQlYiShu/p5mi6YsCvdcZgfBRLU= X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R171e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046049; MF=eric.huang@linux.alibaba.com; NM=1; PH=DS; RN=9; SR=0; TI=SMTPD_---0W1xCBJC_1709716842; Received: from localhost.localdomain(mailfrom:eric.huang@linux.alibaba.com fp:SMTPD_---0W1xCBJC_1709716842) by smtp.aliyun-inc.com; Wed, 06 Mar 2024 17:20:44 +0800 From: Huang Tao To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, zhiwei_liu@linux.alibaba.com, dbarboza@ventanamicro.com, liwei1518@gmail.com, bin.meng@windriver.com, alistair.francis@wdc.com, palmer@dabbelt.com, Huang Tao Subject: [PATCH 0/4] target/riscv: Fix the element agnostic function problem Date: Wed, 6 Mar 2024 17:20:08 +0800 Message-ID: <20240306092013.21231-1-eric.huang@linux.alibaba.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=115.124.30.111; envelope-from=eric.huang@linux.alibaba.com; helo=out30-111.freemail.mail.aliyun.com X-Spam_score_int: -174 X-Spam_score: -17.5 X-Spam_bar: ----------------- X-Spam_report: (-17.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 06 Mar 2024 08:03:17 -0500 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org In RVV and vcrypto instructions, the element agnostic function vext_set_elems_1s can't deal with the big endian host environment. This patchset fixes the problem by implementing the right function to set agnostic elements. Huang Tao (4): target/riscv: Rename vext_set_elems_1s function target/riscv: Add right functions to set agnostic elements target/riscv: Replace element agnostic for vector instructions target/riscv: Delete the former element agnostic function target/riscv/vcrypto_helper.c | 32 ++++++------ target/riscv/vector_helper.c | 92 ++++++++++++++++----------------- target/riscv/vector_internals.c | 58 +++++++++++++++++---- target/riscv/vector_internals.h | 8 +-- 4 files changed, 115 insertions(+), 75 deletions(-)