[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1555106392-20117-17-git-send-email-jiong.wang@netronome.com>
Date: Fri, 12 Apr 2019 22:59:49 +0100
From: Jiong Wang <jiong.wang@...ronome.com>
To: alexei.starovoitov@...il.com, daniel@...earbox.net
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org,
oss-drivers@...ronome.com, Jiong Wang <jiong.wang@...ronome.com>,
"David S . Miller" <davem@...emloft.net>
Subject: [PATCH v3 bpf-next 16/19] sparc: bpf: eliminate zero extension code-gen
Cc: David S. Miller <davem@...emloft.net>
Signed-off-by: Jiong Wang <jiong.wang@...ronome.com>
---
arch/sparc/net/bpf_jit_comp_64.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/arch/sparc/net/bpf_jit_comp_64.c b/arch/sparc/net/bpf_jit_comp_64.c
index 65428e7..e58f84e 100644
--- a/arch/sparc/net/bpf_jit_comp_64.c
+++ b/arch/sparc/net/bpf_jit_comp_64.c
@@ -1144,7 +1144,8 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
break;
do_alu32_trunc:
- if (BPF_CLASS(code) == BPF_ALU)
+ if (BPF_CLASS(code) == BPF_ALU &&
+ ctx->prog->aux->no_verifier_zext)
emit_alu_K(SRL, dst, 0, ctx);
break;
@@ -1432,6 +1433,11 @@ static void jit_fill_hole(void *area, unsigned int size)
*ptr++ = 0x91d02005; /* ta 5 */
}
+bool bpf_jit_hardware_zext(void)
+{
+ return false;
+}
+
struct sparc64_jit_data {
struct bpf_binary_header *header;
u8 *image;
--
2.7.4
Powered by blists - more mailing lists