Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1415710

[PATCH net-next v2 4/4] arm64: bpf: optimize LD_ABS, LD_IND

From Zi Shen Lim <zlim.lnx@gmail.com>
Newsgroups linux.kernel
Subject [PATCH net-next v2 4/4] arm64: bpf: optimize LD_ABS, LD_IND
Date 2016-06-07 07:30 +0200
Message-ID <rHhKq-6U6-17@gated-at.bofh.it> (permalink)
References <rHhKp-6U6-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Remove superfluous stack frame, saving us 3 instructions for every
LD_ABS or LD_IND.

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
---
 arch/arm64/net/bpf_jit_comp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 7ae304e..b2fc97a 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -731,11 +731,8 @@ emit_cond_jmp:
 		emit_a64_mov_i64(r3, size, ctx);
 		emit(A64_SUB_I(1, r4, fp, STACK_SIZE), ctx);
 		emit_a64_mov_i64(r5, (unsigned long)bpf_load_pointer, ctx);
-		emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx);
-		emit(A64_MOV(1, A64_FP, A64_SP), ctx);
 		emit(A64_BLR(r5), ctx);
 		emit(A64_MOV(1, r0, A64_R(0)), ctx);
-		emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx);
 
 		jmp_offset = epilogue_offset(ctx);
 		check_imm19(jmp_offset);
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next v2 0/4] arm64 BPF JIT updates Zi Shen Lim <zlim.lnx@gmail.com> - 2016-06-07 07:30 +0200
  [PATCH net-next v2 1/4] bpf: fix missing header inclusion Zi Shen Lim <zlim.lnx@gmail.com> - 2016-06-07 07:30 +0200
  [PATCH net-next v2 4/4] arm64: bpf: optimize LD_ABS, LD_IND Zi Shen Lim <zlim.lnx@gmail.com> - 2016-06-07 07:30 +0200
  [PATCH net-next v2 3/4] arm64: bpf: optimize JMP_CALL Zi Shen Lim <zlim.lnx@gmail.com> - 2016-06-07 07:30 +0200
  Re: [PATCH net-next v2 0/4] arm64 BPF JIT updates David Miller <davem@davemloft.net> - 2016-06-08 09:40 +0200

csiph-web