RV_REG_ZERO
emit(rv_addi(rd, RV_REG_ZERO, imm), ctx);
return rv_cr_insn(0x8, rs1, RV_REG_ZERO, 0x2);
return rv_cr_insn(0x9, rs1, RV_REG_ZERO, 0x2);
return rv_r_insn(0x04, RV_REG_ZERO, rs1, 0, rd, 0x3b);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx);
emit(rv_addi(rd, RV_REG_ZERO, lower), ctx);
emit_jump_and_link(RV_REG_ZERO, rvoff, false, ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(RV_REG_TCC, RV_REG_ZERO, MAX_TAIL_CALL_CNT), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, -1), ctx);
emit(rv_addi(hi(fp), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(r1), RV_REG_ZERO, 0), ctx);
emit(rv_jalr(RV_REG_ZERO, RV_REG_T0, 4), ctx);
emit(rv_jalr(RV_REG_ZERO, RV_REG_RA, 0), ctx);
emit(rv_sw(RV_REG_FP, hi(reg), RV_REG_ZERO), ctx);
emit(rv_addi(hi(reg), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_ori(hi(rd), RV_REG_ZERO, -1), ctx);
emit(rv_addi(lo(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx);
emit(rv_addi(lo(rd), RV_REG_ZERO, 0), ctx);
emit(rv_jal(RV_REG_ZERO, 16), ctx);
emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx);
emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_jal(RV_REG_ZERO, 16), ctx);
emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx);
emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx);
emit(rv_jal(RV_REG_ZERO, 16), ctx);
emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx);
emit(rv_sub(lo(rd), RV_REG_ZERO, lo(rd)), ctx);
emit(rv_sltu(RV_REG_T0, RV_REG_ZERO, lo(rd)), ctx);
emit(rv_sub(hi(rd), RV_REG_ZERO, hi(rd)), ctx);
emit(rv_sub(lo(rd), RV_REG_ZERO, lo(rd)), ctx);
emit(rv_bne(RV_REG_T0, RV_REG_ZERO, JUMP(2)), ctx);
emit(rv_beq(RV_REG_T0, RV_REG_ZERO, NO_JUMP(0)), ctx);
emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
emit(rv_beq(RV_REG_T0, RV_REG_ZERO, off), ctx);
emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
emit_bcc(BPF_JSLT, RV_REG_TCC, RV_REG_ZERO, off, ctx);
emit_bcc(BPF_JEQ, RV_REG_T0, RV_REG_ZERO, off, ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit(rv_amoadd_w(RV_REG_ZERO, lo(rs), RV_REG_T0, 0, 0),
emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 0), ctx);
emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx);
emit_sd(RV_REG_FP, -cookie_off + 8 * i, RV_REG_ZERO, ctx);
emit_sd(RV_REG_FP, -retval_off, RV_REG_ZERO, ctx);
emit_sd(RV_REG_FP, -retval_off, RV_REG_ZERO, ctx);
insn = rv_bne(RV_REG_T1, RV_REG_ZERO, offset >> 1);
emit_jalr(RV_REG_ZERO, RV_REG_RA, 0, ctx);
emit_jalr(RV_REG_ZERO, RV_REG_T0, 0, ctx);
emit_jalr(RV_REG_ZERO, RV_REG_RA, 0, ctx);
emit(rv_beq(RV_REG_T1, RV_REG_ZERO, 4), ctx);
emit_sub(rd, RV_REG_ZERO, rd, ctx);
ret = emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
emit_branch(BPF_JNE, RV_REG_T1, RV_REG_ZERO, rvoff, ctx);
rs = imm ? RV_REG_T1 : RV_REG_ZERO;
emit_branch(BPF_JNE, RV_REG_T1, RV_REG_ZERO, rvoff, ctx);
ret = emit_jump_and_link(RV_REG_ZERO, rvoff, true, ctx);
emit(rv_addi(RV_REG_TCC, RV_REG_ZERO, MAX_TAIL_CALL_CNT), ctx);
emit_jalr(RV_REG_ZERO, is_tail_call ? RV_REG_T3 : RV_REG_RA,
emit(rv_jal(RV_REG_ZERO, rvoff >> 1), ctx);
emit(rv_jalr(RV_REG_ZERO, RV_REG_T1, lower), ctx);
emit_branch(BPF_JSLT, RV_REG_TCC, RV_REG_ZERO, off, ctx);
emit_branch(BPF_JEQ, RV_REG_T2, RV_REG_ZERO, off, ctx);
emit(is64 ? rv_amoadd_d(RV_REG_ZERO, rs, rd, 0, 0) :
rv_amoadd_w(RV_REG_ZERO, rs, rd, 0, 0), ctx);
emit(is64 ? rv_amoand_d(RV_REG_ZERO, rs, rd, 0, 0) :
rv_amoand_w(RV_REG_ZERO, rs, rd, 0, 0), ctx);
emit(is64 ? rv_amoor_d(RV_REG_ZERO, rs, rd, 0, 0) :
rv_amoor_w(RV_REG_ZERO, rs, rd, 0, 0), ctx);
emit(is64 ? rv_amoxor_d(RV_REG_ZERO, rs, rd, 0, 0) :
rv_amoxor_w(RV_REG_ZERO, rs, rd, 0, 0), ctx);
return emit_jump_and_link(is_call ? RV_REG_T0 : RV_REG_ZERO, rvoff, false, &ctx);
emit_sd(RV_REG_FP, -run_ctx_off + cookie_off, RV_REG_ZERO, ctx);
u32 insn = rv_beq(RV_REG_A0, RV_REG_ZERO, offset >> 1);