From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751414AbcFDWBj (ORCPT ); Sat, 4 Jun 2016 18:01:39 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36663 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbcFDWB2 (ORCPT ); Sat, 4 Jun 2016 18:01:28 -0400 From: Zi Shen Lim To: "David S. Miller" , Catalin Marinas , Will Deacon Cc: Zi Shen Lim , Yang Shi , Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/3] arm64: bpf: optimize LD_ABS, LD_IND Date: Sat, 4 Jun 2016 15:00:30 -0700 Message-Id: <1465077630-633-3-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465077630-633-1-git-send-email-zlim.lnx@gmail.com> References: <1465077630-633-1-git-send-email-zlim.lnx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove superfluous stack frame, saving us 3 instructions for every LD_ABS or LD_IND. Signed-off-by: Zi Shen Lim --- 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