Lines Matching full: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()
211 EMIT(PPC_RAW_LIS(_R0, IMM_H(func))); in bpf_jit_emit_func_call_rel()
212 EMIT(PPC_RAW_ORI(_R0, _R0, IMM_L(func))); in bpf_jit_emit_func_call_rel()
213 EMIT(PPC_RAW_MTCTR(_R0)); in bpf_jit_emit_func_call_rel()
214 EMIT(PPC_RAW_BCTRL()); in bpf_jit_emit_func_call_rel()
235 EMIT(PPC_RAW_LWZ(_R0, b2p_bpf_array, offsetof(struct bpf_array, map.max_entries))); in bpf_jit_emit_tail_call()
236 EMIT(PPC_RAW_CMPLW(b2p_index, _R0)); in bpf_jit_emit_tail_call()
237 EMIT(PPC_RAW_LWZ(_R0, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC))); in bpf_jit_emit_tail_call()
244 EMIT(PPC_RAW_CMPLWI(_R0, MAX_TAIL_CALL_CNT)); in bpf_jit_emit_tail_call()
246 EMIT(PPC_RAW_ADDIC(_R0, _R0, 1)); in bpf_jit_emit_tail_call()
250 EMIT(PPC_RAW_RLWINM(_R3, b2p_index, 2, 0, 29)); in bpf_jit_emit_tail_call()
251 EMIT(PPC_RAW_ADD(_R3, _R3, b2p_bpf_array)); in bpf_jit_emit_tail_call()
252 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_array, ptrs))); in bpf_jit_emit_tail_call()
258 EMIT(PPC_RAW_CMPLWI(_R3, 0)); in bpf_jit_emit_tail_call()
262 EMIT(PPC_RAW_LWZ(_R3, _R3, offsetof(struct bpf_prog, bpf_func))); in bpf_jit_emit_tail_call()
263 EMIT(PPC_RAW_ADDIC(_R3, _R3, BPF_TAILCALL_PROLOGUE_SIZE)); in bpf_jit_emit_tail_call()
264 EMIT(PPC_RAW_MTCTR(_R3)); in bpf_jit_emit_tail_call()
266 EMIT(PPC_RAW_MR(_R3, bpf_to_ppc(BPF_REG_1))); in bpf_jit_emit_tail_call()
269 EMIT(PPC_RAW_MR(_R4, _R0)); in bpf_jit_emit_tail_call()
274 EMIT(PPC_RAW_BCTR()); in bpf_jit_emit_tail_call()
353 EMIT(PPC_RAW_ADD(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
356 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
357 EMIT(PPC_RAW_ADDE(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
360 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
363 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, src2_reg)); in bpf_jit_build_body()
364 EMIT(PPC_RAW_SUBFE(dst_reg_h, src_reg_h, src2_reg_h)); in bpf_jit_build_body()
371 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
373 EMIT(PPC_RAW_ADDIS(dst_reg, src2_reg, IMM_HA(imm))); in bpf_jit_build_body()
377 EMIT(PPC_RAW_ADDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
384 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
385 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
389 EMIT(PPC_RAW_ADDIC(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
392 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
395 EMIT(PPC_RAW_ADDZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
397 EMIT(PPC_RAW_ADDME(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
401 EMIT(PPC_RAW_MULW(_R0, src2_reg, src_reg_h)); in bpf_jit_build_body()
402 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
403 EMIT(PPC_RAW_MULHWU(tmp_reg, src2_reg, src_reg)); in bpf_jit_build_body()
404 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
405 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
406 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
409 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
413 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
415 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
417 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
419 EMIT(PPC_RAW_MULI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
422 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
430 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
431 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
433 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
434 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
437 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
438 EMIT(PPC_RAW_RLWIMI(dst_reg_h, dst_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
439 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
443 EMIT(PPC_RAW_MULW(dst_reg_h, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
445 EMIT(PPC_RAW_SUB(dst_reg_h, dst_reg_h, src2_reg)); in bpf_jit_build_body()
446 EMIT(PPC_RAW_MULHWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
447 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
448 EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
452 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
455 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, src_reg)); in bpf_jit_build_body()
456 EMIT(PPC_RAW_MULW(_R0, src_reg, _R0)); in bpf_jit_build_body()
457 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
467 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
469 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, ilog2(imm))); in bpf_jit_build_body()
472 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
482 EMIT(PPC_RAW_DIVWU(_R0, src2_reg, tmp_reg)); in bpf_jit_build_body()
483 EMIT(PPC_RAW_MULW(_R0, tmp_reg, _R0)); in bpf_jit_build_body()
484 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
486 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
489 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - imm, 31)); in bpf_jit_build_body()
500 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
502 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
503 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
512 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
513 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
518 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
519 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
522 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
523 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
524 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
528 EMIT(PPC_RAW_NEG(dst_reg, src2_reg)); in bpf_jit_build_body()
531 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0)); in bpf_jit_build_body()
532 EMIT(PPC_RAW_SUBFZE(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
539 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
540 EMIT(PPC_RAW_AND(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
543 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
547 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
551 EMIT(PPC_RAW_ANDI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
553 EMIT(PPC_RAW_ANDIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
555 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, in bpf_jit_build_body()
559 EMIT(PPC_RAW_AND(dst_reg, src2_reg, _R0)); in bpf_jit_build_body()
563 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
564 EMIT(PPC_RAW_OR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
567 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
572 EMIT(PPC_RAW_LI(dst_reg_h, -1)); in bpf_jit_build_body()
576 EMIT(PPC_RAW_ORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
580 EMIT(PPC_RAW_ORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
584 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
585 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
587 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
588 EMIT(PPC_RAW_XOR(dst_reg_h, src2_reg_h, src_reg_h)); in bpf_jit_build_body()
593 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
595 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
599 EMIT(PPC_RAW_NOR(dst_reg_h, src2_reg_h, src2_reg_h)); in bpf_jit_build_body()
603 EMIT(PPC_RAW_XORI(dst_reg, src2_reg, IMM_L(imm))); in bpf_jit_build_body()
607 EMIT(PPC_RAW_XORIS(dst_reg, src2_reg, IMM_H(imm))); in bpf_jit_build_body()
610 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
614 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
615 EMIT(PPC_RAW_SLW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
616 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
617 EMIT(PPC_RAW_SRW(_R0, src2_reg, _R0)); in bpf_jit_build_body()
618 EMIT(PPC_RAW_SLW(tmp_reg, src2_reg, tmp_reg)); in bpf_jit_build_body()
619 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, _R0)); in bpf_jit_build_body()
620 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
621 EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
625 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
627 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
633 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
635 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, imm, 0, 31 - imm)); in bpf_jit_build_body()
636 EMIT(PPC_RAW_RLWIMI(dst_reg_h, src2_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
637 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
639 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
640 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
642 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
643 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
647 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
651 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
652 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
653 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
654 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
655 EMIT(PPC_RAW_SRW(tmp_reg, dst_reg_h, tmp_reg)); in bpf_jit_build_body()
656 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
657 EMIT(PPC_RAW_SRW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
658 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
662 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
664 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
670 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
671 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
673 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
674 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
675 EMIT(PPC_RAW_RLWINM(dst_reg_h, src2_reg_h, 32 - imm, imm, 31)); in bpf_jit_build_body()
677 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg_h, 64 - imm, imm - 32, 31)); in bpf_jit_build_body()
678 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
680 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
681 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
685 EMIT(PPC_RAW_SRAW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
689 EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32)); in bpf_jit_build_body()
690 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg)); in bpf_jit_build_body()
691 EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0)); in bpf_jit_build_body()
692 EMIT(PPC_RAW_ADDI(tmp_reg, src_reg, 32)); in bpf_jit_build_body()
693 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
694 EMIT(PPC_RAW_RLWINM(_R0, tmp_reg, 0, 26, 26)); in bpf_jit_build_body()
695 EMIT(PPC_RAW_SRAW(tmp_reg, src2_reg_h, tmp_reg)); in bpf_jit_build_body()
696 EMIT(PPC_RAW_SRAW(dst_reg_h, src2_reg_h, src_reg)); in bpf_jit_build_body()
697 EMIT(PPC_RAW_SLW(tmp_reg, tmp_reg, _R0)); in bpf_jit_build_body()
698 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
702 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, imm)); in bpf_jit_build_body()
704 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
710 EMIT(PPC_RAW_MR(dst_reg, src2_reg)); in bpf_jit_build_body()
711 EMIT(PPC_RAW_MR(dst_reg_h, src2_reg_h)); in bpf_jit_build_body()
713 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
714 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
715 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, imm)); in bpf_jit_build_body()
717 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, imm - 32)); in bpf_jit_build_body()
718 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
720 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, 31)); in bpf_jit_build_body()
721 EMIT(PPC_RAW_SRAWI(dst_reg_h, src2_reg_h, 31)); in bpf_jit_build_body()
731 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
732 EMIT(PPC_RAW_MR(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
737 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
739 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
756 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg, 16, 0, 15)); in bpf_jit_build_body()
758 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 24, 16, 31)); in bpf_jit_build_body()
766 EMIT(PPC_RAW_RLWINM(_R0, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
768 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
770 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
771 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
775 EMIT(PPC_RAW_RLWINM(tmp_reg, src2_reg, 8, 0, 31)); in bpf_jit_build_body()
776 EMIT(PPC_RAW_RLWINM(_R0, src2_reg_h, 8, 0, 31)); in bpf_jit_build_body()
778 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 0, 7)); in bpf_jit_build_body()
779 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 0, 7)); in bpf_jit_build_body()
781 EMIT(PPC_RAW_RLWIMI(tmp_reg, src2_reg, 24, 16, 23)); in bpf_jit_build_body()
782 EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 16, 23)); in bpf_jit_build_body()
783 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
784 EMIT(PPC_RAW_MR(dst_reg_h, tmp_reg)); in bpf_jit_build_body()
792 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 16, 31)); in bpf_jit_build_body()
811 EMIT(PPC_RAW_STB(src_reg, dst_reg, off)); in bpf_jit_build_body()
815 EMIT(PPC_RAW_STB(_R0, dst_reg, off)); in bpf_jit_build_body()
818 EMIT(PPC_RAW_STH(src_reg, dst_reg, off)); in bpf_jit_build_body()
822 EMIT(PPC_RAW_STH(_R0, dst_reg, off)); in bpf_jit_build_body()
825 EMIT(PPC_RAW_STW(src_reg, dst_reg, off)); in bpf_jit_build_body()
829 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
832 EMIT(PPC_RAW_STW(src_reg_h, dst_reg, off)); in bpf_jit_build_body()
833 EMIT(PPC_RAW_STW(src_reg, dst_reg, off + 4)); in bpf_jit_build_body()
837 EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4)); in bpf_jit_build_body()
839 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
853 EMIT(PPC_RAW_LI(tmp_reg, off)); in bpf_jit_build_body()
862 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
865 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0)); in bpf_jit_build_body()
869 EMIT(PPC_RAW_MR(ax_reg, _R0)); in bpf_jit_build_body()
874 EMIT(PPC_RAW_ADD(_R0, _R0, src_reg)); in bpf_jit_build_body()
878 EMIT(PPC_RAW_AND(_R0, _R0, src_reg)); in bpf_jit_build_body()
882 EMIT(PPC_RAW_OR(_R0, _R0, src_reg)); in bpf_jit_build_body()
886 EMIT(PPC_RAW_XOR(_R0, _R0, src_reg)); in bpf_jit_build_body()
896 EMIT(PPC_RAW_CMPW(bpf_to_ppc(BPF_REG_0), _R0)); in bpf_jit_build_body()
910 EMIT(PPC_RAW_STWCX(save_reg, tmp_reg, dst_reg)); in bpf_jit_build_body()
916 /* Emit 'sync' to enforce full ordering */ in bpf_jit_build_body()
918 EMIT(PPC_RAW_SYNC()); in bpf_jit_build_body()
919 EMIT(PPC_RAW_MR(ret_reg, ax_reg)); in bpf_jit_build_body()
921 EMIT(PPC_RAW_LI(ret_reg - 1, 0)); /* higher 32-bit */ in bpf_jit_build_body()
947 EMIT(PPC_RAW_CMPLW(src_reg, _R0)); in bpf_jit_build_body()
949 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
952 * !fp->aux->verifier_zext. Emit NOP otherwise. in bpf_jit_build_body()
959 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
961 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
975 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
978 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
981 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
984 EMIT(PPC_RAW_LWZ(dst_reg_h, src_reg, off)); in bpf_jit_build_body()
985 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4)); in bpf_jit_build_body()
990 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()
1030 EMIT(PPC_RAW_NOP()); in bpf_jit_build_body()
1064 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5) - 1, _R1, 8)); in bpf_jit_build_body()
1065 EMIT(PPC_RAW_STW(bpf_to_ppc(BPF_REG_5), _R1, 12)); in bpf_jit_build_body()
1072 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0) - 1, _R3)); in bpf_jit_build_body()
1073 EMIT(PPC_RAW_MR(bpf_to_ppc(BPF_REG_0), _R4)); in bpf_jit_build_body()
1151 EMIT(PPC_RAW_CMPLW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1153 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1162 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1169 EMIT(PPC_RAW_CMPW(dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1171 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1178 EMIT(PPC_RAW_CMPW(dst_reg, src_reg)); in bpf_jit_build_body()
1181 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg_h, src_reg_h)); in bpf_jit_build_body()
1183 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1186 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1199 EMIT(PPC_RAW_CMPLWI(dst_reg_h, 0)); in bpf_jit_build_body()
1201 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1205 EMIT(PPC_RAW_CMPLW(dst_reg_h, _R0)); in bpf_jit_build_body()
1208 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1218 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1221 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1230 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1232 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1235 EMIT(PPC_RAW_CMPWI(dst_reg_h, imm < 0 ? -1 : 0)); in bpf_jit_build_body()
1238 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1250 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1254 EMIT(PPC_RAW_CMPW(dst_reg, _R0)); in bpf_jit_build_body()
1261 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1265 EMIT(PPC_RAW_CMPWI(dst_reg_h, 0)); in bpf_jit_build_body()
1268 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1275 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1278 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1306 EMIT(PPC_RAW_LI(dst_reg_h, 0)); in bpf_jit_build_body()