Lines Matching full:emit
36 #define PPC_EX32(r, i) EMIT(PPC_RAW_LI((r), (i) < 0 ? -1 : 0))
131 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue()
135 EMIT(PPC_RAW_LI(_R4, 0)); in bpf_jit_build_prologue()
137 EMIT(PPC_RAW_NOP()); in bpf_jit_build_prologue()
142 EMIT(PPC_RAW_STWU(_R1, _R1, -BPF_PPC_STACKFRAME(ctx))); in bpf_jit_build_prologue()
145 EMIT(PPC_RAW_STW(_R4, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_build_prologue()
148 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_1), _R3)); in bpf_jit_build_prologue()
149 EMIT(PPC_RAW_LI(bpf_to_ppc(BPF_REG_1) - 1, 0)); in bpf_jit_build_prologue()
156 EMIT(PPC_RAW_MFLR(_R0)); in bpf_jit_build_prologue()
163 EMIT(PPC_RAW_STW(i, _R1, bpf_jit_stack_offsetof(ctx, i))); in bpf_jit_build_prologue()
167 EMIT(PPC_RAW_LI(bpf_to_ppc(BPF_REG_FP) - 1, 0)); in bpf_jit_build_prologue()
168 EMIT(PPC_RAW_ADDI(bpf_to_ppc(BPF_REG_FP), _R1, in bpf_jit_build_prologue()
173 EMIT(PPC_RAW_STW(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF)); in bpf_jit_build_prologue()
183 EMIT(PPC_RAW_LWZ(i, _R1, bpf_jit_stack_offsetof(ctx, i))); in bpf_jit_emit_common_epilogue()
186 EMIT(PPC_RAW_LWZ(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF)); in bpf_jit_emit_common_epilogue()
190 EMIT(PPC_RAW_ADDI(_R1, _R1, BPF_PPC_STACKFRAME(ctx))); in bpf_jit_emit_common_epilogue()
193 EMIT(PPC_RAW_MTLR(_R0)); in bpf_jit_emit_common_epilogue()
199 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_0))); in bpf_jit_build_epilogue()
203 EMIT(PPC_RAW_BLR()); in bpf_jit_build_epilogue()
214 EMIT(PPC_RAW_BL(rel)); in bpf_jit_emit_func_call_rel()
217 EMIT(PPC_RAW_LIS(_R0, IMM_H(func))); in bpf_jit_emit_func_call_rel()
218 EMIT(PPC_RAW_ORI(_R0, _R0, IMM_L(func))); in bpf_jit_emit_func_call_rel()
219 EMIT(PPC_RAW_MTCTR(_R0)); in bpf_jit_emit_func_call_rel()
220 EMIT(PPC_RAW_BCTRL()); in bpf_jit_emit_func_call_rel()
241 EMIT(PPC_RAW_LWZ(_R0, b2p_bpf_array, offsetof(struct bpf_array, map.max_entries))); in bpf_jit_emit_tail_call()
242 EMIT(PPC_RAW_CMPLW(b2p_index, _R0)); in bpf_jit_emit_tail_call()
243 EMIT(PPC_RAW_LWZ(_R0, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_emit_tail_call()
250 EMIT(PPC_RAW_CMPLWI(_R0, MAX_TAIL_CALL_CNT)); in bpf_jit_emit_tail_call()
252 EMIT(PPC_RAW_ADDIC(_R0, _R0, 1)); in bpf_jit_emit_tail_call()
256 EMIT(PPC_RAW_RLWINM(_R3, b2p_index, 2, 0, 29)); in bpf_jit_emit_tail_call()
257 EMIT(PPC_RAW_ADD(_R3, _R3, b2p_bpf_array)); in bpf_jit_emit_tail_call()
258 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
264 EMIT(PPC_RAW_CMPLWI(_R3, 0)); in bpf_jit_emit_tail_call()
268 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_prog, bpf_func))); in bpf_jit_emit_tail_call()
269 EMIT(PPC_RAW_ADDIC(_R3, _R3, BPF_TAILCALL_PROLOGUE_SIZE)); in bpf_jit_emit_tail_call()
270 EMIT(PPC_RAW_MTCTR(_R3)); in bpf_jit_emit_tail_call()
272 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_1))); in bpf_jit_emit_tail_call()
275 EMIT(PPC_RAW_MR(_R4, _R0)); in bpf_jit_emit_tail_call()
280 EMIT(PPC_RAW_BCTR()); in bpf_jit_emit_tail_call()
359 EMIT(PPC_RAW_ADD(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
362 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
363 EMIT(PPC_RAW_ADDE(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
366 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
369 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, src2_reg)); in bpf_jit_build_body()
370 EMIT(PPC_RAW_SUBFE(dst_reg_h, src_reg_h, src2_reg_h)); in bpf_jit_build_body()
377 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
379 EMIT(PPC_RAW_ADDIS(dst_reg, src2_reg, IMM_HA(imm))); in bpf_jit_build_body()
383 EMIT(PPC_RAW_ADDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
390 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
391 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
395 EMIT(PPC_RAW_ADDIC(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
398 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
401 EMIT(PPC_RAW_ADDZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
403 EMIT(PPC_RAW_ADDME(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
407 EMIT(PPC_RAW_MULW(_R0, src2_reg, src_reg_h)); in bpf_jit_build_body()
408 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
409 EMIT(PPC_RAW_MULHWU(tmp_reg, src2_reg, src_reg)); in bpf_jit_build_body()
410 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
411 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
412 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
415 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
419 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
421 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
423 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
425 EMIT(PPC_RAW_MULI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
428 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
436 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
437 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
439 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
440 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
443 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
444 EMIT(PPC_RAW_RLWIMI(dst_reg_h, dst_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
445 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
449 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
451 EMIT(PPC_RAW_SUB(dst_reg_h, dst_reg_h, src2_reg)); in bpf_jit_build_body()
452 EMIT(PPC_RAW_MULHWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
453 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
454 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
459 EMIT(PPC_RAW_DIVW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
461 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
465 EMIT(PPC_RAW_DIVW(_R0, src2_reg, src_reg)); in bpf_jit_build_body()
467 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, src_reg)); in bpf_jit_build_body()
468 EMIT(PPC_RAW_MULW(_R0, src_reg, _R0)); in bpf_jit_build_body()
469 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
479 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
482 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
484 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
488 EMIT(PPC_RAW_DIVW(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
490 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
501 EMIT(PPC_RAW_DIVW(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
503 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
504 EMIT(PPC_RAW_MULW(_R0, tmp_reg, _R0)); in bpf_jit_build_body()
505 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
507 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
509 EMIT(PPC_RAW_SRAWI(_R0, src2_reg, ilog2(imm))); in bpf_jit_build_body()
510 EMIT(PPC_RAW_ADDZE(_R0, _R0)); in bpf_jit_build_body()
511 EMIT(PPC_RAW_SLWI(_R0, _R0, ilog2(imm))); in bpf_jit_build_body()
512 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
515 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - imm, 31)); in bpf_jit_build_body()
526 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
527 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
529 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
530 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, dst_reg_h)); in bpf_jit_build_body()
531 EMIT(PPC_RAW_SUBFC(dst_reg, dst_reg_h, dst_reg)); in bpf_jit_build_body()
532 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
533 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, dst_reg_h)); in bpf_jit_build_body()
534 EMIT(PPC_RAW_SUBFC(dst_reg, dst_reg_h, dst_reg)); in bpf_jit_build_body()
535 EMIT(PPC_RAW_SUBFE(dst_reg_h, dst_reg_h, dst_reg_h)); in bpf_jit_build_body()
537 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
538 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
548 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
549 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
554 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
555 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
558 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
559 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
560 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
564 EMIT(PPC_RAW_NEG(dst_reg, src2_reg)); in bpf_jit_build_body()
567 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
568 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
575 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
576 EMIT(PPC_RAW_AND(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
579 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
583 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
587 EMIT(PPC_RAW_ANDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
589 EMIT(PPC_RAW_ANDIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
591 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, in bpf_jit_build_body()
595 EMIT(PPC_RAW_AND(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
599 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
600 EMIT(PPC_RAW_OR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
603 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
608 EMIT(PPC_RAW_LI(dst_reg_h, -1)); in bpf_jit_build_body()
612 EMIT(PPC_RAW_ORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
616 EMIT(PPC_RAW_ORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
620 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
621 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
623 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
624 EMIT(PPC_RAW_XOR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
629 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
631 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
635 EMIT(PPC_RAW_NOR(dst_reg_h, src2_reg_h, src2_reg_h)); in bpf_jit_build_body()
639 EMIT(PPC_RAW_XORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
643 EMIT(PPC_RAW_XORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
646 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
650 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
651 EMIT(PPC_RAW_SLW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
652 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
653 EMIT(PPC_RAW_SRW(_R0, src2_reg, _R0)); in bpf_jit_build_body()
654 EMIT(PPC_RAW_SLW(tmp_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
655 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
656 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
657 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
661 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
663 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
669 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
671 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
672 EMIT(PPC_RAW_RLWIMI(dst_reg_h, src2_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
673 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
675 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
676 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
678 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
679 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
683 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
687 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
688 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
689 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
690 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
691 EMIT(PPC_RAW_SRW(tmp_reg, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
692 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
693 EMIT(PPC_RAW_SRW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
694 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
698 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
700 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
706 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
707 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
709 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
710 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
711 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, 32 - imm, imm, 31)); in bpf_jit_build_body()
713 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg_h, 64 - imm, imm - 32, 31)); in bpf_jit_build_body()
714 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
716 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
717 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
721 EMIT(PPC_RAW_SRAW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
725 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
726 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
727 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
728 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
729 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
730 EMIT(PPC_RAW_RLWINM(_R0, tmp_reg, 0, 26, 26)); in bpf_jit_build_body()
731 EMIT(PPC_RAW_SRAW(tmp_reg, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
732 EMIT(PPC_RAW_SRAW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
733 EMIT(PPC_RAW_SLW(tmp_reg, tmp_reg, _R0)); in bpf_jit_build_body()
734 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
738 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
740 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
746 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
747 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
749 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
750 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
751 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
753 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, imm - 32)); in bpf_jit_build_body()
754 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
756 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, 31)); in bpf_jit_build_body()
757 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
766 EMIT(PPC_RAW_EXTSB(dst_reg, src_reg)); in bpf_jit_build_body()
767 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
769 EMIT(PPC_RAW_EXTSH(dst_reg, src_reg)); in bpf_jit_build_body()
770 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
772 EMIT(PPC_RAW_SRAWI(dst_reg_h, src_reg, 31)); in bpf_jit_build_body()
774 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
775 EMIT(PPC_RAW_SRAWI(dst_reg_h, src_reg, 31)); in bpf_jit_build_body()
777 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
778 EMIT(PPC_RAW_MR(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
784 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
786 EMIT(PPC_RAW_EXTSB(dst_reg, src_reg)); in bpf_jit_build_body()
788 EMIT(PPC_RAW_EXTSH(dst_reg, src_reg)); in bpf_jit_build_body()
790 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
808 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg, 16, 0, 15)); in bpf_jit_build_body()
810 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 24, 16, 31)); in bpf_jit_build_body()
818 EMIT(PPC_RAW_RLWINM(_R0, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
820 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
822 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
823 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
827 EMIT(PPC_RAW_RLWINM(tmp_reg, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
828 EMIT(PPC_RAW_RLWINM(_R0, src2_reg_h, 8, 0, 31)); in bpf_jit_build_body()
830 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
831 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 0, 7)); in bpf_jit_build_body()
833 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
834 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 16, 23)); in bpf_jit_build_body()
835 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
836 EMIT(PPC_RAW_MR(dst_reg_h, tmp_reg)); in bpf_jit_build_body()
840 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
846 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 16, 31)); in bpf_jit_build_body()
865 EMIT(PPC_RAW_STB(src_reg, dst_reg, off)); in bpf_jit_build_body()
869 EMIT(PPC_RAW_STB(_R0, dst_reg, off)); in bpf_jit_build_body()
872 EMIT(PPC_RAW_STH(src_reg, dst_reg, off)); in bpf_jit_build_body()
876 EMIT(PPC_RAW_STH(_R0, dst_reg, off)); in bpf_jit_build_body()
879 EMIT(PPC_RAW_STW(src_reg, dst_reg, off)); in bpf_jit_build_body()
883 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
886 EMIT(PPC_RAW_STW(src_reg_h, dst_reg, off)); in bpf_jit_build_body()
887 EMIT(PPC_RAW_STW(src_reg, dst_reg, off + 4)); in bpf_jit_build_body()
891 EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4)); in bpf_jit_build_body()
893 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
907 EMIT(PPC_RAW_LI(tmp_reg, off)); in bpf_jit_build_body()
916 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
919 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0)); in bpf_jit_build_body()
923 EMIT(PPC_RAW_MR(ax_reg, _R0)); in bpf_jit_build_body()
928 EMIT(PPC_RAW_ADD(_R0, _R0, src_reg)); in bpf_jit_build_body()
932 EMIT(PPC_RAW_AND(_R0, _R0, src_reg)); in bpf_jit_build_body()
936 EMIT(PPC_RAW_OR(_R0, _R0, src_reg)); in bpf_jit_build_body()
940 EMIT(PPC_RAW_XOR(_R0, _R0, src_reg)); in bpf_jit_build_body()
950 EMIT(PPC_RAW_CMPW(bpf_to_ppc(BPF_REG_0), _R0)); in bpf_jit_build_body()
964 EMIT(PPC_RAW_STWCX(save_reg, tmp_reg, dst_reg)); in bpf_jit_build_body()
970 /* Emit 'sync' to enforce full ordering */ in bpf_jit_build_body()
972 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
973 EMIT(PPC_RAW_MR(ret_reg, ax_reg)); in bpf_jit_build_body()
975 EMIT(PPC_RAW_LI(ret_reg - 1, 0)); /* higher 32-bit */ in bpf_jit_build_body()
1007 EMIT(PPC_RAW_CMPLW(src_reg, _R0)); in bpf_jit_build_body()
1009 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
1012 * !fp->aux->verifier_zext. Emit NOP otherwise. in bpf_jit_build_body()
1019 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
1021 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1037 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1038 EMIT(PPC_RAW_EXTSB(dst_reg, dst_reg)); in bpf_jit_build_body()
1041 EMIT(PPC_RAW_LHA(dst_reg, src_reg, off)); in bpf_jit_build_body()
1044 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1048 EMIT(PPC_RAW_SRAWI(dst_reg_h, dst_reg, 31)); in bpf_jit_build_body()
1053 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1056 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1059 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
1062 EMIT(PPC_RAW_LWZ(dst_reg_h, src_reg, off)); in bpf_jit_build_body()
1063 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4)); in bpf_jit_build_body()
1067 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
1108 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1142 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5) - 1, _R1, 8)); in bpf_jit_build_body()
1143 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5), _R1, 12)); in bpf_jit_build_body()
1150 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0) - 1, _R3)); in bpf_jit_build_body()
1151 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0), _R4)); in bpf_jit_build_body()
1232 EMIT(PPC_RAW_CMPLW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1234 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1243 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1250 EMIT(PPC_RAW_CMPW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1252 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1259 EMIT(PPC_RAW_CMPW(dst_reg, src_reg)); in bpf_jit_build_body()
1262 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1264 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1267 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1280 EMIT(PPC_RAW_CMPLWI(dst_reg_h, 0)); in bpf_jit_build_body()
1282 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1286 EMIT(PPC_RAW_CMPLW(dst_reg_h, _R0)); in bpf_jit_build_body()
1289 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1299 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1302 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1311 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1313 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1316 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1319 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1331 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1335 EMIT(PPC_RAW_CMPW(dst_reg, _R0)); in bpf_jit_build_body()
1342 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1346 EMIT(PPC_RAW_CMPWI(dst_reg_h, 0)); in bpf_jit_build_body()
1349 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1356 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1359 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1387 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()