Lines Matching full:emit
131 EMIT(PPC_RAW_LD(_R2, _R13, offsetof(struct paca_struct, kernel_toc))); in bpf_jit_build_prologue()
140 EMIT(PPC_RAW_LI(bpf_to_ppc(TMP_REG_1), 0)); in bpf_jit_build_prologue()
142 EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, -(BPF_PPC_STACK_SAVE + 8))); in bpf_jit_build_prologue()
144 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue()
145 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue()
154 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_prologue()
155 EMIT(PPC_RAW_STD(_R0, _R1, PPC_LR_STKOFF)); in bpf_jit_build_prologue()
158 EMIT(PPC_RAW_STDU(_R1, _R1, -(BPF_PPC_STACKFRAME + ctx->stack_size))); in bpf_jit_build_prologue()
168 EMIT(PPC_RAW_STD(bpf_to_ppc(i), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(i)))); in bpf_jit_build_prologue()
172 EMIT(PPC_RAW_ADDI(bpf_to_ppc(BPF_REG_FP), _R1, in bpf_jit_build_prologue()
183 EMIT(PPC_RAW_LD(bpf_to_ppc(i), _R1, bpf_jit_stack_offsetof(ctx, bpf_to_ppc(i)))); in bpf_jit_emit_common_epilogue()
187 EMIT(PPC_RAW_ADDI(_R1, _R1, BPF_PPC_STACKFRAME + ctx->stack_size)); in bpf_jit_emit_common_epilogue()
189 EMIT(PPC_RAW_LD(_R0, _R1, PPC_LR_STKOFF)); in bpf_jit_emit_common_epilogue()
190 EMIT(PPC_RAW_MTLR(_R0)); in bpf_jit_emit_common_epilogue()
200 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_0))); in bpf_jit_build_epilogue()
202 EMIT(PPC_RAW_BLR()); in bpf_jit_build_epilogue()
222 EMIT(PPC_PREFIX_MLS | __PPC_PRFX_R(1) | IMM_H18(reladdr)); in bpf_jit_emit_func_call_hlp()
223 EMIT(PPC_INST_PADDI | ___PPC_RT(_R12) | IMM_L(reladdr)); in bpf_jit_emit_func_call_hlp()
224 EMIT(PPC_RAW_MTCTR(_R12)); in bpf_jit_emit_func_call_hlp()
225 EMIT(PPC_RAW_BCTR()); in bpf_jit_emit_func_call_hlp()
234 EMIT(PPC_RAW_ADDIS(_R12, _R2, PPC_HA(reladdr))); in bpf_jit_emit_func_call_hlp()
235 EMIT(PPC_RAW_ADDI(_R12, _R12, PPC_LO(reladdr))); in bpf_jit_emit_func_call_hlp()
236 EMIT(PPC_RAW_MTCTR(_R12)); in bpf_jit_emit_func_call_hlp()
237 EMIT(PPC_RAW_BCTRL()); in bpf_jit_emit_func_call_hlp()
264 * that PPC_LI64() can emit. in bpf_jit_emit_func_call_rel()
268 EMIT(PPC_RAW_NOP()); in bpf_jit_emit_func_call_rel()
270 EMIT(PPC_RAW_MTCTR(_R12)); in bpf_jit_emit_func_call_rel()
271 EMIT(PPC_RAW_BCTRL()); in bpf_jit_emit_func_call_rel()
295 …EMIT(PPC_RAW_LWZ(bpf_to_ppc(TMP_REG_1), b2p_bpf_array, offsetof(struct bpf_array, map.max_entries)… in bpf_jit_emit_tail_call()
296 EMIT(PPC_RAW_RLWINM(b2p_index, b2p_index, 0, 0, 31)); in bpf_jit_emit_tail_call()
297 EMIT(PPC_RAW_CMPLW(b2p_index, bpf_to_ppc(TMP_REG_1))); in bpf_jit_emit_tail_call()
304 EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), _R1, bpf_jit_stack_tailcallcnt(ctx))); in bpf_jit_emit_tail_call()
305 EMIT(PPC_RAW_CMPLWI(bpf_to_ppc(TMP_REG_1), MAX_TAIL_CALL_CNT)); in bpf_jit_emit_tail_call()
311 EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), 1)); in bpf_jit_emit_tail_call()
312 EMIT(PPC_RAW_STD(bpf_to_ppc(TMP_REG_1), _R1, bpf_jit_stack_tailcallcnt(ctx))); in bpf_jit_emit_tail_call()
315 EMIT(PPC_RAW_MULI(bpf_to_ppc(TMP_REG_1), b2p_index, 8)); in bpf_jit_emit_tail_call()
316 EMIT(PPC_RAW_ADD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), b2p_bpf_array)); in bpf_jit_emit_tail_call()
317 EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
323 EMIT(PPC_RAW_CMPLDI(bpf_to_ppc(TMP_REG_1), 0)); in bpf_jit_emit_tail_call()
327 …EMIT(PPC_RAW_LD(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), offsetof(struct bpf_prog, bpf_func))… in bpf_jit_emit_tail_call()
328 EMIT(PPC_RAW_ADDI(bpf_to_ppc(TMP_REG_1), bpf_to_ppc(TMP_REG_1), in bpf_jit_emit_tail_call()
330 EMIT(PPC_RAW_MTCTR(bpf_to_ppc(TMP_REG_1))); in bpf_jit_emit_tail_call()
335 EMIT(PPC_RAW_BCTR()); in bpf_jit_emit_tail_call()
420 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
424 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
431 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
434 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
442 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(-imm))); in bpf_jit_build_body()
445 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
451 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
453 EMIT(PPC_RAW_MULD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
458 EMIT(PPC_RAW_MULI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
462 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
464 EMIT(PPC_RAW_MULD(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
470 EMIT(PPC_RAW_DIVWU(tmp1_reg, dst_reg, src_reg)); in bpf_jit_build_body()
471 EMIT(PPC_RAW_MULW(tmp1_reg, src_reg, tmp1_reg)); in bpf_jit_build_body()
472 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
474 EMIT(PPC_RAW_DIVWU(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
479 EMIT(PPC_RAW_DIVDU(tmp1_reg, dst_reg, src_reg)); in bpf_jit_build_body()
480 EMIT(PPC_RAW_MULD(tmp1_reg, src_reg, tmp1_reg)); in bpf_jit_build_body()
481 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
483 EMIT(PPC_RAW_DIVDU(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
495 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
504 EMIT(PPC_RAW_DIVWU(tmp2_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
505 EMIT(PPC_RAW_MULW(tmp1_reg, tmp1_reg, tmp2_reg)); in bpf_jit_build_body()
506 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
508 EMIT(PPC_RAW_DIVWU(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
512 EMIT(PPC_RAW_DIVDU(tmp2_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
513 EMIT(PPC_RAW_MULD(tmp1_reg, tmp1_reg, tmp2_reg)); in bpf_jit_build_body()
514 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
516 EMIT(PPC_RAW_DIVDU(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
522 EMIT(PPC_RAW_NEG(dst_reg, dst_reg)); in bpf_jit_build_body()
530 EMIT(PPC_RAW_AND(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
535 EMIT(PPC_RAW_ANDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
539 EMIT(PPC_RAW_AND(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
544 EMIT(PPC_RAW_OR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
551 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
554 EMIT(PPC_RAW_ORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
556 EMIT(PPC_RAW_ORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
561 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
568 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
571 EMIT(PPC_RAW_XORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
573 EMIT(PPC_RAW_XORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
578 EMIT(PPC_RAW_SLW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
584 EMIT(PPC_RAW_SLD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
588 EMIT(PPC_RAW_SLWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
594 EMIT(PPC_RAW_SLDI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
597 EMIT(PPC_RAW_SRW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
602 EMIT(PPC_RAW_SRD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
605 EMIT(PPC_RAW_SRWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
611 EMIT(PPC_RAW_SRDI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
614 EMIT(PPC_RAW_SRAW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
617 EMIT(PPC_RAW_SRAD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
620 EMIT(PPC_RAW_SRAWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
624 EMIT(PPC_RAW_SRADI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
634 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 0, 31)); in bpf_jit_build_body()
637 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
651 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 0, 31)); in bpf_jit_build_body()
669 EMIT(PPC_RAW_RLWINM(tmp1_reg, dst_reg, 8, 16, 23)); in bpf_jit_build_body()
671 EMIT(PPC_RAW_RLWIMI(tmp1_reg, dst_reg, 24, 24, 31)); in bpf_jit_build_body()
673 EMIT(PPC_RAW_MR(dst_reg, tmp1_reg)); in bpf_jit_build_body()
681 EMIT(PPC_RAW_RLWINM(tmp1_reg, dst_reg, 8, 0, 31)); in bpf_jit_build_body()
683 EMIT(PPC_RAW_RLWIMI(tmp1_reg, dst_reg, 24, 0, 7)); in bpf_jit_build_body()
685 EMIT(PPC_RAW_RLWIMI(tmp1_reg, dst_reg, 24, 16, 23)); in bpf_jit_build_body()
686 EMIT(PPC_RAW_MR(dst_reg, tmp1_reg)); in bpf_jit_build_body()
690 EMIT(PPC_RAW_STD(dst_reg, _R1, bpf_jit_stack_local(ctx))); in bpf_jit_build_body()
691 EMIT(PPC_RAW_ADDI(tmp1_reg, _R1, bpf_jit_stack_local(ctx))); in bpf_jit_build_body()
693 EMIT(PPC_RAW_LDBRX(dst_reg, 0, tmp1_reg)); in bpf_jit_build_body()
695 EMIT(PPC_RAW_LWBRX(dst_reg, 0, tmp1_reg)); in bpf_jit_build_body()
697 EMIT(PPC_RAW_SLDI(dst_reg, dst_reg, 32)); in bpf_jit_build_body()
698 EMIT(PPC_RAW_LI(tmp2_reg, 4)); in bpf_jit_build_body()
699 EMIT(PPC_RAW_LWBRX(tmp2_reg, tmp2_reg, tmp1_reg)); in bpf_jit_build_body()
701 EMIT(PPC_RAW_SLDI(tmp2_reg, tmp2_reg, 32)); in bpf_jit_build_body()
702 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp2_reg)); in bpf_jit_build_body()
712 EMIT(PPC_RAW_RLDICL(dst_reg, dst_reg, 0, 48)); in bpf_jit_build_body()
719 EMIT(PPC_RAW_RLDICL(dst_reg, dst_reg, 0, 32)); in bpf_jit_build_body()
737 EMIT(PPC_RAW_EIEIO() | 0x02000000); in bpf_jit_build_body()
740 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
741 EMIT(PPC_RAW_LD(tmp1_reg, _R13, 0)); in bpf_jit_build_body()
742 EMIT(PPC_RAW_ORI(_R31, _R31, 0)); in bpf_jit_build_body()
747 EMIT(PPC_RAW_MTCTR(_R12)); in bpf_jit_build_body()
748 EMIT(PPC_RAW_BCTRL()); in bpf_jit_build_body()
761 EMIT(PPC_RAW_LI(tmp1_reg, imm)); in bpf_jit_build_body()
764 EMIT(PPC_RAW_STB(src_reg, dst_reg, off)); in bpf_jit_build_body()
769 EMIT(PPC_RAW_LI(tmp1_reg, imm)); in bpf_jit_build_body()
772 EMIT(PPC_RAW_STH(src_reg, dst_reg, off)); in bpf_jit_build_body()
780 EMIT(PPC_RAW_STW(src_reg, dst_reg, off)); in bpf_jit_build_body()
789 EMIT(PPC_RAW_LI(tmp2_reg, off)); in bpf_jit_build_body()
790 EMIT(PPC_RAW_STDX(src_reg, dst_reg, tmp2_reg)); in bpf_jit_build_body()
792 EMIT(PPC_RAW_STD(src_reg, dst_reg, off)); in bpf_jit_build_body()
805 EMIT(PPC_RAW_LI(tmp1_reg, off)); in bpf_jit_build_body()
814 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
818 EMIT(PPC_RAW_LDARX(tmp2_reg, tmp1_reg, dst_reg, 0)); in bpf_jit_build_body()
820 EMIT(PPC_RAW_LWARX(tmp2_reg, tmp1_reg, dst_reg, 0)); in bpf_jit_build_body()
824 EMIT(PPC_RAW_MR(_R0, tmp2_reg)); in bpf_jit_build_body()
829 EMIT(PPC_RAW_ADD(tmp2_reg, tmp2_reg, src_reg)); in bpf_jit_build_body()
833 EMIT(PPC_RAW_AND(tmp2_reg, tmp2_reg, src_reg)); in bpf_jit_build_body()
837 EMIT(PPC_RAW_OR(tmp2_reg, tmp2_reg, src_reg)); in bpf_jit_build_body()
841 EMIT(PPC_RAW_XOR(tmp2_reg, tmp2_reg, src_reg)); in bpf_jit_build_body()
852 EMIT(PPC_RAW_CMPD(bpf_to_ppc(BPF_REG_0), tmp2_reg)); in bpf_jit_build_body()
854 EMIT(PPC_RAW_CMPW(bpf_to_ppc(BPF_REG_0), tmp2_reg)); in bpf_jit_build_body()
870 EMIT(PPC_RAW_STDCX(save_reg, tmp1_reg, dst_reg)); in bpf_jit_build_body()
872 EMIT(PPC_RAW_STWCX(save_reg, tmp1_reg, dst_reg)); in bpf_jit_build_body()
877 /* Emit 'sync' to enforce full ordering */ in bpf_jit_build_body()
879 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
880 EMIT(PPC_RAW_MR(ret_reg, _R0)); in bpf_jit_build_body()
913 EMIT(PPC_RAW_ADDI(tmp1_reg, src_reg, off)); in bpf_jit_build_body()
918 EMIT(PPC_RAW_CMPLD(tmp1_reg, tmp2_reg)); in bpf_jit_build_body()
920 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
933 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
936 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
939 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
943 EMIT(PPC_RAW_LI(tmp1_reg, off)); in bpf_jit_build_body()
944 EMIT(PPC_RAW_LDX(dst_reg, src_reg, tmp1_reg)); in bpf_jit_build_body()
946 EMIT(PPC_RAW_LD(dst_reg, src_reg, off)); in bpf_jit_build_body()
974 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1016 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0), _R3)); in bpf_jit_build_body()
1101 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1103 EMIT(PPC_RAW_CMPLD(dst_reg, src_reg)); in bpf_jit_build_body()
1115 EMIT(PPC_RAW_CMPW(dst_reg, src_reg)); in bpf_jit_build_body()
1117 EMIT(PPC_RAW_CMPD(dst_reg, src_reg)); in bpf_jit_build_body()
1122 EMIT(PPC_RAW_AND_DOT(tmp1_reg, dst_reg, src_reg)); in bpf_jit_build_body()
1124 EMIT(PPC_RAW_AND(tmp1_reg, dst_reg, src_reg)); in bpf_jit_build_body()
1125 EMIT(PPC_RAW_RLWINM_DOT(tmp1_reg, tmp1_reg, 0, 0, 31)); in bpf_jit_build_body()
1149 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1151 EMIT(PPC_RAW_CMPLDI(dst_reg, imm)); in bpf_jit_build_body()
1157 EMIT(PPC_RAW_CMPLW(dst_reg, tmp1_reg)); in bpf_jit_build_body()
1159 EMIT(PPC_RAW_CMPLD(dst_reg, tmp1_reg)); in bpf_jit_build_body()
1180 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1182 EMIT(PPC_RAW_CMPDI(dst_reg, imm)); in bpf_jit_build_body()
1186 EMIT(PPC_RAW_CMPW(dst_reg, tmp1_reg)); in bpf_jit_build_body()
1188 EMIT(PPC_RAW_CMPD(dst_reg, tmp1_reg)); in bpf_jit_build_body()
1197 EMIT(PPC_RAW_ANDI(tmp1_reg, dst_reg, imm)); in bpf_jit_build_body()
1201 EMIT(PPC_RAW_AND_DOT(tmp1_reg, dst_reg, in bpf_jit_build_body()
1204 EMIT(PPC_RAW_AND(tmp1_reg, dst_reg, tmp1_reg)); in bpf_jit_build_body()
1205 EMIT(PPC_RAW_RLWINM_DOT(tmp1_reg, tmp1_reg, in bpf_jit_build_body()