_R0
gdb_regs[_R0 + regno] = get_reg(regno, kernel_regs, cregs);
set_reg(regno, gdb_regs[regno + _R0], kernel_regs, cregs);
#define PPC_INST_STD_LR PPC_RAW_STD(_R0, _R1, PPC_LR_STKOFF)
unsafe_put_user(PPC_RAW_LI(_R0, __NR_rt_sigreturn), &mctx->mc_pad[0], failed);
unsafe_put_user(PPC_RAW_LI(_R0, __NR_sigreturn), &mctx->mc_pad[0], failed);
err |= __put_user(PPC_RAW_LI(_R0, syscall), &tramp[2]);
PPC_RAW_MFLR(_R0),
PPC_RAW_MTLR(_R0),
ret = ftrace_validate_inst(ip - 8, ppc_inst(PPC_RAW_MFLR(_R0)));
ret = ftrace_modify_code(ip - 4, ppc_inst(PPC_RAW_STW(_R0, _R1, 4)),
if (!ret && !ppc_inst_equal(old, ppc_inst(PPC_RAW_MFLR(_R0)))) {
ret = ftrace_validate_inst(ip - 8, ppc_inst(PPC_RAW_MFLR(_R0)));
ret = ftrace_modify_code(ip - 4, ppc_inst(PPC_RAW_STD(_R0, _R1, 16)),
new = ppc_inst(PPC_RAW_MFLR(_R0));
if (!ppc_inst_equal(op, ppc_inst(PPC_RAW_MFLR(_R0))) &&
instrs[i++] = PPC_RAW_MTSPR(SPRN_TRIG2, _R0);
instrs[i++] = PPC_RAW_MTSPR(SPRN_TRIG2, _R0);
instrs[i++] = PPC_RAW_MTSPR(SPRN_TRIG2, _R0);
EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_LL(_R0, _R1, alt_lr_off));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
EMIT(PPC_RAW_LL(_R0, _R1, retaddr_off));
EMIT(PPC_RAW_MTCTR(_R0));
EMIT(PPC_RAW_LL(_R0, _R1, PPC_LR_STKOFF));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_MFLR(_R0));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_STL(_R0, _R1, PPC_LR_STKOFF));
PPC_LI32(_R0, TASK_SIZE - off);
EMIT(PPC_RAW_CMPLW(src_reg, _R0));
ret = bpf_jit_emit_exit_insn(image, ctx, _R0, exit_addr);
EMIT(PPC_RAW_AND_DOT(_R0, dst_reg_h, src_reg_h));
EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg));
EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, src_reg));
PPC_EX32(_R0, imm);
EMIT(PPC_RAW_CMPLW(dst_reg_h, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_CMPLW(dst_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_CMPW(dst_reg, _R0));
EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0));
EMIT(PPC_RAW_ANDI(_R0, dst_reg, imm));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_AND_DOT(_R0, dst_reg, _R0));
EMIT(PPC_RAW_MFLR(_R0));
EMIT(PPC_RAW_STW(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF));
EMIT(PPC_RAW_LWZ(_R0, _R1, BPF_PPC_STACKFRAME(ctx) + PPC_LR_STKOFF));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_LIS(_R0, IMM_H(func)));
EMIT(PPC_RAW_ORI(_R0, _R0, IMM_L(func)));
EMIT(PPC_RAW_MTCTR(_R0));
EMIT(PPC_RAW_LWZ(_R0, b2p_bpf_array, offsetof(struct bpf_array, map.max_entries)));
EMIT(PPC_RAW_CMPLW(b2p_index, _R0));
EMIT(PPC_RAW_LWZ(_R0, _R1, bpf_jit_stack_offsetof(ctx, BPF_PPC_TC)));
EMIT(PPC_RAW_CMPLWI(_R0, MAX_TAIL_CALL_CNT));
EMIT(PPC_RAW_ADDIC(_R0, _R0, 1));
EMIT(PPC_RAW_MR(_R4, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_ADDC(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_MULW(_R0, src2_reg, src_reg_h));
EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_MULW(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_MULHWU(_R0, src2_reg, tmp_reg));
EMIT(PPC_RAW_ADD(dst_reg_h, dst_reg_h, _R0));
EMIT(PPC_RAW_DIVW(_R0, src2_reg, src_reg));
EMIT(PPC_RAW_DIVWU(_R0, src2_reg, src_reg));
EMIT(PPC_RAW_MULW(_R0, src_reg, _R0));
EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_DIVW(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_DIVWU(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_DIVW(_R0, src2_reg, tmp_reg));
EMIT(PPC_RAW_DIVWU(_R0, src2_reg, tmp_reg));
EMIT(PPC_RAW_MULW(_R0, tmp_reg, _R0));
EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_SRAWI(_R0, src2_reg, ilog2(imm)));
EMIT(PPC_RAW_ADDZE(_R0, _R0));
EMIT(PPC_RAW_SLWI(_R0, _R0, ilog2(imm)));
EMIT(PPC_RAW_SUB(dst_reg, src2_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_AND(dst_reg, src2_reg, _R0));
EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32));
EMIT(PPC_RAW_SRW(_R0, src2_reg, _R0));
EMIT(PPC_RAW_OR(dst_reg_h, dst_reg_h, _R0));
EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32));
EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0));
EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0));
EMIT(PPC_RAW_SUBFIC(_R0, src_reg, 32));
EMIT(PPC_RAW_SLW(_R0, src2_reg_h, _R0));
EMIT(PPC_RAW_OR(dst_reg, dst_reg, _R0));
EMIT(PPC_RAW_RLWINM(_R0, tmp_reg, 0, 26, 26));
EMIT(PPC_RAW_SLW(tmp_reg, tmp_reg, _R0));
EMIT(PPC_RAW_RLWINM(_R0, src2_reg, 8, 0, 31));
EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 0, 7));
EMIT(PPC_RAW_RLWIMI(_R0, src2_reg, 24, 16, 23));
EMIT(PPC_RAW_MR(dst_reg, _R0));
EMIT(PPC_RAW_RLWINM(_R0, src2_reg_h, 8, 0, 31));
EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 0, 7));
EMIT(PPC_RAW_RLWIMI(_R0, src2_reg_h, 24, 16, 23));
EMIT(PPC_RAW_MR(dst_reg, _R0));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_STB(_R0, dst_reg, off));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_STH(_R0, dst_reg, off));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_STW(_R0, dst_reg, off));
PPC_LI32(_R0, imm);
EMIT(PPC_RAW_STW(_R0, dst_reg, off + 4));
PPC_EX32(_R0, imm);
EMIT(PPC_RAW_STW(_R0, dst_reg, off));
save_reg = _R0;
EMIT(PPC_RAW_LWARX(_R0, tmp_reg, dst_reg, 0));
EMIT(PPC_RAW_MR(ax_reg, _R0));
EMIT(PPC_RAW_ADD(_R0, _R0, src_reg));
EMIT(PPC_RAW_AND(_R0, _R0, src_reg));
EMIT(PPC_RAW_OR(_R0, _R0, src_reg));
EMIT(PPC_RAW_XOR(_R0, _R0, src_reg));
EMIT(PPC_RAW_CMPW(bpf_to_ppc(BPF_REG_0), _R0));
EMIT(PPC_RAW_MFLR(_R0));
EMIT(PPC_RAW_STD(_R0, _R1, PPC_LR_STKOFF));
EMIT(PPC_RAW_LD(_R0, _R1, PPC_LR_STKOFF));
EMIT(PPC_RAW_MTLR(_R0));
EMIT(PPC_RAW_MR(_R0, tmp2_reg));
EMIT(PPC_RAW_MR(ret_reg, _R0));