Lines Matching refs:dst_reg

295 		u32 dst_reg = bpf_to_ppc(insn[i].dst_reg);
296 u32 dst_reg_h = dst_reg - 1;
299 u32 src2_reg = dst_reg;
316 insn[i - 1].dst_reg == insn[i].dst_reg && insn[i - 1].imm != 1) {
334 * is that those instructions will have src_reg/dst_reg set to
339 if (dst_reg >= 3 && dst_reg < 32) {
340 bpf_set_seen_register(ctx, dst_reg);
354 EMIT(PPC_RAW_ADD(dst_reg, src2_reg, src_reg));
357 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, src_reg));
361 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, src_reg));
364 EMIT(PPC_RAW_SUBFC(dst_reg, src_reg, src2_reg));
372 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
374 EMIT(PPC_RAW_ADDIS(dst_reg, src2_reg, IMM_HA(imm)));
375 src2_reg = dst_reg;
378 EMIT(PPC_RAW_ADDI(dst_reg, src2_reg, IMM_L(imm)));
385 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
390 EMIT(PPC_RAW_ADDIC(dst_reg, src2_reg, imm));
393 EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, _R0));
405 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg));
410 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, src_reg));
414 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
416 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0));
418 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, ilog2(imm)));
420 EMIT(PPC_RAW_MULI(dst_reg, src2_reg, imm));
423 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, _R0));
428 PPC_LI32(dst_reg, 0);
431 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
434 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0));
439 EMIT(PPC_RAW_RLWIMI(dst_reg_h, dst_reg, imm, 32 - imm, 31));
440 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm));
448 EMIT(PPC_RAW_MULW(dst_reg, src2_reg, tmp_reg));
453 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, src_reg));
458 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0));
468 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
470 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, ilog2(imm)));
473 EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, _R0));
485 EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0));
487 EMIT(PPC_RAW_LI(dst_reg, 0));
490 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - imm, 31));
501 EMIT(PPC_RAW_LI(dst_reg, 0));
503 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 32 - ilog2(imm), 31));
513 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0));
516 src2_reg = dst_reg;
519 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
523 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31));
524 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1));
529 EMIT(PPC_RAW_NEG(dst_reg, src2_reg));
532 EMIT(PPC_RAW_SUBFIC(dst_reg, src2_reg, 0));
540 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg));
544 EMIT(PPC_RAW_AND(dst_reg, src2_reg, src_reg));
552 EMIT(PPC_RAW_ANDI(dst_reg, src2_reg, IMM_L(imm)));
554 EMIT(PPC_RAW_ANDIS(dst_reg, src2_reg, IMM_H(imm)));
556 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0,
560 EMIT(PPC_RAW_AND(dst_reg, src2_reg, _R0));
564 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg));
568 EMIT(PPC_RAW_OR(dst_reg, src2_reg, src_reg));
577 EMIT(PPC_RAW_ORI(dst_reg, src2_reg, IMM_L(imm)));
578 src2_reg = dst_reg;
581 EMIT(PPC_RAW_ORIS(dst_reg, src2_reg, IMM_H(imm)));
584 if (dst_reg == src_reg) {
585 EMIT(PPC_RAW_LI(dst_reg, 0));
588 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg));
593 if (dst_reg == src_reg)
594 EMIT(PPC_RAW_LI(dst_reg, 0));
596 EMIT(PPC_RAW_XOR(dst_reg, src2_reg, src_reg));
604 EMIT(PPC_RAW_XORI(dst_reg, src2_reg, IMM_L(imm)));
605 src2_reg = dst_reg;
608 EMIT(PPC_RAW_XORIS(dst_reg, src2_reg, IMM_H(imm)));
611 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg));
621 EMIT(PPC_RAW_SLW(dst_reg, src2_reg, src_reg));
626 EMIT(PPC_RAW_SLWI(dst_reg, src2_reg, imm));
628 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
634 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
638 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, imm, 0, 31 - imm));
641 EMIT(PPC_RAW_LI(dst_reg, 0));
644 EMIT(PPC_RAW_LI(dst_reg, 0));
648 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg));
653 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg));
657 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0));
659 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg));
663 EMIT(PPC_RAW_SRWI(dst_reg, src2_reg, imm));
665 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
671 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
674 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31));
675 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1));
678 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg_h, 64 - imm, imm - 32, 31));
681 EMIT(PPC_RAW_LI(dst_reg, 0));
686 EMIT(PPC_RAW_SRAW(dst_reg, src2_reg, src_reg));
691 EMIT(PPC_RAW_SRW(dst_reg, src2_reg, src_reg));
694 EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0));
699 EMIT(PPC_RAW_OR(dst_reg, dst_reg, tmp_reg));
703 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg, imm));
705 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
711 EMIT(PPC_RAW_MR(dst_reg, src2_reg));
714 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 32 - imm, imm, 31));
715 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg_h, 32 - imm, 0, imm - 1));
718 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, imm - 32));
721 EMIT(PPC_RAW_SRAWI(dst_reg, src2_reg_h, 31));
730 if (dst_reg == src_reg)
732 EMIT(PPC_RAW_MR(dst_reg, src_reg));
739 else if (dst_reg != src_reg)
740 EMIT(PPC_RAW_MR(dst_reg, src_reg));
743 PPC_LI32(dst_reg, imm);
747 PPC_LI32(dst_reg, imm);
757 EMIT(PPC_RAW_RLWIMI(dst_reg, src2_reg, 16, 0, 15));
759 EMIT(PPC_RAW_RLWINM(dst_reg, dst_reg, 24, 16, 31));
772 EMIT(PPC_RAW_MR(dst_reg, _R0));
784 EMIT(PPC_RAW_MR(dst_reg, _R0));
793 EMIT(PPC_RAW_RLWINM(dst_reg, src2_reg, 0, 16, 31));
812 EMIT(PPC_RAW_STB(src_reg, dst_reg, off));
816 EMIT(PPC_RAW_STB(_R0, dst_reg, off));
819 EMIT(PPC_RAW_STH(src_reg, dst_reg, off));
823 EMIT(PPC_RAW_STH(_R0, dst_reg, off));
826 EMIT(PPC_RAW_STW(src_reg, dst_reg, off));
830 EMIT(PPC_RAW_STW(_R0, dst_reg, off));
833 EMIT(PPC_RAW_STW(src_reg_h, dst_reg, off));
834 EMIT(PPC_RAW_STW(src_reg, dst_reg, off + 4));
838 EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4));
840 EMIT(PPC_RAW_STW(_R0, dst_reg, off));
857 EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0));
902 EMIT(PPC_RAW_STWCX(save_reg, tmp_reg, dst_reg));
932 * set dst_reg=0 and move on.
938 EMIT(PPC_RAW_LI(dst_reg, 0));
953 * as there are two load instructions for dst_reg_h & dst_reg
964 EMIT(PPC_RAW_LBZ(dst_reg, src_reg, off));
967 EMIT(PPC_RAW_LHZ(dst_reg, src_reg, off));
970 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off));
974 EMIT(PPC_RAW_LWZ(dst_reg, src_reg, off + 4));
1002 jmp_off, dst_reg);
1015 PPC_LI32(dst_reg, (u32)insn[i].imm);
1142 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg));
1151 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg));
1160 EMIT(PPC_RAW_CMPLW(dst_reg, src_reg));
1167 EMIT(PPC_RAW_CMPW(dst_reg, src_reg));
1172 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg));
1175 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg));
1190 EMIT(PPC_RAW_CMPLWI(dst_reg, imm));
1197 EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
1207 EMIT(PPC_RAW_CMPLWI(dst_reg, imm));
1210 EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
1221 EMIT(PPC_RAW_CMPLWI(dst_reg, imm));
1227 EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
1239 EMIT(PPC_RAW_CMPWI(dst_reg, imm));
1243 EMIT(PPC_RAW_CMPW(dst_reg, _R0));
1250 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm));
1257 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0));
1264 EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm));
1267 EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0));