From: Bruce Richardson <bruce.richardson@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, ferruh.yigit@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] build: check functionality rather than binutils version
Date: Fri, 3 Jul 2020 11:35:26 +0100 [thread overview]
Message-ID: <20200703103526.GC620@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <2483193.BHUjs1tvcQ@thomas>
On Thu, Jul 02, 2020 at 11:28:51PM +0200, Thomas Monjalon wrote:
> 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
>
Will change for v3
next prev parent reply other threads:[~2020-07-03 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-17 10:40 [dpdk-dev] [PATCH] " Bruce Richardson
2020-06-17 11:45 ` Thomas Monjalon
2020-06-17 14:32 ` Bruce Richardson
2020-06-18 11:56 ` [dpdk-dev] [PATCH v2] " Bruce Richardson
2020-06-18 12:05 ` Van Haaren, Harry
2020-07-02 21:28 ` Thomas Monjalon
2020-07-03 10:35 ` Bruce Richardson [this message]
2020-07-04 11:48 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2020-07-05 14:52 ` Thomas Monjalon
2020-07-02 17:56 [dpdk-dev] [PATCH v2] " Van Haaren, Harry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200703103526.GC620@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).