Lines Matching refs:rvoff
227 static void emit_jump_and_link(u8 rd, s32 rvoff, bool force_jalr, in emit_jump_and_link() argument
232 if (rvoff && is_21b_int(rvoff) && !force_jalr) { in emit_jump_and_link()
233 emit(rv_jal(rd, rvoff >> 1), ctx); in emit_jump_and_link()
237 upper = (rvoff + (1 << 11)) >> 12; in emit_jump_and_link()
238 lower = rvoff & 0xfff; in emit_jump_and_link()
564 static int emit_branch_r64(const s8 *src1, const s8 *src2, s32 rvoff, in emit_branch_r64() argument
647 rvoff -= ninsns_rvoff(e - s); in emit_branch_r64()
648 emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx); in emit_branch_r64()
652 static int emit_bcc(u8 op, u8 rd, u8 rs, int rvoff, struct rv_jit_context *ctx) in emit_bcc() argument
664 } else if (!is_13b_int(rvoff)) { in emit_bcc()
674 off = far ? 6 : (rvoff >> 1); in emit_bcc()
716 rvoff -= ninsns_rvoff(e - s); in emit_bcc()
717 emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx); in emit_bcc()
722 static int emit_branch_r32(const s8 *src1, const s8 *src2, s32 rvoff, in emit_branch_r32() argument
734 rvoff -= ninsns_rvoff(e - s); in emit_branch_r32()
736 if (emit_bcc(op, lo(rs1), lo(rs2), rvoff, ctx)) in emit_branch_r32()
958 int s, e, rvoff, i = insn - ctx->prog->insnsi; in bpf_jit_emit_insn() local
1131 rvoff = rv_offset(i, off, ctx); in bpf_jit_emit_insn()
1132 emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx); in bpf_jit_emit_insn()
1208 rvoff = rv_offset(i, off, ctx); in bpf_jit_emit_insn()
1214 rvoff -= ninsns_rvoff(e - s); in bpf_jit_emit_insn()
1218 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1220 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code)); in bpf_jit_emit_insn()
1227 rvoff = epilogue_offset(ctx); in bpf_jit_emit_insn()
1228 emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx); in bpf_jit_emit_insn()