From patchwork Thu Jun 9 12:16:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislaw Kardach X-Patchwork-Id: 112615 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 60183A0555; Thu, 9 Jun 2022 14:17:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B5684280B; Thu, 9 Jun 2022 14:17:15 +0200 (CEST) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) by mails.dpdk.org (Postfix) with ESMTP id 00DC640A7D for ; Thu, 9 Jun 2022 14:17:12 +0200 (CEST) Received: by mail-lf1-f52.google.com with SMTP id w20so16036781lfa.11 for ; Thu, 09 Jun 2022 05:17:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yhoxn4ytCyugxT4U99qpxlKim/LStTu07HEc+ucYX+k=; b=lxMzO9wgi5RZkePtddeEVgdDgLS3swgoWsZm0o5YHb0oS8nfyBmjMVxVaKuYqqlG02 Elwr5GIlh+hdUurtnIMMp0CekZp/sCfn0iR2Y+IpDj+oXIa4NzBSQezoCFASQ32P3YkE JG7Lq9EkBF/gc8CDWhHyUDFbzpNbHlqZV+1Zl89wcRcyMMQnNtjDdLhc0lAC8fuvIB+R xsJ0ghEo94GdeHsmQhCIRG4l0wxDQ0S/Yx6rq3VLxA3FfVDeiK7nicPQRUONjCewHeuv lNWhUwaIqfh5Gk4NVfSN3HbtNOZ+RHHY+HDS1bk726Ubl2XiN7XOAMsTb/kEsP/ehvaz ggdg== 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=Yhoxn4ytCyugxT4U99qpxlKim/LStTu07HEc+ucYX+k=; b=s/mWfa+i7voznGdauTTbOMV7ZTqrHBVK3idUdLPy9Cy2n2yMaSH+8pVE7NXslzs+1J EQ8vqEbGC0PF5DiGMpRXG4u0LsjLANTdt2xHRnVMLb9ewtT0BuzwxrjG+hOb7iiRUD9G ybTDCqOPavKYjDAPgjge1MWWInhqygKPwFPQGOeP+8D3aMpuQzIGnqfHv2ywn4ny3VE+ 85gKL+3xl7iOE/ohdMriFjywKBLkTE2L2xNEEjFBkICKhgVSglbfTSZcInMNAJ8Evz2y FokXT0ojbHJVYoIa2hGWIS3HFEeJXXkZoaIksfzz1KSK00HWNyJTTDhOAM/NUq4u3673 dxcg== X-Gm-Message-State: AOAM533xWnHOpOX7ITPACtu3RdG1N4YKT3qGYIjVHZX3lhz96UDaXg9p AJXaOwpdPVTbcW6ljqG1kqthLQ== X-Google-Smtp-Source: ABdhPJwXmXXqDQWjywqOK3RqX7P3sGTi69LvLpf+GQ8ZwGHR1tbwxSOaO3HmlQEa1ICuYH2G5iftzA== X-Received: by 2002:a05:6512:3a93:b0:479:76e7:3861 with SMTP id q19-20020a0565123a9300b0047976e73861mr6014307lfu.446.1654777032538; Thu, 09 Jun 2022 05:17:12 -0700 (PDT) Received: from toster.semihalf.net ([83.142.187.86]) by smtp.gmail.com with ESMTPSA id f6-20020a2eb5a6000000b00253da47cfbesm3706999ljn.80.2022.06.09.05.17.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 05:17:12 -0700 (PDT) From: Stanislaw Kardach To: David Marchand Cc: Stanislaw Kardach , dev@dpdk.org, upstream@semihalf.com Subject: [PATCH 1/3] eal/riscv: fix xmm_t casting for C++ Date: Thu, 9 Jun 2022 14:16:59 +0200 Message-Id: <20220609121701.716299-2-kda@semihalf.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220609121701.716299-1-kda@semihalf.com> References: <20220609121701.716299-1-kda@semihalf.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rte_xmm_t is a union type which wraps around xmm_t and maps its contents to scalar structures. Since C++ has stricter type conversion rules than C, the rte_xmm_t::x has to be used instead of C-casting. Signed-off-by: Stanislaw Kardach Reviewed-by: David Marchand --- lib/eal/riscv/include/rte_vect.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/eal/riscv/include/rte_vect.h b/lib/eal/riscv/include/rte_vect.h index 4600521c20..2f97f437a2 100644 --- a/lib/eal/riscv/include/rte_vect.h +++ b/lib/eal/riscv/include/rte_vect.h @@ -41,8 +41,8 @@ vect_load_128(void *p) static inline xmm_t vect_and(xmm_t data, xmm_t mask) { - rte_xmm_t ret = (rte_xmm_t)data; - rte_xmm_t m = (rte_xmm_t)mask; + rte_xmm_t ret = {.x = data }; + rte_xmm_t m = {.x = mask }; ret.u64[0] &= m.u64[0]; ret.u64[1] &= m.u64[1]; return ret.x;