Lines Matching refs:compiler

129 static sljit_si push_cpool(struct sljit_compiler *compiler)  in push_cpool()  argument
138 if (compiler->last_label && compiler->last_label->size == compiler->size) in push_cpool()
139 compiler->last_label->size += compiler->cpool_fill + (CONST_POOL_ALIGNMENT - 1) + 1; in push_cpool()
141 SLJIT_ASSERT(compiler->cpool_fill > 0 && compiler->cpool_fill <= CPOOL_SIZE); in push_cpool()
142 inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_cpool()
144 compiler->size++; in push_cpool()
145 *inst = 0xff000000 | compiler->cpool_fill; in push_cpool()
148 inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_cpool()
150 compiler->size++; in push_cpool()
154 cpool_ptr = compiler->cpool; in push_cpool()
155 cpool_end = cpool_ptr + compiler->cpool_fill; in push_cpool()
157 inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_cpool()
159 compiler->size++; in push_cpool()
162 compiler->cpool_diff = CONST_POOL_EMPTY; in push_cpool()
163 compiler->cpool_fill = 0; in push_cpool()
167 static sljit_si push_inst(struct sljit_compiler *compiler, sljit_uw inst) in push_inst() argument
171 …if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_di… in push_inst()
172 FAIL_IF(push_cpool(compiler)); in push_inst()
174 ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_inst()
176 compiler->size++; in push_inst()
181 static sljit_si push_inst_with_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit_uw lit… in push_inst_with_literal() argument
189 …if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_di… in push_inst_with_literal()
190 FAIL_IF(push_cpool(compiler)); in push_inst_with_literal()
191 else if (compiler->cpool_fill > 0) { in push_inst_with_literal()
192 cpool_ptr = compiler->cpool; in push_inst_with_literal()
193 cpool_end = cpool_ptr + compiler->cpool_fill; in push_inst_with_literal()
194 cpool_unique_ptr = compiler->cpool_unique; in push_inst_with_literal()
197 cpool_index = cpool_ptr - compiler->cpool; in push_inst_with_literal()
207 if (compiler->cpool_fill < CPOOL_SIZE) { in push_inst_with_literal()
208 cpool_index = compiler->cpool_fill; in push_inst_with_literal()
209 compiler->cpool_fill++; in push_inst_with_literal()
212 FAIL_IF(push_cpool(compiler)); in push_inst_with_literal()
214 compiler->cpool_fill = 1; in push_inst_with_literal()
219 ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_inst_with_literal()
221 compiler->size++; in push_inst_with_literal()
224 compiler->cpool[cpool_index] = literal; in push_inst_with_literal()
225 compiler->cpool_unique[cpool_index] = 0; in push_inst_with_literal()
226 if (compiler->cpool_diff == CONST_POOL_EMPTY) in push_inst_with_literal()
227 compiler->cpool_diff = compiler->size; in push_inst_with_literal()
231 static sljit_si push_inst_with_unique_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit… in push_inst_with_unique_literal() argument
234 …(SLJIT_UNLIKELY((compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff… in push_inst_with_unique_literal()
235 FAIL_IF(push_cpool(compiler)); in push_inst_with_unique_literal()
237 SLJIT_ASSERT(compiler->cpool_fill < CPOOL_SIZE && (inst & 0xfff) == 0); in push_inst_with_unique_literal()
238 ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_inst_with_unique_literal()
240 compiler->size++; in push_inst_with_unique_literal()
241 *ptr = inst | compiler->cpool_fill; in push_inst_with_unique_literal()
243 compiler->cpool[compiler->cpool_fill] = literal; in push_inst_with_unique_literal()
244 compiler->cpool_unique[compiler->cpool_fill] = 1; in push_inst_with_unique_literal()
245 compiler->cpool_fill++; in push_inst_with_unique_literal()
246 if (compiler->cpool_diff == CONST_POOL_EMPTY) in push_inst_with_unique_literal()
247 compiler->cpool_diff = compiler->size; in push_inst_with_unique_literal()
251 static SLJIT_INLINE sljit_si prepare_blx(struct sljit_compiler *compiler) in prepare_blx() argument
254 …if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_di… in prepare_blx()
255 return push_cpool(compiler); in prepare_blx()
259 static SLJIT_INLINE sljit_si emit_blx(struct sljit_compiler *compiler) in emit_blx() argument
262 …SLJIT_ASSERT(compiler->cpool_diff == CONST_POOL_EMPTY || compiler->size - compiler->cpool_diff < M… in emit_blx()
263 return push_inst(compiler, BLX | RM(TMP_REG1)); in emit_blx()
318 static sljit_si resolve_const_pool_index(struct sljit_compiler *compiler, struct future_patch **fir… in resolve_const_pool_index() argument
323 SLJIT_UNUSED_ARG(compiler); in resolve_const_pool_index()
342 SLJIT_FREE(curr_patch, compiler->allocator_data); in resolve_const_pool_index()
352 …curr_patch = (struct future_patch*)SLJIT_MALLOC(sizeof(struct future_patch), compiler->allocator_d… in resolve_const_pool_index()
357 SLJIT_FREE(curr_patch, compiler->allocator_data); in resolve_const_pool_index()
373 static sljit_si push_inst(struct sljit_compiler *compiler, sljit_uw inst) in push_inst() argument
377 ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_inst()
379 compiler->size++; in push_inst()
384 static SLJIT_INLINE sljit_si emit_imm(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm) in emit_imm() argument
386 FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); in emit_imm()
387 return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); in emit_imm()
556 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
579 CHECK_PTR(check_sljit_generate_code(compiler)); in sljit_generate_code()
580 reverse_buf(compiler); in sljit_generate_code()
584 size = compiler->size + (compiler->patches << 1); in sljit_generate_code()
585 if (compiler->cpool_fill > 0) in sljit_generate_code()
586 size += compiler->cpool_fill + CONST_POOL_ALIGNMENT - 1; in sljit_generate_code()
588 size = compiler->size; in sljit_generate_code()
592 buf = compiler->buf; in sljit_generate_code()
606 label = compiler->labels; in sljit_generate_code()
607 jump = compiler->jumps; in sljit_generate_code()
608 const_ = compiler->consts; in sljit_generate_code()
628 …if (SLJIT_UNLIKELY(resolve_const_pool_index(compiler, &first_patch, cpool_current_index, cpool_sta… in sljit_generate_code()
630 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_generate_code()
708 if (compiler->cpool_fill > 0) { in sljit_generate_code()
710 …ndex = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compiler->cpool_fill); in sljit_generate_code()
714 buf_ptr = compiler->cpool; in sljit_generate_code()
715 buf_end = buf_ptr + compiler->cpool_fill; in sljit_generate_code()
718 …if (SLJIT_UNLIKELY(resolve_const_pool_index(compiler, &first_patch, cpool_current_index, cpool_sta… in sljit_generate_code()
720 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_generate_code()
730 jump = compiler->jumps; in sljit_generate_code()
773 const_ = compiler->consts; in sljit_generate_code()
794 compiler->error = SLJIT_ERR_COMPILED; in sljit_generate_code()
795 compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); in sljit_generate_code()
823 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si inp_flags,
828 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
836 …CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, loca… in sljit_emit_enter()
837 set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_emit_enter()
850 FAIL_IF(push_inst(compiler, push)); in sljit_emit_enter()
855 compiler->local_size = local_size; in sljit_emit_enter()
857 FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size)); in sljit_emit_enter()
860 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S0, SLJIT_UNUSED, RM(SLJIT_R0))… in sljit_emit_enter()
862 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S1, SLJIT_UNUSED, RM(SLJIT_R1))… in sljit_emit_enter()
864 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S2, SLJIT_UNUSED, RM(SLJIT_R2))… in sljit_emit_enter()
869 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
876 …CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, loc… in sljit_set_context()
877 set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size); in sljit_set_context()
880 compiler->local_size = ((size + local_size + 7) & ~7) - size; in sljit_set_context()
884 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
890 CHECK(check_sljit_emit_return(compiler, op, src, srcw)); in sljit_emit_return()
892 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
894 if (compiler->local_size > 0) in sljit_emit_return()
895 …FAIL_IF(emit_op(compiler, SLJIT_ADD, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->loc… in sljit_emit_return()
901 …tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJ… in sljit_emit_return()
905 for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) in sljit_emit_return()
908 return push_inst(compiler, pop); in sljit_emit_return()
970 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, (src2 & SRC…
973 return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, src2))
977 if (compiler->shift_imm != 0x20) { \
980 if (compiler->shift_imm != 0) \
981 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (co…
982 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, reg…
984 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (re…
986 static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, sljit_si op, sljit_si … in emit_single_op() argument
1010 return push_inst(compiler, EMIT_DATA_PROCESS_INS(AND_DP, 0, dst, src2, SRC2_IMM | 0xff)); in emit_single_op()
1011 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | reg_ma… in emit_single_op()
1012 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | (op == … in emit_single_op()
1014 return push_inst(compiler, (op == SLJIT_MOV_UB ? UXTB : SXTB) | RD(dst) | RM(src2)); in emit_single_op()
1030 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | reg_ma… in emit_single_op()
1031 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | (op == … in emit_single_op()
1033 return push_inst(compiler, (op == SLJIT_MOV_UH ? UXTH : SXTH) | RD(dst) | RM(src2)); in emit_single_op()
1055 FAIL_IF(push_inst(compiler, CLZ | RD(dst) | RM(src2))); in emit_single_op()
1089 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src1] << 8) | reg_map[src2])); in emit_single_op()
1091 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[src1])); in emit_single_op()
1095 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, reg_map[src2]… in emit_single_op()
1096 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[TMP_REG1])); in emit_single_op()
1103 compiler->cache_arg = 0; in emit_single_op()
1104 compiler->cache_argw = 0; in emit_single_op()
1106 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(CMP_DP, SET_FLAGS, SLJIT_UNUSED, TMP_REG3, RM(dst… in emit_single_op()
1178 static sljit_si generate_int(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm, sljit_si … in generate_int() argument
1283 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? MOV_DP : MVN_DP, 0, reg, SLJIT_UNUSED… in generate_int()
1284 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? ORR_DP : BIC_DP, 0, reg, reg, imm2))); in generate_int()
1289 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm) in load_immediate() argument
1295 return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)); in load_immediate()
1301 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, tmp)); in load_immediate()
1305 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, tmp)); in load_immediate()
1309 FAIL_IF(generate_int(compiler, reg, imm, 1)); in load_immediate()
1310 FAIL_IF(generate_int(compiler, reg, ~imm, 0)); in load_immediate()
1313 …return push_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_P… in load_immediate()
1315 return emit_imm(compiler, reg, imm); in load_immediate()
1320 static sljit_si emit_set_delta(struct sljit_compiler *compiler, sljit_si dst, sljit_si reg, sljit_s… in emit_set_delta() argument
1325 return push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, dst, reg, value)); in emit_set_delta()
1330 return push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, dst, reg, value)); in emit_set_delta()
1336 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, … in getput_arg_fast() argument
1345 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1352 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1370 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1379 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1385 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1393 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1400 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1442 FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, imm))); \
1444 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, TYPE2_TRANSFER_IM…
1453 … FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(reg)))); \
1459 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, sljit… in getput_arg() argument
1468 return load_immediate(compiler, reg, argw); in getput_arg()
1478 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1479 …if ((compiler->cache_arg & SLJIT_IMM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delt… in getput_arg()
1482 argw = argw - compiler->cache_argw; in getput_arg()
1486 argw = compiler->cache_argw - argw; in getput_arg()
1499 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1500 compiler->cache_argw = argw; in getput_arg()
1504 FAIL_IF(load_immediate(compiler, tmp_r, argw)); in getput_arg()
1513 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, RM(OFFS_REG(ar… in getput_arg()
1514 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, 0, reg, tmp_r, TYPE2_TRANSFER_IMM(0))); in getput_arg()
1517 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1518 if (compiler->cache_arg == arg && imm <= (sljit_uw)max_delta) { in getput_arg()
1523 if (compiler->cache_arg == arg && imm >= (sljit_uw)-max_delta) { in getput_arg()
1533 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1542 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1547 if ((compiler->cache_arg & SLJIT_IMM) && compiler->cache_argw == argw) { in getput_arg()
1549 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1554 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in getput_arg()
1556 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1557 compiler->cache_argw = argw; in getput_arg()
1560 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1566 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in getput_arg()
1567 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, TMP_REG3, reg_map[arg & REG… in getput_arg()
1569 compiler->cache_arg = arg; in getput_arg()
1570 compiler->cache_argw = argw; in getput_arg()
1577 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1578 compiler->cache_argw = argw; in getput_arg()
1582 FAIL_IF(load_immediate(compiler, tmp_r, argw)); in getput_arg()
1583 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1586 static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si … in emit_op_mem() argument
1588 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
1589 return compiler->error; in emit_op_mem()
1590 compiler->cache_arg = 0; in emit_op_mem()
1591 compiler->cache_argw = 0; in emit_op_mem()
1592 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
1595 static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si… in emit_op_mem2() argument
1597 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1598 return compiler->error; in emit_op_mem2()
1599 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1602 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si inp_flags, in emit_op() argument
1619 compiler->cache_arg = 0; in emit_op()
1620 compiler->cache_argw = 0; in emit_op()
1636 if (getput_arg_fast(compiler, inp_flags | ARG_TEST, TMP_REG2, dst, dstw)) { in emit_op()
1687 if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w)) { in emit_op()
1688 FAIL_IF(compiler->error); in emit_op()
1732 if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) { in emit_op()
1733 FAIL_IF(compiler->error); in emit_op()
1745 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src2, src2w, src1, src1w)); in emit_op()
1746 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src1, src1w, dst, dstw)); in emit_op()
1749 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
1750 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
1756 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
1760 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
1764 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
1772 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0)); in emit_op()
1777 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0)); in emit_op()
1781 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1785 FAIL_IF(getput_arg_fast(compiler, inp_flags, dst_r, dst, dstw)); in emit_op()
1787 FAIL_IF(getput_arg(compiler, inp_flags, dst_r, dst, dstw, 0, 0)); in emit_op()
1807 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in sljit_emit_op0() argument
1810 CHECK(check_sljit_emit_op0(compiler, op)); in sljit_emit_op0()
1815 FAIL_IF(push_inst(compiler, BKPT)); in sljit_emit_op0()
1818 FAIL_IF(push_inst(compiler, NOP)); in sljit_emit_op0()
1823 return push_inst(compiler, (op == SLJIT_LUMUL ? UMULL : SMULL) in sljit_emit_op0()
1829 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, RM(SLJIT_R1))… in sljit_emit_op0()
1830 return push_inst(compiler, (op == SLJIT_LUMUL ? UMULL : SMULL) in sljit_emit_op0()
1843 if ((op >= SLJIT_UDIVI) && (compiler->scratches >= 3)) { in sljit_emit_op0()
1844 FAIL_IF(push_inst(compiler, 0xe52d2008 /* str r2, [sp, #-8]! */)); in sljit_emit_op0()
1845 FAIL_IF(push_inst(compiler, 0xe58d1004 /* str r1, [sp, #4] */)); in sljit_emit_op0()
1847 else if ((op >= SLJIT_UDIVI) || (compiler->scratches >= 3)) in sljit_emit_op0()
1848 …FAIL_IF(push_inst(compiler, 0xe52d0008 | (op >= SLJIT_UDIVI ? 0x1000 : 0x2000) /* str r1/r2, [sp, … in sljit_emit_op0()
1851 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, in sljit_emit_op0()
1857 if ((op >= SLJIT_UDIVI) && (compiler->scratches >= 3)) { in sljit_emit_op0()
1858 FAIL_IF(push_inst(compiler, 0xe59d1004 /* ldr r1, [sp, #4] */)); in sljit_emit_op0()
1859 FAIL_IF(push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */)); in sljit_emit_op0()
1861 else if ((op >= SLJIT_UDIVI) || (compiler->scratches >= 3)) in sljit_emit_op0()
1862 …return push_inst(compiler, 0xe49d0008 | (op >= SLJIT_UDIVI ? 0x1000 : 0x2000) /* ldr r1/r2, [sp], … in sljit_emit_op0()
1869 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
1874 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1883 return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1886 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1889 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1892 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1895 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1901 …return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1904 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1907 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1910 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1913 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1916 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1921 compiler->skip_checks = 1; in sljit_emit_op1()
1923 …return sljit_emit_op2(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1926 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1932 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
1938 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1950 return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1953 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1956 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1962 compiler->shift_imm = src2w & 0x1f; in sljit_emit_op2()
1963 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src1, src1w); in sljit_emit_op2()
1966 compiler->shift_imm = 0x20; in sljit_emit_op2()
1967 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1986 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
1990 CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); in sljit_emit_op_custom()
1992 return push_inst(compiler, *(sljit_uw*)instruction); in sljit_emit_op_custom()
2043 static sljit_si emit_fop_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_s… in emit_fop_mem() argument
2051 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, RM(OFFS_REG… in emit_fop_mem()
2059 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, arg & REG_MASK, reg, argw >> 2)); in emit_fop_mem()
2061 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, arg & REG_MASK, reg, (-argw) >> 2)); in emit_fop_mem()
2064 if (compiler->cache_arg == arg) { in emit_fop_mem()
2065 tmp = argw - compiler->cache_argw; in emit_fop_mem()
2067 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, tmp >> 2)); in emit_fop_mem()
2069 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG3, reg, -tmp >> 2)); in emit_fop_mem()
2070 if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2071 FAIL_IF(compiler->error); in emit_fop_mem()
2072 compiler->cache_argw = argw; in emit_fop_mem()
2073 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2078 if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2079 FAIL_IF(compiler->error); in emit_fop_mem()
2080 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, 0)); in emit_fop_mem()
2084 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2085 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2090 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2091 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2095 compiler->cache_arg = arg; in emit_fop_mem()
2096 compiler->cache_argw = argw; in emit_fop_mem()
2098 FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); in emit_fop_mem()
2099 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, arg & REG_MASK, reg_map[TMP… in emit_fop_mem()
2102 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in emit_fop_mem()
2104 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2107 static SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convw_fromd() argument
2112 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convw_fromd()
2116 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_SINGLE_OP, TMP_FREG1, src,… in sljit_emit_fop1_convw_fromd()
2122 return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | (TMP_FREG1 << 16)); in sljit_emit_fop1_convw_fromd()
2125 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
2128 static SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convd_fromw() argument
2135 FAIL_IF(push_inst(compiler, VMOV | RD(src) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2138 FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convd_fromw()
2141 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_convd_fromw()
2142 FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2145 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F32_S32, op & SLJIT_SINGLE_OP, dst_r, TMP_FREG… in sljit_emit_fop1_convd_fromw()
2148 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
2152 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1_cmp() argument
2157 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop1_cmp()
2162 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop1_cmp()
2166 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_SINGLE_OP, src1, src2, 0))); in sljit_emit_fop1_cmp()
2167 return push_inst(compiler, VMRS); in sljit_emit_fop1_cmp()
2170 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
2177 compiler->cache_arg = 0; in sljit_emit_fop1()
2178 compiler->cache_argw = 0; in sljit_emit_fop1()
2183 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2188 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, dst_r, src, srcw)); in sljit_emit_fop1()
2196 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2202 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2205 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2208 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))… in sljit_emit_fop1()
2214 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), dst_r, dst, dstw); in sljit_emit_fop1()
2218 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
2226 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2231 compiler->cache_arg = 0; in sljit_emit_fop2()
2232 compiler->cache_argw = 0; in sljit_emit_fop2()
2238 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop2()
2243 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop2()
2249 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2253 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2257 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2261 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2266 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw)); in sljit_emit_fop2()
2279 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
2282 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
2290 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, RM(TMP_REG3))); in sljit_emit_fast_enter()
2293 if (getput_arg_fast(compiler, WORD_DATA, TMP_REG3, dst, dstw)) in sljit_emit_fast_enter()
2294 return compiler->error; in sljit_emit_fast_enter()
2296 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG2, SLJIT_UNUSED, RM(TMP_REG3))… in sljit_emit_fast_enter()
2297 compiler->cache_arg = 0; in sljit_emit_fast_enter()
2298 compiler->cache_argw = 0; in sljit_emit_fast_enter()
2299 return getput_arg(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fast_enter()
2302 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
2305 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
2309 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(src)))); in sljit_emit_fast_return()
2311 if (getput_arg_fast(compiler, WORD_DATA | LOAD_DATA, TMP_REG3, src, srcw)) in sljit_emit_fast_return()
2312 FAIL_IF(compiler->error); in sljit_emit_fast_return()
2314 compiler->cache_arg = 0; in sljit_emit_fast_return()
2315 compiler->cache_argw = 0; in sljit_emit_fast_return()
2316 FAIL_IF(getput_arg(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw, 0, 0)); in sljit_emit_fast_return()
2317 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(TMP_REG2))… in sljit_emit_fast_return()
2321 FAIL_IF(load_immediate(compiler, TMP_REG3, srcw)); in sljit_emit_fast_return()
2322 return push_inst(compiler, BLX | RM(TMP_REG3)); in sljit_emit_fast_return()
2384 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
2389 CHECK_PTR(check_sljit_emit_label(compiler)); in sljit_emit_label()
2391 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
2392 return compiler->last_label; in sljit_emit_label()
2394 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
2396 set_label(label, compiler); in sljit_emit_label()
2400 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
2405 CHECK_PTR(check_sljit_emit_jump(compiler, type)); in sljit_emit_jump()
2407 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2409 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2415 PTR_FAIL_IF(prepare_blx(compiler)); in sljit_emit_jump()
2416 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, ((EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1,… in sljit_emit_jump()
2420 jump->addr = compiler->size; in sljit_emit_jump()
2421 compiler->patches++; in sljit_emit_jump()
2426 PTR_FAIL_IF(emit_blx(compiler)); in sljit_emit_jump()
2430 jump->addr = compiler->size; in sljit_emit_jump()
2434 PTR_FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_jump()
2435 …PTR_FAIL_IF(push_inst(compiler, (((type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)) & ~COND_MASK) | … in sljit_emit_jump()
2436 jump->addr = compiler->size; in sljit_emit_jump()
2441 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
2446 CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_ijump()
2452 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(src)); in sljit_emit_ijump()
2455 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
2456 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG2)); in sljit_emit_ijump()
2459 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2461 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2466 FAIL_IF(prepare_blx(compiler)); in sljit_emit_ijump()
2467 …FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, ty… in sljit_emit_ijump()
2469 FAIL_IF(emit_blx(compiler)); in sljit_emit_ijump()
2471 FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_ijump()
2472 FAIL_IF(push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1))); in sljit_emit_ijump()
2474 jump->addr = compiler->size; in sljit_emit_ijump()
2478 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
2487 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
2499 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 0))); in sljit_emit_op_flags()
2500 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 1) &… in sljit_emit_op_flags()
2501 …return (dst_r == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
2506 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst, dst, SRC2_IMM | 1) & ~COND_MASK) |… in sljit_emit_op_flags()
2508 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2511 compiler->cache_arg = 0; in sljit_emit_op_flags()
2512 compiler->cache_argw = 0; in sljit_emit_op_flags()
2514 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2518 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_op_flags()
2523 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 1) & ~COND_MASK)… in sljit_emit_op_flags()
2524 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 0) & ~COND_MASK)… in sljit_emit_op_flags()
2526 FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0)); in sljit_emit_op_flags()
2528 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2531 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
2537 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2540 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
2546 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0… in sljit_emit_const()
2547 compiler->patches++; in sljit_emit_const()
2549 PTR_FAIL_IF(emit_imm(compiler, reg, init_value)); in sljit_emit_const()
2551 set_const(const_, compiler); in sljit_emit_const()
2554 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()