From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] lpm: fix build error on g++ with -O0 option Date: Mon, 05 Jun 2017 15:12:20 +0200 Message-ID: <2340758.4seTUyqQv4@xps> References: <1496380066-28535-1-git-send-email-sangjin@eecs.berkeley.edu> <20170602093021.GB51388@bricha3-MOBL3.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson To: Sangjin Han Return-path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id BA7BD7CC9 for ; Mon, 5 Jun 2017 15:12:21 +0200 (CEST) In-Reply-To: <20170602093021.GB51388@bricha3-MOBL3.ger.corp.intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 02/06/2017 11:30, Bruce Richardson: > On Fri, Jun 02, 2017 at 05:07:46AM +0000, Sangjin Han wrote: > > When rte_lpm.h is used on x86, -O0 option (no optimization at all) > > given to gcc causes a compile error like this: > > > > error: the last argument must be an 8-bit immediate > > i24 = _mm_srli_si128(i24, sizeof(uint64_t)); > > > > -O0 option is useful for debugging and code coverage measurement, but > > this error prevents DPDK programs from building. This patch replaces > > "sizeof(uint64_t)" with a constant literal "8" to work around the issue. > > The issue occurs on gcc/g++ versions from 4.8 to 5. > > > > Signed-off-by: Sangjin Han > Acked-by: Bruce Richardson Applied (with indent fix), thanks