From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5D7687D08 for ; Fri, 2 Jun 2017 11:30:26 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 02 Jun 2017 02:30:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,284,1493708400"; d="scan'208";a="975947465" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.42]) by orsmga003.jf.intel.com with SMTP; 02 Jun 2017 02:30:22 -0700 Received: by (sSMTP sendmail emulation); Fri, 02 Jun 2017 10:30:21 +0100 Date: Fri, 2 Jun 2017 10:30:21 +0100 From: Bruce Richardson To: Sangjin Han Cc: dev@dpdk.org Message-ID: <20170602093021.GB51388@bricha3-MOBL3.ger.corp.intel.com> References: <1496380066-28535-1-git-send-email-sangjin@eecs.berkeley.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496380066-28535-1-git-send-email-sangjin@eecs.berkeley.edu> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [PATCH v2] lpm: fix build error on g++ with -O0 option X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 09:30:26 -0000 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