Lines Matching refs:dst_reg
283 u32 dst_reg = bpf_to_ppc(insn[i].dst_reg); in bpf_jit_build_body() local
284 u32 dst_reg_h = dst_reg - 1; in bpf_jit_build_body()
316 if (dst_reg >= 3 && dst_reg < 32) { in bpf_jit_build_body()
317 bpf_set_seen_register(ctx, dst_reg); in bpf_jit_build_body()
331 EMIT(PPC_RAW_ADD(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
334 EMIT(PPC_RAW_ADDC(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
338 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
341 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, dst_reg)); in bpf_jit_build_body()
349 EMIT(PPC_RAW_ADDIS(dst_reg, dst_reg, IMM_HA(imm))); in bpf_jit_build_body()
351 EMIT(PPC_RAW_ADDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
361 EMIT(PPC_RAW_ADDIC(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
364 EMIT(PPC_RAW_ADDC(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
373 EMIT(PPC_RAW_MULW(_R0, dst_reg, src_reg_h)); in bpf_jit_build_body()
375 EMIT(PPC_RAW_MULHWU(tmp_reg, dst_reg, src_reg)); in bpf_jit_build_body()
376 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
381 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
385 EMIT(PPC_RAW_MULI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
388 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
393 PPC_LI32(dst_reg, 0); in bpf_jit_build_body()
400 EMIT(PPC_RAW_SUBFIC(dst_reg, dst_reg, 0)); in bpf_jit_build_body()
408 EMIT(PPC_RAW_SUB(dst_reg_h, dst_reg_h, dst_reg)); in bpf_jit_build_body()
409 EMIT(PPC_RAW_MULHWU(_R0, dst_reg, tmp_reg)); in bpf_jit_build_body()
410 EMIT(PPC_RAW_MULW(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
414 EMIT(PPC_RAW_DIVWU(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
417 EMIT(PPC_RAW_DIVWU(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
419 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
432 EMIT(PPC_RAW_DIVWU(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
441 EMIT(PPC_RAW_DIVWU(_R0, dst_reg, tmp_reg)); in bpf_jit_build_body()
443 EMIT(PPC_RAW_SUB(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
447 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
449 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 32 - ilog2((u32)imm), 31)); in bpf_jit_build_body()
460 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
462 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 32 - ilog2(imm), 31)); in bpf_jit_build_body()
472 EMIT(PPC_RAW_SUBFIC(dst_reg, dst_reg, 0)); in bpf_jit_build_body()
479 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
480 EMIT(PPC_RAW_RLWIMI(dst_reg, dst_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
484 EMIT(PPC_RAW_NEG(dst_reg, dst_reg)); in bpf_jit_build_body()
487 EMIT(PPC_RAW_SUBFIC(dst_reg, dst_reg, 0)); in bpf_jit_build_body()
495 EMIT(PPC_RAW_AND(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
499 EMIT(PPC_RAW_AND(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
507 EMIT(PPC_RAW_ANDI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
509 EMIT(PPC_RAW_ANDIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
511 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, in bpf_jit_build_body()
515 EMIT(PPC_RAW_AND(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
519 EMIT(PPC_RAW_OR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
523 EMIT(PPC_RAW_OR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
532 EMIT(PPC_RAW_ORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
534 EMIT(PPC_RAW_ORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
537 if (dst_reg == src_reg) { in bpf_jit_build_body()
538 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
541 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
546 if (dst_reg == src_reg) in bpf_jit_build_body()
547 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
549 EMIT(PPC_RAW_XOR(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
557 EMIT(PPC_RAW_XORI(dst_reg, dst_reg, IMM_L(imm))); in bpf_jit_build_body()
559 EMIT(PPC_RAW_XORIS(dst_reg, dst_reg, IMM_H(imm))); in bpf_jit_build_body()
562 EMIT(PPC_RAW_SLW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
569 EMIT(PPC_RAW_SRW(_R0, dst_reg, _R0)); in bpf_jit_build_body()
570 EMIT(PPC_RAW_SLW(tmp_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
572 EMIT(PPC_RAW_SLW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
578 EMIT(PPC_RAW_SLWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
587 EMIT(PPC_RAW_RLWIMI(dst_reg_h, dst_reg, imm, 32 - imm, 31)); in bpf_jit_build_body()
588 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
592 EMIT(PPC_RAW_RLWINM(dst_reg_h, dst_reg, imm, 0, 31 - imm)); in bpf_jit_build_body()
595 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
598 EMIT(PPC_RAW_SRW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
603 EMIT(PPC_RAW_SRW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
607 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
609 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
614 EMIT(PPC_RAW_SRWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
622 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
623 EMIT(PPC_RAW_RLWIMI(dst_reg, dst_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
628 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg_h, 64 - imm, imm - 32, 31)); in bpf_jit_build_body()
630 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
634 EMIT(PPC_RAW_SRAW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
639 EMIT(PPC_RAW_SRW(dst_reg, dst_reg, src_reg)); in bpf_jit_build_body()
642 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0)); in bpf_jit_build_body()
647 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg)); in bpf_jit_build_body()
652 EMIT(PPC_RAW_SRAWI(dst_reg, dst_reg, imm)); in bpf_jit_build_body()
660 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 32 - imm, imm, 31)); in bpf_jit_build_body()
661 EMIT(PPC_RAW_RLWIMI(dst_reg, dst_reg_h, 32 - imm, 0, imm - 1)); in bpf_jit_build_body()
666 EMIT(PPC_RAW_SRAWI(dst_reg, dst_reg_h, imm - 32)); in bpf_jit_build_body()
668 EMIT(PPC_RAW_SRAWI(dst_reg, dst_reg_h, 31)); in bpf_jit_build_body()
676 if (dst_reg == src_reg) in bpf_jit_build_body()
678 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
685 else if (dst_reg != src_reg) in bpf_jit_build_body()
686 EMIT(PPC_RAW_MR(dst_reg, src_reg)); in bpf_jit_build_body()
689 PPC_LI32(dst_reg, imm); in bpf_jit_build_body()
693 PPC_LI32(dst_reg, imm); in bpf_jit_build_body()
703 EMIT(PPC_RAW_RLWIMI(dst_reg, dst_reg, 16, 0, 15)); in bpf_jit_build_body()
705 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 24, 16, 31)); in bpf_jit_build_body()
713 EMIT(PPC_RAW_RLWINM(_R0, dst_reg, 8, 0, 31)); in bpf_jit_build_body()
715 EMIT(PPC_RAW_RLWIMI(_R0, dst_reg, 24, 0, 7)); in bpf_jit_build_body()
717 EMIT(PPC_RAW_RLWIMI(_R0, dst_reg, 24, 16, 23)); in bpf_jit_build_body()
718 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
722 EMIT(PPC_RAW_RLWINM(tmp_reg, dst_reg, 8, 0, 31)); in bpf_jit_build_body()
725 EMIT(PPC_RAW_RLWIMI(tmp_reg, dst_reg, 24, 0, 7)); in bpf_jit_build_body()
728 EMIT(PPC_RAW_RLWIMI(tmp_reg, dst_reg, 24, 16, 23)); in bpf_jit_build_body()
730 EMIT(PPC_RAW_MR(dst_reg, _R0)); in bpf_jit_build_body()
739 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 0, 16, 31)); in bpf_jit_build_body()
758 EMIT(PPC_RAW_STB(src_reg, dst_reg, off)); in bpf_jit_build_body()
762 EMIT(PPC_RAW_STB(_R0, dst_reg, off)); in bpf_jit_build_body()
765 EMIT(PPC_RAW_STH(src_reg, dst_reg, off)); in bpf_jit_build_body()
769 EMIT(PPC_RAW_STH(_R0, dst_reg, off)); in bpf_jit_build_body()
772 EMIT(PPC_RAW_STW(src_reg, dst_reg, off)); in bpf_jit_build_body()
776 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
779 EMIT(PPC_RAW_STW(src_reg_h, dst_reg, off)); in bpf_jit_build_body()
780 EMIT(PPC_RAW_STW(src_reg, dst_reg, off + 4)); in bpf_jit_build_body()
784 EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4)); in bpf_jit_build_body()
786 EMIT(PPC_RAW_STW(_R0, dst_reg, off)); in bpf_jit_build_body()
803 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0)); in bpf_jit_build_body()
848 EMIT(PPC_RAW_STWCX(save_reg, tmp_reg, dst_reg)); in bpf_jit_build_body()
884 EMIT(PPC_RAW_LI(dst_reg, 0)); in bpf_jit_build_body()
910 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
913 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
916 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off)); in bpf_jit_build_body()
920 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4)); in bpf_jit_build_body()
948 jmp_off, dst_reg); in bpf_jit_build_body()
961 PPC_LI32(dst_reg, (u32)insn[i].imm); in bpf_jit_build_body()
1087 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1096 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1105 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg)); in bpf_jit_build_body()
1112 EMIT(PPC_RAW_CMPW(dst_reg, src_reg)); in bpf_jit_build_body()
1117 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1120 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg)); in bpf_jit_build_body()
1135 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1142 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1152 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1155 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1166 EMIT(PPC_RAW_CMPLWI(dst_reg, imm)); in bpf_jit_build_body()
1172 EMIT(PPC_RAW_CMPLW(dst_reg, _R0)); in bpf_jit_build_body()
1184 EMIT(PPC_RAW_CMPWI(dst_reg, imm)); in bpf_jit_build_body()
1188 EMIT(PPC_RAW_CMPW(dst_reg, _R0)); in bpf_jit_build_body()
1195 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1202 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()
1209 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm)); in bpf_jit_build_body()
1212 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0)); in bpf_jit_build_body()