Lines Matching defs:emit

65 static inline void emit(const u32 insn, struct jit_ctx *ctx)
81 emit(A64_MOVN(is64, reg, (u16)~lo, 0), ctx);
83 emit(A64_MOVN(is64, reg, (u16)~hi, 16), ctx);
85 emit(A64_MOVK(is64, reg, lo, 0), ctx);
88 emit(A64_MOVZ(is64, reg, lo, 0), ctx);
90 emit(A64_MOVK(is64, reg, hi, 16), ctx);
116 emit(A64_MOVN(1, reg, (rev_tmp >> shift) & 0xffff, shift), ctx);
118 emit(A64_MOVZ(1, reg, (nrm_tmp >> shift) & 0xffff, shift), ctx);
122 emit(A64_MOVK(1, reg, (nrm_tmp >> shift) & 0xffff, shift), ctx);
138 emit(A64_MOVN(1, reg, ~tmp & 0xffff, shift), ctx);
142 emit(A64_MOVK(1, reg, tmp & 0xffff, shift), ctx);
228 emit(A64_BTI_C, ctx);
231 emit(A64_PUSH(A64_FP, A64_LR, A64_SP), ctx);
232 emit(A64_MOV(1, A64_FP, A64_SP), ctx);
235 emit(A64_PUSH(r6, r7, A64_SP), ctx);
236 emit(A64_PUSH(r8, r9, A64_SP), ctx);
237 emit(A64_PUSH(fp, tcc, A64_SP), ctx);
240 emit(A64_MOV(1, fp, A64_SP), ctx);
244 emit(A64_MOVZ(1, tcc, 0, 0), ctx);
255 emit(A64_BTI_J, ctx);
261 emit(A64_SUB_I(1, A64_SP, A64_SP, ctx->stack_size), ctx);
285 emit(A64_LDR32(tmp, r2, tmp), ctx);
286 emit(A64_MOV(0, r3, r3), ctx);
287 emit(A64_CMP(0, r3, tmp), ctx);
288 emit(A64_B_(A64_COND_CS, jmp_offset), ctx);
295 emit(A64_CMP(1, tcc, tmp), ctx);
296 emit(A64_B_(A64_COND_HI, jmp_offset), ctx);
297 emit(A64_ADD_I(1, tcc, tcc, 1), ctx);
305 emit(A64_ADD(1, tmp, r2, tmp), ctx);
306 emit(A64_LSL(1, prg, r3, 3), ctx);
307 emit(A64_LDR64(prg, tmp, prg), ctx);
308 emit(A64_CBZ(1, prg, jmp_offset), ctx);
313 emit(A64_LDR64(tmp, prg, tmp), ctx);
314 emit(A64_ADD_I(1, tmp, tmp, sizeof(u32) * PROLOGUE_OFFSET), ctx);
315 emit(A64_ADD_I(1, A64_SP, A64_SP, ctx->stack_size), ctx);
316 emit(A64_BR(tmp), ctx);
341 emit(A64_ADD_I(1, A64_SP, A64_SP, ctx->stack_size), ctx);
344 emit(A64_POP(fp, A64_R(26), A64_SP), ctx);
347 emit(A64_POP(r8, r9, A64_SP), ctx);
348 emit(A64_POP(r6, r7, A64_SP), ctx);
351 emit(A64_POP(A64_FP, A64_LR, A64_SP), ctx);
354 emit(A64_MOV(1, A64_R(0), r0), ctx);
356 emit(A64_RET(A64_LR), ctx);
461 emit(A64_MOV(is64, dst, src), ctx);
466 emit(A64_ADD(is64, dst, dst, src), ctx);
470 emit(A64_SUB(is64, dst, dst, src), ctx);
474 emit(A64_AND(is64, dst, dst, src), ctx);
478 emit(A64_ORR(is64, dst, dst, src), ctx);
482 emit(A64_EOR(is64, dst, dst, src), ctx);
486 emit(A64_MUL(is64, dst, dst, src), ctx);
494 emit(A64_UDIV(is64, dst, dst, src), ctx);
497 emit(A64_UDIV(is64, tmp, dst, src), ctx);
498 emit(A64_MSUB(is64, dst, dst, tmp, src), ctx);
504 emit(A64_LSLV(is64, dst, dst, src), ctx);
508 emit(A64_LSRV(is64, dst, dst, src), ctx);
512 emit(A64_ASRV(is64, dst, dst, src), ctx);
517 emit(A64_NEG(is64, dst, dst), ctx);
531 emit(A64_REV16(is64, dst, dst), ctx);
533 emit(A64_UXTH(is64, dst, dst), ctx);
536 emit(A64_REV32(is64, dst, dst), ctx);
540 emit(A64_REV64(dst, dst), ctx);
548 emit(A64_UXTH(is64, dst, dst), ctx);
552 emit(A64_UXTW(is64, dst, dst), ctx);
568 emit(A64_ADD_I(is64, dst, dst, imm), ctx);
570 emit(A64_SUB_I(is64, dst, dst, -imm), ctx);
573 emit(A64_ADD(is64, dst, dst, tmp), ctx);
579 emit(A64_SUB_I(is64, dst, dst, imm), ctx);
581 emit(A64_ADD_I(is64, dst, dst, -imm), ctx);
584 emit(A64_SUB(is64, dst, dst, tmp), ctx);
591 emit(a64_insn, ctx);
594 emit(A64_AND(is64, dst, dst, tmp), ctx);
601 emit(a64_insn, ctx);
604 emit(A64_ORR(is64, dst, dst, tmp), ctx);
611 emit(a64_insn, ctx);
614 emit(A64_EOR(is64, dst, dst, tmp), ctx);
620 emit(A64_MUL(is64, dst, dst, tmp), ctx);
625 emit(A64_UDIV(is64, dst, dst, tmp), ctx);
630 emit(A64_UDIV(is64, tmp, dst, tmp2), ctx);
631 emit(A64_MSUB(is64, dst, dst, tmp, tmp2), ctx);
635 emit(A64_LSL(is64, dst, dst, imm), ctx);
639 emit(A64_LSR(is64, dst, dst, imm), ctx);
643 emit(A64_ASR(is64, dst, dst, imm), ctx);
650 emit(A64_B(jmp_offset), ctx);
673 emit(A64_CMP(is64, dst, src), ctx);
712 emit(A64_B_(jmp_cond, jmp_offset), ctx);
716 emit(A64_TST(is64, dst, src), ctx);
740 emit(A64_CMP_I(is64, dst, imm), ctx);
742 emit(A64_CMN_I(is64, dst, -imm), ctx);
745 emit(A64_CMP(is64, dst, tmp), ctx);
752 emit(a64_insn, ctx);
755 emit(A64_TST(is64, dst, tmp), ctx);
770 emit(A64_BLR(tmp), ctx);
771 emit(A64_MOV(1, r0, A64_R(0)), ctx);
787 emit(A64_B(jmp_offset), ctx);
814 emit(A64_LDR32(dst, src, tmp), ctx);
817 emit(A64_LDRH(dst, src, tmp), ctx);
820 emit(A64_LDRB(dst, src, tmp), ctx);
823 emit(A64_LDR64(dst, src, tmp), ctx);
855 emit(A64_STR32(tmp, dst, tmp2), ctx);
858 emit(A64_STRH(tmp, dst, tmp2), ctx);
861 emit(A64_STRB(tmp, dst, tmp2), ctx);
864 emit(A64_STR64(tmp, dst, tmp2), ctx);
877 emit(A64_STR32(src, dst, tmp), ctx);
880 emit(A64_STRH(src, dst, tmp), ctx);
883 emit(A64_STRB(src, dst, tmp), ctx);
886 emit(A64_STR64(src, dst, tmp), ctx);
899 emit(A64_ADD(1, tmp, tmp, dst), ctx);
903 emit(A64_STADD(isdw, reg, src), ctx);
905 emit(A64_LDXR(isdw, tmp2, reg), ctx);
906 emit(A64_ADD(isdw, tmp2, tmp2, src), ctx);
907 emit(A64_STXR(isdw, tmp2, reg, tmp3), ctx);
910 emit(A64_CBNZ(0, tmp3, jmp_offset), ctx);