linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	netdev@vger.kernel.org
Cc: Matt Evans <matt@ozlabs.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@fb.com>,
	Denis Kirjanov <kda@linux-powerpc.org>,
	Thadeu Lima de Souza Cascardo <cascardo@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	"David S. Miller" <davem@davemloft.net>,
	Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Subject: Re: [PATCHv2, 2/7] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation
Date: Tue, 28 Jun 2016 22:10:12 +1000 (AEST)	[thread overview]
Message-ID: <3rf4Pc1S8mz9sXy@ozlabs.org> (raw)
In-Reply-To: <d584015e9fb33ed526d693c5ab3c228d385f3c74.1466612260.git.naveen.n.rao@linux.vnet.ibm.com>

On Wed, 2016-22-06 at 16:25:02 UTC, "Naveen N. Rao" wrote:
> The existing LI32() macro can sometimes result in a sign-extended 32-bit
> load that does not clear the top 32-bits properly. As an example,
> loading 0x7fffffff results in the register containing
> 0xffffffff7fffffff. While this does not impact classic BPF JIT
> implementation (since that only uses the lower word for all operations),
> we would like to share this macro between classic BPF JIT and extended
> BPF JIT, wherein the entire 64-bit value in the register matters. Fix
> this by first doing a shifted LI followed by ORI.
> 
> An additional optimization is with loading values between -32768 to -1,
> where we now only need a single LI.
> 
> The new implementation now generates the same or less number of
> instructions.
> 
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/aaf2f7e09932a08c1287d8e4c6

cheers

  reply	other threads:[~2016-06-28 12:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 16:25 [PATCHv2 0/7] eBPF JIT for PPC64 Naveen N. Rao
2016-06-22 16:25 ` [PATCHv2 1/7] ppc bpf/jit: Disable classic BPF JIT on ppc64le Naveen N. Rao
2016-06-22 16:50   ` Thadeu Lima de Souza Cascardo
2016-06-23  9:26   ` [PATCHv2,1/7] " Michael Ellerman
2016-06-22 16:25 ` [PATCHv2 2/7] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation Naveen N. Rao
2016-06-28 12:10   ` Michael Ellerman [this message]
2016-06-22 16:25 ` [PATCHv2 3/7] ppc: bpf/jit: Optimize 64-bit Immediate loads Naveen N. Rao
2016-06-22 16:25 ` [PATCHv2 4/7] ppc: bpf/jit: Introduce rotate immediate instructions Naveen N. Rao
2016-06-22 16:25 ` [PATCHv2 5/7] ppc: bpf/jit: A few cleanups Naveen N. Rao
2016-06-22 16:25 ` [PATCHv2 6/7] ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate header Naveen N. Rao
2016-06-22 16:25 ` [PATCHv2 7/7] ppc: ebpf/jit: Implement JIT compiler for extended BPF Naveen N. Rao
2016-06-30  9:06 ` [PATCHv2 0/7] eBPF JIT for PPC64 Andreas Ziegler
2016-06-30  9:34   ` Denis Kirjanov
2016-06-30 10:32     ` Naveen N. Rao

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=3rf4Pc1S8mz9sXy@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=ananth@in.ibm.com \
    --cc=ast@fb.com \
    --cc=cascardo@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kda@linux-powerpc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=matt@ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    /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).