[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4YZyQUjdVbLiM-HUCL_dbvA_oKNhDCXbAKr2L8y0cvSrA@mail.gmail.com>
Date: Sun, 14 Oct 2018 21:15:00 +0200
From: Uros Bizjak <ubizjak@...il.com>
To: bp@...en8.de
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Use assembly instruction mnemonics instead of .byte
streams in arch_hweight.h
On Sun, Oct 14, 2018 at 8:47 PM Borislav Petkov <bp@...en8.de> wrote:
>
> On Sun, Oct 14, 2018 at 08:35:10PM +0200, Uros Bizjak wrote:
> > Recently the minimum required version of binutils was changed to 2.20,
> > which supports popcnt instruction mnemonics. The patch removes
> > all .byte #defines and uses real instruction mnemonics instead.
>
> What is "real insertion mnemonics" ?
The ChangeLog says "real INSTRUCTION mnemonics", e.g. POPCNTQ and POPCNTL.
> To me it looks like this patch replaces our defines with binutils'
> defines and frankly, if it ain't broke, why fix it...
The compiler will generate the register name with the correct implied
width (e.g. %rax for long, %eax for int), so the assembler will be
able to cross check if operands fit the instruction (this issue
happened in KVM, see [1]). And there will be a couple of ugly #defines
less.
[1] https://www.spinics.net/lists/kvm/msg176184.html
Uros.
Powered by blists - more mailing lists