Lines Matching refs:compiler

200 static sljit_s32 push_inst16(struct sljit_compiler *compiler, sljit_ins inst)  in push_inst16()  argument
205 ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_u16)); in push_inst16()
208 compiler->size++; in push_inst16()
212 static sljit_s32 push_inst32(struct sljit_compiler *compiler, sljit_ins inst) in push_inst32() argument
214 sljit_u16 *ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_ins)); in push_inst32()
218 compiler->size += 2; in push_inst32()
222 static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, sljit_s32 dst, slji… in emit_imm32_const() argument
224 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in emit_imm32_const()
226 return push_inst32(compiler, MOVT | RD4(dst) in emit_imm32_const()
360 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
377 CHECK_PTR(check_sljit_generate_code(compiler)); in sljit_generate_code()
378 reverse_buf(compiler); in sljit_generate_code()
380 code = (sljit_u16*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_u16)); in sljit_generate_code()
382 buf = compiler->buf; in sljit_generate_code()
389 label = compiler->labels; in sljit_generate_code()
390 jump = compiler->jumps; in sljit_generate_code()
391 const_ = compiler->consts; in sljit_generate_code()
392 put_label = compiler->put_labels; in sljit_generate_code()
444 SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); in sljit_generate_code()
446 jump = compiler->jumps; in sljit_generate_code()
452 put_label = compiler->put_labels; in sljit_generate_code()
458 compiler->error = SLJIT_ERR_COMPILED; in sljit_generate_code()
459 compiler->executable_offset = executable_offset; in sljit_generate_code()
460 compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16); in sljit_generate_code()
545 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm) in load_immediate() argument
554 return push_inst32(compiler, MOV_WI | RD4(dst) | tmp); in load_immediate()
557 return push_inst32(compiler, MVN_WI | RD4(dst) | tmp); in load_immediate()
561 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) in load_immediate()
566 return push_inst32(compiler, MOVT | RD4(dst) in load_immediate()
577 static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit… in emit_op_imm() argument
588 FAIL_IF(load_immediate(compiler, TMP_REG1, arg1)); in emit_op_imm()
603 return load_immediate(compiler, dst, imm); in emit_op_imm()
606 return load_immediate(compiler, dst, ~imm); in emit_op_imm()
614 return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
616 return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
619 return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
621 return push_inst16(compiler, SUBSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
626 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
628 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
632 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
635 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
640 return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
646 return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg)); in emit_op_imm()
649 return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
654 return push_inst16(compiler, CMPI | IMM8(imm) | RDN3(reg)); in emit_op_imm()
657 return push_inst32(compiler, CMPI_W | RN4(reg) | nimm); in emit_op_imm()
660 return push_inst32(compiler, CMNI_W | RN4(reg) | nimm); in emit_op_imm()
665 return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg)); in emit_op_imm()
667 return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg)); in emit_op_imm()
670 return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst)); in emit_op_imm()
672 return push_inst16(compiler, ADDSI8 | IMM8(nimm) | RDN3(dst)); in emit_op_imm()
677 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm)); in emit_op_imm()
679 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm)); in emit_op_imm()
683 return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
686 return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
693 return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
698 return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
701 return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
706 return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm); in emit_op_imm()
709 return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
714 return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm); in emit_op_imm()
724 return push_inst16(compiler, MOV | SET_REGS44(dst, reg)); in emit_op_imm()
726 return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg)); in emit_op_imm()
727 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg)); in emit_op_imm()
732 return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
733 return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
736 return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
737 return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
740 return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6)); in emit_op_imm()
741 return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm)); in emit_op_imm()
751 FAIL_IF(load_immediate(compiler, arg2, imm)); in emit_op_imm()
756 FAIL_IF(load_immediate(compiler, arg1, imm)); in emit_op_imm()
771 return push_inst16(compiler, MOV | SET_REGS44(dst, arg2)); in emit_op_imm()
775 return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
776 return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
780 return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2)); in emit_op_imm()
781 return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
785 return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
786 return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
790 return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2)); in emit_op_imm()
791 return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2)); in emit_op_imm()
795 return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2)); in emit_op_imm()
796 return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2)); in emit_op_imm()
799 FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2))); in emit_op_imm()
803 return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
805 return push_inst16(compiler, ADD | SET_REGS44(dst, arg2)); in emit_op_imm()
806 return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
809 return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
810 return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
814 return push_inst16(compiler, CMP | RD3(arg1) | RN3(arg2)); in emit_op_imm()
815 return push_inst16(compiler, CMP_X | SET_REGS44(arg1, arg2)); in emit_op_imm()
818 return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2)); in emit_op_imm()
819 return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
822 return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2)); in emit_op_imm()
823 return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
826 return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
828 FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2))); in emit_op_imm()
830 return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst)); in emit_op_imm()
833 return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2)); in emit_op_imm()
835 return push_inst16(compiler, TST | RD3(arg1) | RN3(arg2)); in emit_op_imm()
836 return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
839 return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
840 return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
843 return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2)); in emit_op_imm()
844 return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
847 return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2)); in emit_op_imm()
848 return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
851 return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
852 return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
855 return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2)); in emit_op_imm()
856 return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2)); in emit_op_imm()
945 static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, slji… in emit_set_delta() argument
949 return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
952 return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
957 return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value)); in emit_set_delta()
960 return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value); in emit_set_delta()
965 static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s… in emit_op_mem() argument
978 FAIL_IF(push_inst32(compiler, MOV_WI | RD4(tmp_reg) | tmp)); in emit_op_mem()
979 …return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(tmp_reg) | (argw & 0x… in emit_op_mem()
982 FAIL_IF(load_immediate(compiler, tmp_reg, argw)); in emit_op_mem()
984 return push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(tmp_reg)); in emit_op_mem()
985 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(tmp_reg)); in emit_op_mem()
994 return push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r)); in emit_op_mem()
995 …return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4)… in emit_op_mem()
1001 push_inst32(compiler, ADD_WI | RD4(tmp_reg) | RN4(arg) | tmp); in emit_op_mem()
1009 push_inst32(compiler, SUB_WI | RD4(tmp_reg) | RN4(arg) | tmp); in emit_op_mem()
1033 … return push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | (argw << (6 - tmp))); in emit_op_mem()
1037 return push_inst16(compiler, STR_SP | ((flags & STORE) ? 0 : 0x800) | RDN3(reg) | (argw >> 2)); in emit_op_mem()
1041 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw); in emit_op_mem()
1043 return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | -argw); in emit_op_mem()
1047 FAIL_IF(load_immediate(compiler, tmp_reg, argw)); in emit_op_mem()
1049 return push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(tmp_reg)); in emit_op_mem()
1050 return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(tmp_reg)); in emit_op_mem()
1057 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
1068 …CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds,… in sljit_emit_enter()
1069 set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
1079 ? push_inst32(compiler, PUSH_W | (1 << 14) | push) in sljit_emit_enter()
1080 : push_inst16(compiler, PUSH | (1 << 8) | push)); in sljit_emit_enter()
1085 compiler->local_size = local_size; in sljit_emit_enter()
1095 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(SLJIT_SP) | imm)); in sljit_emit_enter()
1100 FAIL_IF(push_inst16(compiler, SUB_SP | (local_size >> 2))); in sljit_emit_enter()
1102 FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, local_size)); in sljit_emit_enter()
1109 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S0, SLJIT_R0))); in sljit_emit_enter()
1111 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S1, SLJIT_R1))); in sljit_emit_enter()
1113 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S2, SLJIT_R2))); in sljit_emit_enter()
1123 FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); in sljit_emit_enter()
1124 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); in sljit_emit_enter()
1129 FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); in sljit_emit_enter()
1130 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); in sljit_emit_enter()
1134 FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); in sljit_emit_enter()
1140 FAIL_IF(load_immediate(compiler, SLJIT_R3, (local_size >> 12) - 1)); in sljit_emit_enter()
1141 FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); in sljit_emit_enter()
1142 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); in sljit_emit_enter()
1144 FAIL_IF(push_inst16(compiler, SUBSI8 | RDN3(SLJIT_R3) | 1)); in sljit_emit_enter()
1145 FAIL_IF(push_inst16(compiler, BCC | (0x1 << 8) /* not-equal */ | (-7 & 0xff))); in sljit_emit_enter()
1150 FAIL_IF(push_inst32(compiler, LDRI | 0x400 | RT4(TMP_REG2) | RN4(TMP_REG1))); in sljit_emit_enter()
1157 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(TMP_REG1) | imm)); in sljit_emit_enter()
1162 …FAIL_IF(push_inst32(compiler, LDRI | 0x400 | (local_size > 0 ? 0x100 : 0) | RT4(TMP_REG2) | RN4(TM… in sljit_emit_enter()
1164 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_SP, TMP_REG1))); in sljit_emit_enter()
1167 FAIL_IF(push_inst32(compiler, LDRI | 0x500 | RT4(TMP_REG1) | RN4(SLJIT_SP) | local_size)); in sljit_emit_enter()
1173 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
1180 …CHECK(check_sljit_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds… in sljit_set_context()
1181 set_set_context(compiler, options, arg_types, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
1184 compiler->local_size = ((size + local_size + 7) & ~7) - size; in sljit_set_context()
1188 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,… in sljit_emit_return() argument
1194 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
1196 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
1198 if (compiler->local_size > 0) { in sljit_emit_return()
1199 if (compiler->local_size <= (127 << 2)) in sljit_emit_return()
1200 FAIL_IF(push_inst16(compiler, ADD_SP | (compiler->local_size >> 2))); in sljit_emit_return()
1202 FAIL_IF(emit_op_imm(compiler, SLJIT_ADD | ARG2_IMM, SLJIT_SP, SLJIT_SP, compiler->local_size)); in sljit_emit_return()
1205 …tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJ… in sljit_emit_return()
1209 for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) in sljit_emit_return()
1213 ? push_inst32(compiler, POP_W | (1 << 15) | pop) in sljit_emit_return()
1214 : push_inst16(compiler, POP | (1 << 8) | pop); in sljit_emit_return()
1243 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) in sljit_emit_op0() argument
1251 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1256 return push_inst16(compiler, BKPT); in sljit_emit_op0()
1258 return push_inst16(compiler, NOP); in sljit_emit_op0()
1261 return push_inst32(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL) in sljit_emit_op0()
1269 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG1, SLJIT_R0))); in sljit_emit_op0()
1270 …FAIL_IF(push_inst32(compiler, (op == SLJIT_DIVMOD_UW ? UDIV : SDIV) | RD4(SLJIT_R0) | RN4(SLJIT_R0… in sljit_emit_op0()
1271 FAIL_IF(push_inst32(compiler, MUL | RD4(SLJIT_R1) | RN4(SLJIT_R0) | RM4(SLJIT_R1))); in sljit_emit_op0()
1272 return push_inst32(compiler, SUB_W | RD4(SLJIT_R1) | RN4(TMP_REG1) | RM4(SLJIT_R1)); in sljit_emit_op0()
1275 …return push_inst32(compiler, (op == SLJIT_DIV_UW ? UDIV : SDIV) | RD4(SLJIT_R0) | RN4(SLJIT_R0) | … in sljit_emit_op0()
1285 if (compiler->scratches >= 4) in sljit_emit_op0()
1287 if (compiler->scratches >= 3) in sljit_emit_op0()
1293 FAIL_IF(push_inst32(compiler, 0xf84d0d00 | (saved_reg_count >= 3 ? 16 : 8) in sljit_emit_op0()
1297 FAIL_IF(push_inst16(compiler, 0x9001 | (saved_reg_list[1] << 8) /* str rX, [sp, #4] */)); in sljit_emit_op0()
1301 FAIL_IF(push_inst16(compiler, 0x9002 | (saved_reg_list[2] << 8) /* str rX, [sp, #8] */)); in sljit_emit_op0()
1306 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG1, SLJIT_R0))); in sljit_emit_op0()
1307 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R0, SLJIT_R1))); in sljit_emit_op0()
1308 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_R1, TMP_REG1))); in sljit_emit_op0()
1309 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, in sljit_emit_op0()
1312 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, in sljit_emit_op0()
1321 FAIL_IF(push_inst16(compiler, 0x9802 | (saved_reg_list[2] << 8) /* ldr rX, [sp, #8] */)); in sljit_emit_op0()
1325 FAIL_IF(push_inst16(compiler, 0x9801 | (saved_reg_list[1] << 8) /* ldr rX, [sp, #4] */)); in sljit_emit_op0()
1327 return push_inst32(compiler, 0xf85d0b00 | (saved_reg_count >= 3 ? 16 : 8) in sljit_emit_op0()
1340 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op1() argument
1348 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1390 FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG2, srcw)); in sljit_emit_op1()
1392 FAIL_IF(emit_op_mem(compiler, flags, dst_r, src, srcw, TMP_REG1)); in sljit_emit_op1()
1395 return emit_op_imm(compiler, op, dst_r, TMP_REG2, src); in sljit_emit_op1()
1402 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1408 compiler->skip_checks = 1; in sljit_emit_op1()
1410 return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1416 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src, srcw, TMP_REG1)); in sljit_emit_op1()
1420 emit_op_imm(compiler, flags | op, dst_r, TMP_REG2, src); in sljit_emit_op1()
1423 return emit_op_mem(compiler, flags | STORE, dst_r, dst, dstw, TMP_REG2); in sljit_emit_op1()
1427 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op2() argument
1435 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1449 emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src1, src1w, TMP_REG1); in sljit_emit_op2()
1459 emit_op_mem(compiler, WORD_SIZE, src2_reg, src2, src2w, src2_reg); in sljit_emit_op2()
1468 emit_op_imm(compiler, flags | GET_OPCODE(op), dst_reg, src1w, src2w); in sljit_emit_op2()
1472 return emit_op_mem(compiler, WORD_SIZE | STORE, dst_reg, dst, dstw, TMP_REG2); in sljit_emit_op2()
1475 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_src(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_op_src() argument
1479 CHECK(check_sljit_emit_op_src(compiler, op, src, srcw)); in sljit_emit_op_src()
1487 FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG2, src))); in sljit_emit_op_src()
1489 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG2, src, srcw, TMP_REG2)); in sljit_emit_op_src()
1491 return push_inst16(compiler, BX | RN3(TMP_REG2)); in sljit_emit_op_src()
1498 return emit_op_mem(compiler, PRELOAD, TMP_PC, src, srcw, TMP_REG1); in sljit_emit_op_src()
1516 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
1520 CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); in sljit_emit_op_custom()
1523 return push_inst16(compiler, *(sljit_u16*)instruction); in sljit_emit_op_custom()
1524 return push_inst32(compiler, *(sljit_ins*)instruction); in sljit_emit_op_custom()
1533 static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, slji… in emit_fop_mem() argument
1542 …FAIL_IF(push_inst32(compiler, ADD_W | RD4(TMP_REG1) | RN4(arg & REG_MASK) | RM4(OFFS_REG(arg)) | (… in emit_fop_mem()
1549 return push_inst32(compiler, inst | 0x800000 | RN4(arg & REG_MASK) | DD4(reg) | (argw >> 2)); in emit_fop_mem()
1551 return push_inst32(compiler, inst | RN4(arg & REG_MASK) | DD4(reg) | (-argw >> 2)); in emit_fop_mem()
1555 if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
1556 FAIL_IF(compiler->error); in emit_fop_mem()
1557 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg)); in emit_fop_mem()
1561 FAIL_IF(push_inst32(compiler, ADD_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm)); in emit_fop_mem()
1562 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); in emit_fop_mem()
1567 FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm)); in emit_fop_mem()
1568 return push_inst32(compiler, inst | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2)); in emit_fop_mem()
1572 FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); in emit_fop_mem()
1574 FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG1, (arg & REG_MASK)))); in emit_fop_mem()
1575 return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg)); in emit_fop_mem()
1578 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, slj… in sljit_emit_fop1_conv_sw_from_f64() argument
1585 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_conv_sw_from_f64()
1589 FAIL_IF(push_inst32(compiler, VCVT_S32_F32 | (op & SLJIT_F32_OP) | DD4(TMP_FREG1) | DM4(src))); in sljit_emit_fop1_conv_sw_from_f64()
1592 return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1)); in sljit_emit_fop1_conv_sw_from_f64()
1595 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_sw_from_f64()
1598 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, slj… in sljit_emit_fop1_conv_f64_from_sw() argument
1607 FAIL_IF(push_inst32(compiler, VMOV | RT4(src) | DN4(TMP_FREG1))); in sljit_emit_fop1_conv_f64_from_sw()
1610 FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_conv_f64_from_sw()
1613 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_conv_f64_from_sw()
1614 FAIL_IF(push_inst32(compiler, VMOV | RT4(TMP_REG1) | DN4(TMP_FREG1))); in sljit_emit_fop1_conv_f64_from_sw()
1617 FAIL_IF(push_inst32(compiler, VCVT_F32_S32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(TMP_FREG1))); in sljit_emit_fop1_conv_f64_from_sw()
1620 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_conv_f64_from_sw()
1624 static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1_cmp() argument
1631 emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w); in sljit_emit_fop1_cmp()
1636 emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w); in sljit_emit_fop1_cmp()
1640 FAIL_IF(push_inst32(compiler, VCMP_F32 | (op & SLJIT_F32_OP) | DD4(src1) | DM4(src2))); in sljit_emit_fop1_cmp()
1641 return push_inst32(compiler, VMRS); in sljit_emit_fop1_cmp()
1644 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop1() argument
1653 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
1661 emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, dst_r, src, srcw); in sljit_emit_fop1()
1669 FAIL_IF(push_inst32(compiler, VMOV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); in sljit_emit_fop1()
1675 FAIL_IF(push_inst32(compiler, VNEG_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); in sljit_emit_fop1()
1678 FAIL_IF(push_inst32(compiler, VABS_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); in sljit_emit_fop1()
1681 FAIL_IF(push_inst32(compiler, VCVT_F64_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src))); in sljit_emit_fop1()
1687 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw); in sljit_emit_fop1()
1691 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, in sljit_emit_fop2() argument
1699 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
1708 emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w); in sljit_emit_fop2()
1712 emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w); in sljit_emit_fop2()
1718 …FAIL_IF(push_inst32(compiler, VADD_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))… in sljit_emit_fop2()
1721 …FAIL_IF(push_inst32(compiler, VSUB_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))… in sljit_emit_fop2()
1724 …FAIL_IF(push_inst32(compiler, VMUL_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))… in sljit_emit_fop2()
1727 …FAIL_IF(push_inst32(compiler, VDIV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2))… in sljit_emit_fop2()
1733 return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop2()
1742 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32… in sljit_emit_fast_enter() argument
1745 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
1751 return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG2)); in sljit_emit_fast_enter()
1754 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, TMP_REG1); in sljit_emit_fast_enter()
1816 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
1821 CHECK_PTR(check_sljit_emit_label(compiler)); in sljit_emit_label()
1823 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
1824 return compiler->last_label; in sljit_emit_label()
1826 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
1828 set_label(label, compiler); in sljit_emit_label()
1832 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
1838 CHECK_PTR(check_sljit_emit_jump(compiler, type)); in sljit_emit_jump()
1840 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
1842 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
1845 PTR_FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0)); in sljit_emit_jump()
1850 PTR_FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_jump()
1853 jump->addr = compiler->size; in sljit_emit_jump()
1855 PTR_FAIL_IF(push_inst16(compiler, BX | RN3(TMP_REG1))); in sljit_emit_jump()
1858 PTR_FAIL_IF(push_inst16(compiler, BLX | RN3(TMP_REG1))); in sljit_emit_jump()
1866 static sljit_s32 softfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types, slj… in softfloat_call_with_args() argument
1911 FAIL_IF(push_inst16(compiler, SUB_SP | (((stack_offset - 16) + 0x7) & ~0x7) >> 2)); in softfloat_call_with_args()
1925 FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); in softfloat_call_with_args()
1928 … FAIL_IF(push_inst32(compiler, VMOV | 0x100000 | (float_arg_count << 16) | (stack_offset << 10))); in softfloat_call_with_args()
1930 …FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800000 | RN4(SLJIT_SP) | (float_arg_count << 12) | ((st… in softfloat_call_with_args()
1941 FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); in softfloat_call_with_args()
1944 …FAIL_IF(push_inst32(compiler, VMOV2 | 0x100000 | (stack_offset << 10) | ((stack_offset + sizeof(sl… in softfloat_call_with_args()
1946 …FAIL_IF(push_inst32(compiler, VSTR_F32 | 0x800100 | RN4(SLJIT_SP) | (float_arg_count << 12) | ((st… in softfloat_call_with_args()
1958 FAIL_IF(push_inst16(compiler, MOV | (src_offset << 1) | 4 | (1 << 7))); in softfloat_call_with_args()
1965 FAIL_IF(push_inst16(compiler, MOV | (stack_offset >> 2) | (word_arg_offset << 1))); in softfloat_call_with_args()
1967 FAIL_IF(push_inst16(compiler, STR_SP | (word_arg_offset << 6) | ((stack_offset - 16) >> 2))); in softfloat_call_with_args()
1978 static sljit_s32 softfloat_post_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) in softfloat_post_call_with_args() argument
1983 FAIL_IF(push_inst32(compiler, VMOV | (0 << 16) | (0 << 12))); in softfloat_post_call_with_args()
1985 FAIL_IF(push_inst32(compiler, VMOV2 | (1 << 16) | (0 << 12) | 0)); in softfloat_post_call_with_args()
2010 return push_inst16(compiler, ADD_SP | ((((stack_size - 16) + 0x7) & ~0x7) >> 2)); in softfloat_post_call_with_args()
2015 static sljit_s32 hardfloat_call_with_args(struct sljit_compiler *compiler, sljit_s32 arg_types) in hardfloat_call_with_args() argument
2036 FAIL_IF(push_inst32(compiler, VMOV_F32 | DD4((new_offset >> 1) + 1) in hardfloat_call_with_args()
2052 …FAIL_IF(push_inst32(compiler, VMOV_F32 | SLJIT_F32_OP | DD4((new_offset >> 1) + 1) | DM4((offset >… in hardfloat_call_with_args()
2064 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_call(struct sljit_compiler *compiler, sljit_… in sljit_emit_call() argument
2072 CHECK_PTR(check_sljit_emit_call(compiler, type, arg_types)); in sljit_emit_call()
2075 PTR_FAIL_IF(softfloat_call_with_args(compiler, arg_types, NULL)); in sljit_emit_call()
2079 compiler->skip_checks = 1; in sljit_emit_call()
2082 jump = sljit_emit_jump(compiler, type); in sljit_emit_call()
2085 PTR_FAIL_IF(softfloat_post_call_with_args(compiler, arg_types)); in sljit_emit_call()
2088 PTR_FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); in sljit_emit_call()
2092 compiler->skip_checks = 1; in sljit_emit_call()
2095 return sljit_emit_jump(compiler, type); in sljit_emit_call()
2099 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type… in sljit_emit_ijump() argument
2104 CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_ijump()
2112 return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(src)); in sljit_emit_ijump()
2115 …FAIL_IF(emit_op_mem(compiler, WORD_SIZE, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, src, srcw, TMP_RE… in sljit_emit_ijump()
2117 return push_inst16(compiler, BLX | RN3(TMP_REG1)); in sljit_emit_ijump()
2121 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2123 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2126 FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0)); in sljit_emit_ijump()
2127 jump->addr = compiler->size; in sljit_emit_ijump()
2128 return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(TMP_REG1)); in sljit_emit_ijump()
2131 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_icall(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_icall() argument
2136 CHECK(check_sljit_emit_icall(compiler, type, arg_types, src, srcw)); in sljit_emit_icall()
2140 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src, srcw, TMP_REG1)); in sljit_emit_icall()
2144 FAIL_IF(softfloat_call_with_args(compiler, arg_types, &src)); in sljit_emit_icall()
2148 compiler->skip_checks = 1; in sljit_emit_icall()
2151 FAIL_IF(sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_icall()
2153 return softfloat_post_call_with_args(compiler, arg_types); in sljit_emit_icall()
2155 FAIL_IF(hardfloat_call_with_args(compiler, arg_types)); in sljit_emit_icall()
2159 compiler->skip_checks = 1; in sljit_emit_icall()
2162 return sljit_emit_ijump(compiler, type, src, srcw); in sljit_emit_icall()
2166 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 o… in sljit_emit_op_flags() argument
2174 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, type)); in sljit_emit_op_flags()
2182 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | (((cc & 0x1) ^ 0x1) << 3) | 0x4)); in sljit_emit_op_flags()
2184 FAIL_IF(push_inst32(compiler, MOV_WI | RD4(dst_r) | 1)); in sljit_emit_op_flags()
2185 FAIL_IF(push_inst32(compiler, MOV_WI | RD4(dst_r) | 0)); in sljit_emit_op_flags()
2188 FAIL_IF(push_inst16(compiler, MOVSI | RDN3(dst_r) | 1)); in sljit_emit_op_flags()
2189 FAIL_IF(push_inst16(compiler, MOVSI | RDN3(dst_r) | 0)); in sljit_emit_op_flags()
2193 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2); in sljit_emit_op_flags()
2197 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2200 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | (((cc & 0x1) ^ 0x1) << 3) | 0x4)); in sljit_emit_op_flags()
2201 FAIL_IF(push_inst32(compiler, ANDI | RN4(dst_r) | RD4(dst_r) | 1)); in sljit_emit_op_flags()
2202 FAIL_IF(push_inst32(compiler, ANDI | RN4(dst_r) | RD4(dst_r) | 0)); in sljit_emit_op_flags()
2205 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_op_flags()
2206 FAIL_IF(push_inst32(compiler, ((op == SLJIT_OR) ? ORRI : EORI) | RN4(dst_r) | RD4(dst_r) | 1)); in sljit_emit_op_flags()
2210 FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, TMP_REG2)); in sljit_emit_op_flags()
2216 return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(TMP_REG1) | RM4(dst_r)); in sljit_emit_op_flags()
2219 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_cmov(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_cmov() argument
2226 CHECK(check_sljit_emit_cmov(compiler, type, dst_reg, src, srcw)); in sljit_emit_cmov()
2233 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_cmov()
2234 return push_inst16(compiler, MOV | SET_REGS44(dst_reg, src)); in sljit_emit_cmov()
2241 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_cmov()
2242 return push_inst32(compiler, MOVW | RD4(dst_reg) in sljit_emit_cmov()
2248 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_cmov()
2249 return push_inst32(compiler, MOV_WI | RD4(dst_reg) | tmp); in sljit_emit_cmov()
2254 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8)); in sljit_emit_cmov()
2255 return push_inst32(compiler, MVN_WI | RD4(dst_reg) | tmp); in sljit_emit_cmov()
2258 FAIL_IF(push_inst16(compiler, IT | (cc << 4) | ((cc & 0x1) << 3) | 0x4)); in sljit_emit_cmov()
2261 FAIL_IF(push_inst32(compiler, MOVW | RD4(dst_reg) in sljit_emit_cmov()
2263 return push_inst32(compiler, MOVT | RD4(dst_reg) in sljit_emit_cmov()
2267 SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_mem(struct sljit_compiler *compiler, sljit_s32 type, in sljit_emit_mem() argument
2275 CHECK(check_sljit_emit_mem(compiler, type, reg, mem, memw)); in sljit_emit_mem()
2321 return push_inst32(compiler, inst | RT4(reg) | RN4(mem & REG_MASK) | memw); in sljit_emit_mem()
2324 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
2330 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2333 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
2335 set_const(const_, compiler); in sljit_emit_const()
2338 PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value)); in sljit_emit_const()
2341 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_const()
2345 …UTE struct sljit_put_label* sljit_emit_put_label(struct sljit_compiler *compiler, sljit_s32 dst, s… in sljit_emit_put_label() argument
2351 CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw)); in sljit_emit_put_label()
2354 put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct sljit_put_label)); in sljit_emit_put_label()
2356 set_put_label(put_label, compiler, 0); in sljit_emit_put_label()
2359 PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, 0)); in sljit_emit_put_label()
2362 PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); in sljit_emit_put_label()