Skip to content

Commit 643c332

Browse files
zlimdavem330
authored andcommitted
arm64: bpf: optimize LD_ABS, LD_IND
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 997ce88 commit 643c332

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

arch/arm64/net/bpf_jit_comp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,8 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx)
731731
emit_a64_mov_i64(r3, size, ctx);
732732
emit(A64_SUB_I(1, r4, fp, STACK_SIZE), ctx);
733733
emit_a64_mov_i64(r5, (unsigned long)bpf_load_pointer, ctx);
734-
emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx);
735-
emit(A64_MOV(1, A64_FP, A64_SP), ctx);
736734
emit(A64_BLR(r5), ctx);
737735
emit(A64_MOV(1, r0, A64_R(0)), ctx);
738-
emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx);
739736

740737
jmp_offset = epilogue_offset(ctx);
741738
check_imm19(jmp_offset);

0 commit comments

Comments
 (0)