Lines Matching refs:EMIT

36 #define PPC_EX32(r, i)		EMIT(PPC_RAW_LI((r), (i) < 0 ? -1 : 0))
132 EMIT(PPC_RAW_LI(_R4, 0)); in bpf_jit_build_prologue()
134 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue()
139 EMIT(PPC_RAW_STWU(_R1, _R1, -BPF_PPC_STACKFRAME(ctx))); in bpf_jit_build_prologue()
142 EMIT(PPC_RAW_STW(_R4, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_build_prologue()
145 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_1), _R3)); in bpf_jit_build_prologue()
146 EMIT(PPC_RAW_LI(bpf_to_ppc(BPF_REG_1) - 1, 0)); in bpf_jit_build_prologue()
153 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_prologue()
160 EMIT(PPC_RAW_STW(i, _R1, bpf_jit_stack_offsetof(ctx, i))); in bpf_jit_build_prologue()
164 EMIT(PPC_RAW_LI(bpf_to_ppc(BPF_REG_FP) - 1, 0)); in bpf_jit_build_prologue()
165 EMIT(PPC_RAW_ADDI(bpf_to_ppc(BPF_REG_FP), _R1, in bpf_jit_build_prologue()
170 EMIT(PPC_RAW_STW(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF)); in bpf_jit_build_prologue()
180 EMIT(PPC_RAW_LWZ(i, _R1, bpf_jit_stack_offsetof(ctx, i))); in bpf_jit_emit_common_epilogue()
183 EMIT(PPC_RAW_LWZ(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF)); in bpf_jit_emit_common_epilogue()
187 EMIT(PPC_RAW_ADDI(_R1, _R1, BPF_PPC_STACKFRAME(ctx))); in bpf_jit_emit_common_epilogue()
190 EMIT(PPC_RAW_MTLR(_R0)); in bpf_jit_emit_common_epilogue()
196 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_0))); in bpf_jit_build_epilogue()
200 EMIT(PPC_RAW_BLR()); in bpf_jit_build_epilogue()
209 EMIT(PPC_RAW_BL(rel)); in bpf_jit_emit_func_call_rel()
212 EMIT(PPC_RAW_LIS(_R0, IMM_H(func))); in bpf_jit_emit_func_call_rel()
213 EMIT(PPC_RAW_ORI(_R0, _R0, IMM_L(func))); in bpf_jit_emit_func_call_rel()
214 EMIT(PPC_RAW_MTCTR(_R0)); in bpf_jit_emit_func_call_rel()
215 EMIT(PPC_RAW_BCTRL()); in bpf_jit_emit_func_call_rel()
236 EMIT(PPC_RAW_LWZ(_R0, b2p_bpf_array, offsetof(struct bpf_array, map.max_entries))); in bpf_jit_emit_tail_call()
237 EMIT(PPC_RAW_CMPLW(b2p_index, _R0)); in bpf_jit_emit_tail_call()
238 EMIT(PPC_RAW_LWZ(_R0, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_emit_tail_call()
245 EMIT(PPC_RAW_CMPLWI(_R0, MAX_TAIL_CALL_CNT)); in bpf_jit_emit_tail_call()
247 EMIT(PPC_RAW_ADDIC(_R0, _R0, 1)); in bpf_jit_emit_tail_call()
251 EMIT(PPC_RAW_RLWINM(_R3, b2p_index, 2, 0, 29)); in bpf_jit_emit_tail_call()
252 EMIT(PPC_RAW_ADD(_R3, _R3, b2p_bpf_array)); in bpf_jit_emit_tail_call()
253 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
259 EMIT(PPC_RAW_CMPLWI(_R3, 0)); in bpf_jit_emit_tail_call()
263 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_prog, bpf_func))); in bpf_jit_emit_tail_call()
264 EMIT(PPC_RAW_ADDIC(_R3, _R3, BPF_TAILCALL_PROLOGUE_SIZE)); in bpf_jit_emit_tail_call()
265 EMIT(PPC_RAW_MTCTR(_R3)); in bpf_jit_emit_tail_call()
267 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_1))); in bpf_jit_emit_tail_call()
270 EMIT(PPC_RAW_MR(_R4, _R0)); in bpf_jit_emit_tail_call()
275 EMIT(PPC_RAW_BCTR()); in bpf_jit_emit_tail_call()
354 EMIT(PPC_RAW_ADD(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
357 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
358 EMIT(PPC_RAW_ADDE(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
361 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
364 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, src2_reg)); in bpf_jit_build_body()
365 EMIT(PPC_RAW_SUBFE(dst_reg_h, src_reg_h, src2_reg_h)); in bpf_jit_build_body()
372 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
374 EMIT(PPC_RAW_ADDIS(dst_reg, src2_reg, IMM_HA(imm))); in bpf_jit_build_body()
378 EMIT(PPC_RAW_ADDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
385 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
386 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
390 EMIT(PPC_RAW_ADDIC(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
393 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
396 EMIT(PPC_RAW_ADDZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
398 EMIT(PPC_RAW_ADDME(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
402 EMIT(PPC_RAW_MULW(_R0, src2_reg, src_reg_h)); in bpf_jit_build_body()
403 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
404 EMIT(PPC_RAW_MULHWU(tmp_reg, src2_reg, src_reg)); in bpf_jit_build_body()
405 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
406 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
407 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
410 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
414 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
416 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
418 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
420 EMIT(PPC_RAW_MULI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
423 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
431 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
432 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
434 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
435 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
438 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
439 EMIT(PPC_RAW_RLWIMI(dst_reg_h, dst_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
440 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
444 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
446 EMIT(PPC_RAW_SUB(dst_reg_h, dst_reg_h, src2_reg)); in bpf_jit_build_body()
447 EMIT(PPC_RAW_MULHWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
448 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
449 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
454 EMIT(PPC_RAW_DIVW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
456 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
460 EMIT(PPC_RAW_DIVW(_R0, src2_reg, src_reg)); in bpf_jit_build_body()
462 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, src_reg)); in bpf_jit_build_body()
463 EMIT(PPC_RAW_MULW(_R0, src_reg, _R0)); in bpf_jit_build_body()
464 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
474 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
477 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
479 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
483 EMIT(PPC_RAW_DIVW(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
485 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
496 EMIT(PPC_RAW_DIVW(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
498 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
499 EMIT(PPC_RAW_MULW(_R0, tmp_reg, _R0)); in bpf_jit_build_body()
500 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
502 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
504 EMIT(PPC_RAW_SRAWI(_R0, src2_reg, ilog2(imm))); in bpf_jit_build_body()
505 EMIT(PPC_RAW_ADDZE(_R0, _R0)); in bpf_jit_build_body()
506 EMIT(PPC_RAW_SLWI(_R0, _R0, ilog2(imm))); in bpf_jit_build_body()
507 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
510 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - imm, 31)); in bpf_jit_build_body()
521 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
522 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
524 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
525 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, dst_reg_h)); in bpf_jit_build_body()
526 EMIT(PPC_RAW_SUBFC(dst_reg, dst_reg_h, dst_reg)); in bpf_jit_build_body()
527 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
528 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, dst_reg_h)); in bpf_jit_build_body()
529 EMIT(PPC_RAW_SUBFC(dst_reg, dst_reg_h, dst_reg)); in bpf_jit_build_body()
530 EMIT(PPC_RAW_SUBFE(dst_reg_h, dst_reg_h, dst_reg_h)); in bpf_jit_build_body()
532 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
533 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
543 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
544 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
549 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
550 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
553 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
554 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
555 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
559 EMIT(PPC_RAW_NEG(dst_reg, src2_reg)); in bpf_jit_build_body()
562 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
563 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
570 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
571 EMIT(PPC_RAW_AND(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
574 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
578 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
582 EMIT(PPC_RAW_ANDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
584 EMIT(PPC_RAW_ANDIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
586 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, in bpf_jit_build_body()
590 EMIT(PPC_RAW_AND(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
594 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
595 EMIT(PPC_RAW_OR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
598 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
603 EMIT(PPC_RAW_LI(dst_reg_h, -1)); in bpf_jit_build_body()
607 EMIT(PPC_RAW_ORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
611 EMIT(PPC_RAW_ORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
615 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
616 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
618 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
619 EMIT(PPC_RAW_XOR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
624 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
626 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
630 EMIT(PPC_RAW_NOR(dst_reg_h, src2_reg_h, src2_reg_h)); in bpf_jit_build_body()
634 EMIT(PPC_RAW_XORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
638 EMIT(PPC_RAW_XORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
641 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
645 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
646 EMIT(PPC_RAW_SLW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
647 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
648 EMIT(PPC_RAW_SRW(_R0, src2_reg, _R0)); in bpf_jit_build_body()
649 EMIT(PPC_RAW_SLW(tmp_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
650 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
651 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
652 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
656 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
658 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
664 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
666 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
667 EMIT(PPC_RAW_RLWIMI(dst_reg_h, src2_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
668 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
670 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
671 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
673 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
674 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
678 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
682 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
683 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
684 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
685 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
686 EMIT(PPC_RAW_SRW(tmp_reg, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
687 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
688 EMIT(PPC_RAW_SRW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
689 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
693 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
695 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
701 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
702 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
704 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
705 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
706 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, 32 - imm, imm, 31)); in bpf_jit_build_body()
708 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg_h, 64 - imm, imm - 32, 31)); in bpf_jit_build_body()
709 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
711 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
712 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
716 EMIT(PPC_RAW_SRAW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
720 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
721 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
722 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
723 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
724 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
725 EMIT(PPC_RAW_RLWINM(_R0, tmp_reg, 0, 26, 26)); in bpf_jit_build_body()
726 EMIT(PPC_RAW_SRAW(tmp_reg, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
727 EMIT(PPC_RAW_SRAW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
728 EMIT(PPC_RAW_SLW(tmp_reg, tmp_reg, _R0)); in bpf_jit_build_body()
729 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
733 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
735 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
741 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
742 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
744 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
745 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
746 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
748 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, imm - 32)); in bpf_jit_build_body()
749 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
751 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, 31)); in bpf_jit_build_body()
752 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
761 EMIT(PPC_RAW_EXTSB(dst_reg, src_reg)); in bpf_jit_build_body()
762 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
764 EMIT(PPC_RAW_EXTSH(dst_reg, src_reg)); in bpf_jit_build_body()
765 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
767 EMIT(PPC_RAW_SRAWI(dst_reg_h, src_reg, 31)); in bpf_jit_build_body()
769 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
770 EMIT(PPC_RAW_SRAWI(dst_reg_h, src_reg, 31)); in bpf_jit_build_body()
772 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
773 EMIT(PPC_RAW_MR(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
779 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
781 EMIT(PPC_RAW_EXTSB(dst_reg, src_reg)); in bpf_jit_build_body()
783 EMIT(PPC_RAW_EXTSH(dst_reg, src_reg)); in bpf_jit_build_body()
785 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
803 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg, 16, 0, 15)); in bpf_jit_build_body()
805 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 24, 16, 31)); in bpf_jit_build_body()
813 EMIT(PPC_RAW_RLWINM(_R0, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
815 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
817 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
818 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
822 EMIT(PPC_RAW_RLWINM(tmp_reg, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
823 EMIT(PPC_RAW_RLWINM(_R0, src2_reg_h, 8, 0, 31)); in bpf_jit_build_body()
825 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
826 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 0, 7)); in bpf_jit_build_body()
828 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
829 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 16, 23)); in bpf_jit_build_body()
830 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
831 EMIT(PPC_RAW_MR(dst_reg_h, tmp_reg)); in bpf_jit_build_body()
835 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
841 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 16, 31)); in bpf_jit_build_body()
860 EMIT(PPC_RAW_STB(src_reg, dst_reg, off)); in bpf_jit_build_body()
864 EMIT(PPC_RAW_STB(_R0, dst_reg, off)); in bpf_jit_build_body()
867 EMIT(PPC_RAW_STH(src_reg, dst_reg, off)); in bpf_jit_build_body()
871 EMIT(PPC_RAW_STH(_R0, dst_reg, off)); in bpf_jit_build_body()
874 EMIT(PPC_RAW_STW(src_reg, dst_reg, off)); in bpf_jit_build_body()
878 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
881 EMIT(PPC_RAW_STW(src_reg_h, dst_reg, off)); in bpf_jit_build_body()
882 EMIT(PPC_RAW_STW(src_reg, dst_reg, off + 4)); in bpf_jit_build_body()
886 EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4)); in bpf_jit_build_body()
888 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
902 EMIT(PPC_RAW_LI(tmp_reg, off)); in bpf_jit_build_body()
911 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
914 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0)); in bpf_jit_build_body()
918 EMIT(PPC_RAW_MR(ax_reg, _R0)); in bpf_jit_build_body()
923 EMIT(PPC_RAW_ADD(_R0, _R0, src_reg)); in bpf_jit_build_body()
927 EMIT(PPC_RAW_AND(_R0, _R0, src_reg)); in bpf_jit_build_body()
931 EMIT(PPC_RAW_OR(_R0, _R0, src_reg)); in bpf_jit_build_body()
935 EMIT(PPC_RAW_XOR(_R0, _R0, src_reg)); in bpf_jit_build_body()
945 EMIT(PPC_RAW_CMPW(bpf_to_ppc(BPF_REG_0), _R0)); in bpf_jit_build_body()
959 EMIT(PPC_RAW_STWCX(save_reg, tmp_reg, dst_reg)); in bpf_jit_build_body()
967 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
968 EMIT(PPC_RAW_MR(ret_reg, ax_reg)); in bpf_jit_build_body()
970 EMIT(PPC_RAW_LI(ret_reg - 1, 0)); /* higher 32-bit */ in bpf_jit_build_body()
1002 EMIT(PPC_RAW_CMPLW(src_reg, _R0)); in bpf_jit_build_body()
1004 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
1014 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
1016 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1032 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1033 EMIT(PPC_RAW_EXTSB(dst_reg, dst_reg)); in bpf_jit_build_body()
1036 EMIT(PPC_RAW_LHA(dst_reg, src_reg, off)); in bpf_jit_build_body()
1039 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1043 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
1048 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1051 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1054 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1057 EMIT(PPC_RAW_LWZ(dst_reg_h, src_reg, off)); in bpf_jit_build_body()
1058 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4)); in bpf_jit_build_body()
1062 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
1103 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1137 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5) - 1, _R1, 8)); in bpf_jit_build_body()
1138 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5), _R1, 12)); in bpf_jit_build_body()
1145 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0) - 1, _R3)); in bpf_jit_build_body()
1146 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0), _R4)); in bpf_jit_build_body()
1227 EMIT(PPC_RAW_CMPLW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1229 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1238 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1245 EMIT(PPC_RAW_CMPW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1247 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1254 EMIT(PPC_RAW_CMPW(dst_reg, src_reg)); in bpf_jit_build_body()
1257 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1259 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1262 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1275 EMIT(PPC_RAW_CMPLWI(dst_reg_h, 0)); in bpf_jit_build_body()
1277 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1281 EMIT(PPC_RAW_CMPLW(dst_reg_h, _R0)); in bpf_jit_build_body()
1284 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1294 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1297 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1306 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1308 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1311 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1314 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1326 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1330 EMIT(PPC_RAW_CMPW(dst_reg, _R0)); in bpf_jit_build_body()
1337 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1341 EMIT(PPC_RAW_CMPWI(dst_reg_h, 0)); in bpf_jit_build_body()
1344 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1351 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1354 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1382 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()