summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorZi Shen Lim <zlim.lnx@gmail.com>2016-06-09 06:18:49 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-11 08:11:50 +0200
commit997ce888324685a90fb5d0fa26293eb8826c767c (patch)
tree552517342efddafa631627c3695d02a22221e3c4 /arch
parentarm64: bpf: implement bpf_tail_call() helper (diff)
downloadlinux-997ce888324685a90fb5d0fa26293eb8826c767c.tar.xz
linux-997ce888324685a90fb5d0fa26293eb8826c767c.zip
arm64: bpf: optimize JMP_CALL
Remove superfluous stack frame, saving us 3 instructions for every JMP_CALL. Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm64/net/bpf_jit_comp.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index 51abc979d6cb..7ae304e0a078 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -578,11 +578,8 @@ emit_cond_jmp:
const u64 func = (u64)__bpf_call_base + imm;
emit_a64_mov_i64(tmp, func, ctx);
- emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx);
- emit(A64_MOV(1, A64_FP, A64_SP), ctx);
emit(A64_BLR(tmp), ctx);
emit(A64_MOV(1, r0, A64_R(0)), ctx);
- emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx);
break;
}
/* tail call */