Lines Matching full:emit

117 		emit(rv_lui(rd, upper), ctx);  in emit_imm()
118 emit(rv_addi(rd, rd, lower), ctx); in emit_imm()
120 emit(rv_addi(rd, RV_REG_ZERO, lower), ctx); in emit_imm()
126 /* Emit immediate into lower bits. */ in emit_imm32()
131 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_imm32()
133 emit(rv_addi(hi(rd), RV_REG_ZERO, -1), ctx); in emit_imm32()
150 emit(rv_addi(RV_REG_A0, lo(r0), 0), ctx); in __build_epilogue()
151 emit(rv_addi(RV_REG_A1, hi(r0), 0), ctx); in __build_epilogue()
155 emit(rv_lw(RV_REG_RA, stack_adjust - 4, RV_REG_SP), ctx); in __build_epilogue()
156 emit(rv_lw(RV_REG_FP, stack_adjust - 8, RV_REG_SP), ctx); in __build_epilogue()
157 emit(rv_lw(RV_REG_S1, stack_adjust - 12, RV_REG_SP), ctx); in __build_epilogue()
158 emit(rv_lw(RV_REG_S2, stack_adjust - 16, RV_REG_SP), ctx); in __build_epilogue()
159 emit(rv_lw(RV_REG_S3, stack_adjust - 20, RV_REG_SP), ctx); in __build_epilogue()
160 emit(rv_lw(RV_REG_S4, stack_adjust - 24, RV_REG_SP), ctx); in __build_epilogue()
161 emit(rv_lw(RV_REG_S5, stack_adjust - 28, RV_REG_SP), ctx); in __build_epilogue()
162 emit(rv_lw(RV_REG_S6, stack_adjust - 32, RV_REG_SP), ctx); in __build_epilogue()
163 emit(rv_lw(RV_REG_S7, stack_adjust - 36, RV_REG_SP), ctx); in __build_epilogue()
165 emit(rv_addi(RV_REG_SP, RV_REG_SP, stack_adjust), ctx); in __build_epilogue()
174 emit(rv_jalr(RV_REG_ZERO, RV_REG_T0, 4), ctx); in __build_epilogue()
176 emit(rv_jalr(RV_REG_ZERO, RV_REG_RA, 0), ctx); in __build_epilogue()
189 emit(rv_lw(hi(tmp), hi(reg), RV_REG_FP), ctx); in bpf_get_reg64()
190 emit(rv_lw(lo(tmp), lo(reg), RV_REG_FP), ctx); in bpf_get_reg64()
200 emit(rv_sw(RV_REG_FP, hi(reg), hi(src)), ctx); in bpf_put_reg64()
201 emit(rv_sw(RV_REG_FP, lo(reg), lo(src)), ctx); in bpf_put_reg64()
209 emit(rv_lw(lo(tmp), lo(reg), RV_REG_FP), ctx); in bpf_get_reg32()
219 emit(rv_sw(RV_REG_FP, lo(reg), lo(src)), ctx); in bpf_put_reg32()
221 emit(rv_sw(RV_REG_FP, hi(reg), RV_REG_ZERO), ctx); in bpf_put_reg32()
223 emit(rv_addi(hi(reg), RV_REG_ZERO, 0), ctx); in bpf_put_reg32()
233 emit(rv_jal(rd, rvoff >> 1), ctx); in emit_jump_and_link()
239 emit(rv_auipc(RV_REG_T1, upper), ctx); in emit_jump_and_link()
240 emit(rv_jalr(rd, RV_REG_T1, lower), ctx); in emit_jump_and_link()
255 emit(rv_andi(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
258 emit(rv_and(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i64()
261 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_alu_i64()
265 emit(rv_ori(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
268 emit(rv_or(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i64()
271 emit(rv_ori(hi(rd), RV_REG_ZERO, -1), ctx); in emit_alu_i64()
275 emit(rv_xori(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
278 emit(rv_xor(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i64()
281 emit(rv_xori(hi(rd), hi(rd), -1), ctx); in emit_alu_i64()
285 emit(rv_slli(hi(rd), lo(rd), imm - 32), ctx); in emit_alu_i64()
286 emit(rv_addi(lo(rd), RV_REG_ZERO, 0), ctx); in emit_alu_i64()
290 emit(rv_srli(RV_REG_T0, lo(rd), 32 - imm), ctx); in emit_alu_i64()
291 emit(rv_slli(hi(rd), hi(rd), imm), ctx); in emit_alu_i64()
292 emit(rv_or(hi(rd), RV_REG_T0, hi(rd)), ctx); in emit_alu_i64()
293 emit(rv_slli(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
298 emit(rv_srli(lo(rd), hi(rd), imm - 32), ctx); in emit_alu_i64()
299 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_alu_i64()
303 emit(rv_slli(RV_REG_T0, hi(rd), 32 - imm), ctx); in emit_alu_i64()
304 emit(rv_srli(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
305 emit(rv_or(lo(rd), RV_REG_T0, lo(rd)), ctx); in emit_alu_i64()
306 emit(rv_srli(hi(rd), hi(rd), imm), ctx); in emit_alu_i64()
311 emit(rv_srai(lo(rd), hi(rd), imm - 32), ctx); in emit_alu_i64()
312 emit(rv_srai(hi(rd), hi(rd), 31), ctx); in emit_alu_i64()
316 emit(rv_slli(RV_REG_T0, hi(rd), 32 - imm), ctx); in emit_alu_i64()
317 emit(rv_srli(lo(rd), lo(rd), imm), ctx); in emit_alu_i64()
318 emit(rv_or(lo(rd), RV_REG_T0, lo(rd)), ctx); in emit_alu_i64()
319 emit(rv_srai(hi(rd), hi(rd), imm), ctx); in emit_alu_i64()
339 emit(rv_addi(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
342 emit(rv_add(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
347 emit(rv_addi(lo(rd), lo(rd), -imm), ctx); in emit_alu_i32()
350 emit(rv_sub(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
355 emit(rv_andi(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
358 emit(rv_and(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
363 emit(rv_ori(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
366 emit(rv_or(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
371 emit(rv_xori(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
374 emit(rv_xor(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
379 emit(rv_slli(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
382 emit(rv_sll(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
387 emit(rv_srli(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
390 emit(rv_srl(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
395 emit(rv_srai(lo(rd), lo(rd), imm), ctx); in emit_alu_i32()
398 emit(rv_sra(lo(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_i32()
416 emit(rv_addi(lo(rd), lo(rs), 0), ctx); in emit_alu_r64()
417 emit(rv_addi(hi(rd), hi(rs), 0), ctx); in emit_alu_r64()
421 emit(rv_srli(RV_REG_T0, lo(rd), 31), ctx); in emit_alu_r64()
422 emit(rv_slli(hi(rd), hi(rd), 1), ctx); in emit_alu_r64()
423 emit(rv_or(hi(rd), RV_REG_T0, hi(rd)), ctx); in emit_alu_r64()
424 emit(rv_slli(lo(rd), lo(rd), 1), ctx); in emit_alu_r64()
426 emit(rv_add(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
427 emit(rv_sltu(RV_REG_T0, lo(rd), lo(rs)), ctx); in emit_alu_r64()
428 emit(rv_add(hi(rd), hi(rd), hi(rs)), ctx); in emit_alu_r64()
429 emit(rv_add(hi(rd), hi(rd), RV_REG_T0), ctx); in emit_alu_r64()
433 emit(rv_sub(RV_REG_T1, hi(rd), hi(rs)), ctx); in emit_alu_r64()
434 emit(rv_sltu(RV_REG_T0, lo(rd), lo(rs)), ctx); in emit_alu_r64()
435 emit(rv_sub(hi(rd), RV_REG_T1, RV_REG_T0), ctx); in emit_alu_r64()
436 emit(rv_sub(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
439 emit(rv_and(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
440 emit(rv_and(hi(rd), hi(rd), hi(rs)), ctx); in emit_alu_r64()
443 emit(rv_or(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
444 emit(rv_or(hi(rd), hi(rd), hi(rs)), ctx); in emit_alu_r64()
447 emit(rv_xor(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
448 emit(rv_xor(hi(rd), hi(rd), hi(rs)), ctx); in emit_alu_r64()
451 emit(rv_mul(RV_REG_T0, hi(rs), lo(rd)), ctx); in emit_alu_r64()
452 emit(rv_mul(hi(rd), hi(rd), lo(rs)), ctx); in emit_alu_r64()
453 emit(rv_mulhu(RV_REG_T1, lo(rd), lo(rs)), ctx); in emit_alu_r64()
454 emit(rv_add(hi(rd), hi(rd), RV_REG_T0), ctx); in emit_alu_r64()
455 emit(rv_mul(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
456 emit(rv_add(hi(rd), hi(rd), RV_REG_T1), ctx); in emit_alu_r64()
459 emit(rv_addi(RV_REG_T0, lo(rs), -32), ctx); in emit_alu_r64()
460 emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx); in emit_alu_r64()
461 emit(rv_sll(hi(rd), lo(rd), RV_REG_T0), ctx); in emit_alu_r64()
462 emit(rv_addi(lo(rd), RV_REG_ZERO, 0), ctx); in emit_alu_r64()
463 emit(rv_jal(RV_REG_ZERO, 16), ctx); in emit_alu_r64()
464 emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx); in emit_alu_r64()
465 emit(rv_srli(RV_REG_T0, lo(rd), 1), ctx); in emit_alu_r64()
466 emit(rv_sub(RV_REG_T1, RV_REG_T1, lo(rs)), ctx); in emit_alu_r64()
467 emit(rv_srl(RV_REG_T0, RV_REG_T0, RV_REG_T1), ctx); in emit_alu_r64()
468 emit(rv_sll(hi(rd), hi(rd), lo(rs)), ctx); in emit_alu_r64()
469 emit(rv_or(hi(rd), RV_REG_T0, hi(rd)), ctx); in emit_alu_r64()
470 emit(rv_sll(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
473 emit(rv_addi(RV_REG_T0, lo(rs), -32), ctx); in emit_alu_r64()
474 emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx); in emit_alu_r64()
475 emit(rv_srl(lo(rd), hi(rd), RV_REG_T0), ctx); in emit_alu_r64()
476 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_alu_r64()
477 emit(rv_jal(RV_REG_ZERO, 16), ctx); in emit_alu_r64()
478 emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx); in emit_alu_r64()
479 emit(rv_slli(RV_REG_T0, hi(rd), 1), ctx); in emit_alu_r64()
480 emit(rv_sub(RV_REG_T1, RV_REG_T1, lo(rs)), ctx); in emit_alu_r64()
481 emit(rv_sll(RV_REG_T0, RV_REG_T0, RV_REG_T1), ctx); in emit_alu_r64()
482 emit(rv_srl(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
483 emit(rv_or(lo(rd), RV_REG_T0, lo(rd)), ctx); in emit_alu_r64()
484 emit(rv_srl(hi(rd), hi(rd), lo(rs)), ctx); in emit_alu_r64()
487 emit(rv_addi(RV_REG_T0, lo(rs), -32), ctx); in emit_alu_r64()
488 emit(rv_blt(RV_REG_T0, RV_REG_ZERO, 8), ctx); in emit_alu_r64()
489 emit(rv_sra(lo(rd), hi(rd), RV_REG_T0), ctx); in emit_alu_r64()
490 emit(rv_srai(hi(rd), hi(rd), 31), ctx); in emit_alu_r64()
491 emit(rv_jal(RV_REG_ZERO, 16), ctx); in emit_alu_r64()
492 emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 31), ctx); in emit_alu_r64()
493 emit(rv_slli(RV_REG_T0, hi(rd), 1), ctx); in emit_alu_r64()
494 emit(rv_sub(RV_REG_T1, RV_REG_T1, lo(rs)), ctx); in emit_alu_r64()
495 emit(rv_sll(RV_REG_T0, RV_REG_T0, RV_REG_T1), ctx); in emit_alu_r64()
496 emit(rv_srl(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r64()
497 emit(rv_or(lo(rd), RV_REG_T0, lo(rd)), ctx); in emit_alu_r64()
498 emit(rv_sra(hi(rd), hi(rd), lo(rs)), ctx); in emit_alu_r64()
501 emit(rv_sub(lo(rd), RV_REG_ZERO, lo(rd)), ctx); in emit_alu_r64()
502 emit(rv_sltu(RV_REG_T0, RV_REG_ZERO, lo(rd)), ctx); in emit_alu_r64()
503 emit(rv_sub(hi(rd), RV_REG_ZERO, hi(rd)), ctx); in emit_alu_r64()
504 emit(rv_sub(hi(rd), hi(rd), RV_REG_T0), ctx); in emit_alu_r64()
521 emit(rv_addi(lo(rd), lo(rs), 0), ctx); in emit_alu_r32()
524 emit(rv_add(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
527 emit(rv_sub(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
530 emit(rv_and(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
533 emit(rv_or(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
536 emit(rv_xor(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
539 emit(rv_mul(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
542 emit(rv_divu(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
545 emit(rv_remu(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
548 emit(rv_sll(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
551 emit(rv_srl(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
554 emit(rv_sra(lo(rd), lo(rd), lo(rs)), ctx); in emit_alu_r32()
557 emit(rv_sub(lo(rd), RV_REG_ZERO, lo(rd)), ctx); in emit_alu_r32()
587 emit(rv_bne(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
588 emit(rv_bne(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
591 emit(rv_bgtu(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
592 emit(rv_bltu(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
593 emit(rv_bleu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
596 emit(rv_bltu(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
597 emit(rv_bgtu(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
598 emit(rv_bgeu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
601 emit(rv_bgtu(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
602 emit(rv_bltu(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
603 emit(rv_bltu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
606 emit(rv_bltu(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
607 emit(rv_bgtu(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
608 emit(rv_bgtu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
611 emit(rv_bne(hi(rs1), hi(rs2), JUMP(1)), ctx); in emit_branch_r64()
612 emit(rv_beq(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
615 emit(rv_bgt(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
616 emit(rv_blt(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
617 emit(rv_bleu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
620 emit(rv_blt(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
621 emit(rv_bgt(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
622 emit(rv_bgeu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
625 emit(rv_bgt(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
626 emit(rv_blt(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
627 emit(rv_bltu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
630 emit(rv_blt(hi(rs1), hi(rs2), JUMP(2)), ctx); in emit_branch_r64()
631 emit(rv_bgt(hi(rs1), hi(rs2), NO_JUMP(1)), ctx); in emit_branch_r64()
632 emit(rv_bgtu(lo(rs1), lo(rs2), NO_JUMP(0)), ctx); in emit_branch_r64()
635 emit(rv_and(RV_REG_T0, hi(rs1), hi(rs2)), ctx); in emit_branch_r64()
636 emit(rv_bne(RV_REG_T0, RV_REG_ZERO, JUMP(2)), ctx); in emit_branch_r64()
637 emit(rv_and(RV_REG_T0, lo(rs1), lo(rs2)), ctx); in emit_branch_r64()
638 emit(rv_beq(RV_REG_T0, RV_REG_ZERO, NO_JUMP(0)), ctx); in emit_branch_r64()
678 emit(rv_beq(rd, rs, off), ctx); in emit_bcc()
681 emit(rv_bgtu(rd, rs, off), ctx); in emit_bcc()
684 emit(rv_bltu(rd, rs, off), ctx); in emit_bcc()
687 emit(rv_bgeu(rd, rs, off), ctx); in emit_bcc()
690 emit(rv_bleu(rd, rs, off), ctx); in emit_bcc()
693 emit(rv_bne(rd, rs, off), ctx); in emit_bcc()
696 emit(rv_bgt(rd, rs, off), ctx); in emit_bcc()
699 emit(rv_blt(rd, rs, off), ctx); in emit_bcc()
702 emit(rv_bge(rd, rs, off), ctx); in emit_bcc()
705 emit(rv_ble(rd, rs, off), ctx); in emit_bcc()
708 emit(rv_and(RV_REG_T0, rd, rs), ctx); in emit_bcc()
709 emit(rv_beq(RV_REG_T0, RV_REG_ZERO, off), ctx); in emit_bcc()
750 emit(rv_addi(RV_REG_SP, RV_REG_SP, -16), ctx); in emit_call()
751 emit(rv_sw(RV_REG_SP, 0, lo(r5)), ctx); in emit_call()
752 emit(rv_sw(RV_REG_SP, 4, hi(r5)), ctx); in emit_call()
755 emit(rv_addi(RV_REG_TCC_SAVED, RV_REG_TCC, 0), ctx); in emit_call()
762 emit(rv_lui(RV_REG_T1, upper), ctx); in emit_call()
763 emit(rv_jalr(RV_REG_RA, RV_REG_T1, lower), ctx); in emit_call()
766 emit(rv_addi(RV_REG_TCC, RV_REG_TCC_SAVED, 0), ctx); in emit_call()
769 emit(rv_addi(lo(r0), RV_REG_A0, 0), ctx); in emit_call()
770 emit(rv_addi(hi(r0), RV_REG_A1, 0), ctx); in emit_call()
771 emit(rv_addi(RV_REG_SP, RV_REG_SP, 16), ctx); in emit_call()
792 emit(rv_lw(RV_REG_T1, off, lo(arr_reg)), ctx); in emit_bpf_tail_call()
805 emit(rv_addi(RV_REG_TCC, RV_REG_TCC, -1), ctx); in emit_bpf_tail_call()
814 emit(rv_slli(RV_REG_T0, lo(idx_reg), 2), ctx); in emit_bpf_tail_call()
815 emit(rv_add(RV_REG_T0, RV_REG_T0, lo(arr_reg)), ctx); in emit_bpf_tail_call()
819 emit(rv_lw(RV_REG_T0, off, RV_REG_T0), ctx); in emit_bpf_tail_call()
830 emit(rv_lw(RV_REG_T0, off, RV_REG_T0), ctx); in emit_bpf_tail_call()
845 emit(rv_add(RV_REG_T0, RV_REG_T0, lo(rs)), ctx); in emit_load_r64()
849 emit(rv_lbu(lo(rd), 0, RV_REG_T0), ctx); in emit_load_r64()
851 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_load_r64()
854 emit(rv_lhu(lo(rd), 0, RV_REG_T0), ctx); in emit_load_r64()
856 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_load_r64()
859 emit(rv_lw(lo(rd), 0, RV_REG_T0), ctx); in emit_load_r64()
861 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_load_r64()
864 emit(rv_lw(lo(rd), 0, RV_REG_T0), ctx); in emit_load_r64()
865 emit(rv_lw(hi(rd), 4, RV_REG_T0), ctx); in emit_load_r64()
886 emit(rv_add(RV_REG_T0, RV_REG_T0, lo(rd)), ctx); in emit_store_r64()
890 emit(rv_sb(RV_REG_T0, 0, lo(rs)), ctx); in emit_store_r64()
893 emit(rv_sh(RV_REG_T0, 0, lo(rs)), ctx); in emit_store_r64()
898 emit(rv_sw(RV_REG_T0, 0, lo(rs)), ctx); in emit_store_r64()
901 emit(rv_amoadd_w(RV_REG_ZERO, lo(rs), RV_REG_T0, 0, 0), in emit_store_r64()
907 emit(rv_sw(RV_REG_T0, 0, lo(rs)), ctx); in emit_store_r64()
908 emit(rv_sw(RV_REG_T0, 4, hi(rs)), ctx); in emit_store_r64()
917 emit(rv_slli(rd, rd, 16), ctx); in emit_rev16()
918 emit(rv_slli(RV_REG_T1, rd, 8), ctx); in emit_rev16()
919 emit(rv_srli(rd, rd, 8), ctx); in emit_rev16()
920 emit(rv_add(RV_REG_T1, rd, RV_REG_T1), ctx); in emit_rev16()
921 emit(rv_srli(rd, RV_REG_T1, 16), ctx); in emit_rev16()
926 emit(rv_addi(RV_REG_T1, RV_REG_ZERO, 0), ctx); in emit_rev32()
927 emit(rv_andi(RV_REG_T0, rd, 255), ctx); in emit_rev32()
928 emit(rv_add(RV_REG_T1, RV_REG_T1, RV_REG_T0), ctx); in emit_rev32()
929 emit(rv_slli(RV_REG_T1, RV_REG_T1, 8), ctx); in emit_rev32()
930 emit(rv_srli(rd, rd, 8), ctx); in emit_rev32()
931 emit(rv_andi(RV_REG_T0, rd, 255), ctx); in emit_rev32()
932 emit(rv_add(RV_REG_T1, RV_REG_T1, RV_REG_T0), ctx); in emit_rev32()
933 emit(rv_slli(RV_REG_T1, RV_REG_T1, 8), ctx); in emit_rev32()
934 emit(rv_srli(rd, rd, 8), ctx); in emit_rev32()
935 emit(rv_andi(RV_REG_T0, rd, 255), ctx); in emit_rev32()
936 emit(rv_add(RV_REG_T1, RV_REG_T1, RV_REG_T0), ctx); in emit_rev32()
937 emit(rv_slli(RV_REG_T1, RV_REG_T1, 8), ctx); in emit_rev32()
938 emit(rv_srli(rd, rd, 8), ctx); in emit_rev32()
939 emit(rv_andi(RV_REG_T0, rd, 255), ctx); in emit_rev32()
940 emit(rv_add(RV_REG_T1, RV_REG_T1, RV_REG_T0), ctx); in emit_rev32()
941 emit(rv_addi(rd, RV_REG_T1, 0), ctx); in emit_rev32()
950 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in emit_zext64()
1078 emit(rv_slli(lo(rd), lo(rd), 16), ctx); in bpf_jit_emit_insn()
1079 emit(rv_srli(lo(rd), lo(rd), 16), ctx); in bpf_jit_emit_insn()
1083 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in bpf_jit_emit_insn()
1105 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in bpf_jit_emit_insn()
1110 emit(rv_addi(hi(rd), RV_REG_ZERO, 0), ctx); in bpf_jit_emit_insn()
1114 emit(rv_addi(RV_REG_T0, lo(rd), 0), ctx); in bpf_jit_emit_insn()
1115 emit(rv_addi(lo(rd), hi(rd), 0), ctx); in bpf_jit_emit_insn()
1116 emit(rv_addi(hi(rd), RV_REG_T0, 0), ctx); in bpf_jit_emit_insn()
1325 emit(rv_addi(RV_REG_TCC, RV_REG_ZERO, MAX_TAIL_CALL_CNT), ctx); in bpf_jit_build_prologue()
1327 emit(rv_addi(RV_REG_SP, RV_REG_SP, -stack_adjust), ctx); in bpf_jit_build_prologue()
1330 emit(rv_sw(RV_REG_SP, stack_adjust - 4, RV_REG_RA), ctx); in bpf_jit_build_prologue()
1331 emit(rv_sw(RV_REG_SP, stack_adjust - 8, RV_REG_FP), ctx); in bpf_jit_build_prologue()
1332 emit(rv_sw(RV_REG_SP, stack_adjust - 12, RV_REG_S1), ctx); in bpf_jit_build_prologue()
1333 emit(rv_sw(RV_REG_SP, stack_adjust - 16, RV_REG_S2), ctx); in bpf_jit_build_prologue()
1334 emit(rv_sw(RV_REG_SP, stack_adjust - 20, RV_REG_S3), ctx); in bpf_jit_build_prologue()
1335 emit(rv_sw(RV_REG_SP, stack_adjust - 24, RV_REG_S4), ctx); in bpf_jit_build_prologue()
1336 emit(rv_sw(RV_REG_SP, stack_adjust - 28, RV_REG_S5), ctx); in bpf_jit_build_prologue()
1337 emit(rv_sw(RV_REG_SP, stack_adjust - 32, RV_REG_S6), ctx); in bpf_jit_build_prologue()
1338 emit(rv_sw(RV_REG_SP, stack_adjust - 36, RV_REG_S7), ctx); in bpf_jit_build_prologue()
1341 emit(rv_addi(RV_REG_FP, RV_REG_SP, stack_adjust), ctx); in bpf_jit_build_prologue()
1344 emit(rv_addi(lo(fp), RV_REG_SP, bpf_stack_adjust), ctx); in bpf_jit_build_prologue()
1345 emit(rv_addi(hi(fp), RV_REG_ZERO, 0), ctx); in bpf_jit_build_prologue()
1348 emit(rv_addi(lo(r1), RV_REG_A0, 0), ctx); in bpf_jit_build_prologue()
1349 emit(rv_addi(hi(r1), RV_REG_ZERO, 0), ctx); in bpf_jit_build_prologue()