Lines Matching defs:rvoff
227 static void emit_jump_and_link(u8 rd, s32 rvoff, bool force_jalr,
232 if (rvoff && is_21b_int(rvoff) && !force_jalr) {
233 emit(rv_jal(rd, rvoff >> 1), ctx);
237 upper = (rvoff + (1 << 11)) >> 12;
238 lower = rvoff & 0xfff;
564 static int emit_branch_r64(const s8 *src1, const s8 *src2, s32 rvoff,
647 rvoff -= ninsns_rvoff(e - s);
648 emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
652 static int emit_bcc(u8 op, u8 rd, u8 rs, int rvoff, struct rv_jit_context *ctx)
664 } else if (!is_13b_int(rvoff)) {
672 * For a near branch, just use rvoff.
674 off = far ? 6 : (rvoff >> 1);
716 rvoff -= ninsns_rvoff(e - s);
717 emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
722 static int emit_branch_r32(const s8 *src1, const s8 *src2, s32 rvoff,
734 rvoff -= ninsns_rvoff(e - s);
736 if (emit_bcc(op, lo(rs1), lo(rs2), rvoff, ctx))
961 int s, e, rvoff, i = insn - ctx->prog->insnsi;
1134 rvoff = rv_offset(i, off, ctx);
1135 emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx);
1211 rvoff = rv_offset(i, off, ctx);
1217 rvoff -= ninsns_rvoff(e - s);
1221 emit_branch_r64(dst, src, rvoff, ctx, BPF_OP(code));
1223 emit_branch_r32(dst, src, rvoff, ctx, BPF_OP(code));
1230 rvoff = epilogue_offset(ctx);
1231 emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx);