From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1FE81A0519; Thu, 2 Jul 2020 23:28:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DE921D91B; Thu, 2 Jul 2020 23:28:55 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 49EC81D8FF for ; Thu, 2 Jul 2020 23:28:54 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D70195C01B4; Thu, 2 Jul 2020 17:28:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 02 Jul 2020 17:28:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= rd1gO5EX6QtbKe0Q47PCubYVb/BNOR60pj6UERufQuc=; b=m6eI8ZCVPL+wILlu /X/S6c5Nxsq6ZfDlE6T69uqvLnla9xcDnzNHfJsphF5Zuz+btDToZ6EMtMyVNwJ8 6dI8eOQTpgc07L6o4ndGmENY7wc88McEQWFwTfcCoF6fUXnOvNLfO6ztUjfk9/5B unMXg4bzP+YKSUuvWBgjZIcSlcwFgmZIxe94GChXmU5KZQLW5vR1ZDmZ1BnwEs2b GLJwaZeQtBEEGJyAO1VOGNL1JeyqgFIAQuezhRFhm+uzD9vkR7RQV/Syj++k16hX wKpmZx+UxIa40m98qLDFVLSfJeIVI9p1Wiaz6HtjuJ02Mzqaf1D2rHslawQIJkk+ +nfQvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=rd1gO5EX6QtbKe0Q47PCubYVb/BNOR60pj6UERufQ uc=; b=IW6wIaQNI/IO2IQ2S9EoQ51pjW1u+P6P9vQq1yZZDEgw///1Wpxq1PFpj 828bAgkIgf86ua5Zmf0FCvOphAKz+5vr2DXAiU1B+bKL/NMNPUbwI/YvBJGbUxOz Wz+OhZsWiJgMEmAQHT1AC+Ofs+1eDRWPG2BZlYTT6Nwlpe6VdhOQUNVk71yJFf7F /oKqevfYRFA0IYfITDVu2HRPBQAyZPlAxExdb+eqQaGbLUaeitQfFBl04UMlpP/v EEJKvSK82lXEIqQsYIaOLHZl16P6m36Va2ZemwdcU7S38NtC0jL38FLmXN2HGe1C zdNJW+djHSLQ5K5KgmFH6rA5hcJ9g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdeggdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepleeiiedvkeehieeghfekuedthefhtdejveeftdeiudevhfdtieeh udfhgedvleffnecuffhomhgrihhnpehgnhhurdhorhhgnecukfhppeejjedrudefgedrvd dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 149E63060061; Thu, 2 Jul 2020 17:28:52 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, ferruh.yigit@intel.com Date: Thu, 02 Jul 2020 23:28:51 +0200 Message-ID: <2483193.BHUjs1tvcQ@thomas> In-Reply-To: <20200618115644.488930-1-bruce.richardson@intel.com> References: <20200617104012.470617-1-bruce.richardson@intel.com> <20200618115644.488930-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] build: check functionality rather than binutils version 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 18/06/2020 13:56, Bruce Richardson: > Rather than checking the binutils version number, which can lead to > unnecessary disabling of AVX512 if fixes have been backported to distro > versions, we can instead check the output of "as" from binutils to see if > it is correct. > > The check in the script uses the minimal assembly reproduction code posted > to the public bug tracker for gcc/binutils for those issues [1]. If the > binutils bug is present, the instruction parameters - specifically the > displacement parameter - will be different in the disassembled output > compared to the input. Therefore the check involves assembling a single > instruction and disassembling it again, checking that the two match. [...] > --- /dev/null > +++ b/buildtools/binutils-avx512-check.sh > +MESON_BUILD_ROOT=${MESON_BUILD_ROOT:-/tmp} > +OBJFILE=$MESON_BUILD_ROOT/binutils-avx512-check.o > +# from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028 > +GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}' > + > +# assemble vpgather to file and similarly check > +echo "vpgatherqq $GATHER_PARAMS" | $AS --64 -o $OBJFILE - > +objdump -d --no-show-raw-insn $OBJFILE | grep -q $GATHER_PARAMS || { > + echo "vpgatherqq displacement error with as" > + exit 1 > +} For the temporary OBJFILE, please use mktemp and trap for cleanup. If you grep "mktemp" in DPDK, you will see the filename is pretty well standardized with "dpdk." as prefix. Thanks