From: Alexei Starovoitov <ast@fb.com>
To: David Miller <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <daniel@iogearbox.net>
Subject: Re: [PATCH] sparc64: Support cbcond instructions in eBPF JIT.
Date: Mon, 24 Apr 2017 16:09:17 -0700 [thread overview]
Message-ID: <fe249a31-37f9-7c07-7592-15d9af5d4523@fb.com> (raw)
In-Reply-To: <20170424.190228.571734658408906331.davem@davemloft.net>
On 4/24/17 4:02 PM, David Miller wrote:
>
> cbcond combines a compare with a branch into a single instruction.
>
> The limitations are:
>
> 1) Only newer chips support it
>
> 2) For immediate compares we are limited to 5-bit signed immediate
> values
>
> 3) The branch displacement is limited to 10-bit signed
>
> 4) We cannot use it for JSET
llvm doesn't know how to generate it yet. So it's only seen after
classic->extended conversion.
Hence not a concern at all for this optimization.
> Also, cbcond (unlike all other sparc control transfers) lacks a delay
> slot.
>
> Currently we don't have a useful instruction we can push into the
> delay slot of normal branches. So using cbcond pretty much always
> increases code density, and is therefore a win.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
Nice!
Acked-by: Alexei Starovoitov <ast@kernel.org>
That puts up a pressure to optimize x64 JIT too :)
prev parent reply other threads:[~2017-04-24 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-24 23:02 [PATCH] sparc64: Support cbcond instructions in eBPF JIT David Miller
2017-04-24 23:09 ` Alexei Starovoitov [this message]
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=fe249a31-37f9-7c07-7592-15d9af5d4523@fb.com \
--to=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.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