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()
1838 if (compiler->scratches >= 3) in sljit_emit_op0()
1839 FAIL_IF(push_inst(compiler, 0xe52d2008 /* str r2, [sp, #-8]! */)); in sljit_emit_op0()
1841 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, in sljit_emit_op0()
1846 if (compiler->scratches >= 3) in sljit_emit_op0()
1847 return push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */); in sljit_emit_op0()
1854 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
1859 CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw)); in sljit_emit_op1()
1868 return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1871 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1874 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1877 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1880 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1886 …return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1889 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1892 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1895 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1898 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1901 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1906 compiler->skip_checks = 1; in sljit_emit_op1()
1908 …return sljit_emit_op2(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1911 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1917 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
1923 CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_op2()
1935 return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1938 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1941 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1947 compiler->shift_imm = src2w & 0x1f; in sljit_emit_op2()
1948 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src1, src1w); in sljit_emit_op2()
1951 compiler->shift_imm = 0x20; in sljit_emit_op2()
1952 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1971 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
1975 CHECK(check_sljit_emit_op_custom(compiler, instruction, size)); in sljit_emit_op_custom()
1977 return push_inst(compiler, *(sljit_uw*)instruction); in sljit_emit_op_custom()
2028 static sljit_si emit_fop_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_s… in emit_fop_mem() argument
2036 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, RM(OFFS_REG… in emit_fop_mem()
2044 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, arg & REG_MASK, reg, argw >> 2)); in emit_fop_mem()
2046 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, arg & REG_MASK, reg, (-argw) >> 2)); in emit_fop_mem()
2049 if (compiler->cache_arg == arg) { in emit_fop_mem()
2050 tmp = argw - compiler->cache_argw; in emit_fop_mem()
2052 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, tmp >> 2)); in emit_fop_mem()
2054 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG3, reg, -tmp >> 2)); in emit_fop_mem()
2055 if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2056 FAIL_IF(compiler->error); in emit_fop_mem()
2057 compiler->cache_argw = argw; in emit_fop_mem()
2058 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2063 if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2064 FAIL_IF(compiler->error); in emit_fop_mem()
2065 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, 0)); in emit_fop_mem()
2069 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2070 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2075 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2076 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2080 compiler->cache_arg = arg; in emit_fop_mem()
2081 compiler->cache_argw = argw; in emit_fop_mem()
2083 FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); in emit_fop_mem()
2084 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, arg & REG_MASK, reg_map[TMP… in emit_fop_mem()
2087 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in emit_fop_mem()
2089 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2092 static SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convw_fromd() argument
2097 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convw_fromd()
2101 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_SINGLE_OP, TMP_FREG1, src,… in sljit_emit_fop1_convw_fromd()
2107 return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | (TMP_FREG1 << 16)); in sljit_emit_fop1_convw_fromd()
2110 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
2113 static SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convd_fromw() argument
2120 FAIL_IF(push_inst(compiler, VMOV | RD(src) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2123 FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convd_fromw()
2126 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_convd_fromw()
2127 FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2130 …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()
2133 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
2137 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1_cmp() argument
2142 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop1_cmp()
2147 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop1_cmp()
2151 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_SINGLE_OP, src1, src2, 0))); in sljit_emit_fop1_cmp()
2152 return push_inst(compiler, VMRS); in sljit_emit_fop1_cmp()
2155 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
2162 compiler->cache_arg = 0; in sljit_emit_fop1()
2163 compiler->cache_argw = 0; in sljit_emit_fop1()
2168 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2173 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, dst_r, src, srcw)); in sljit_emit_fop1()
2181 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2187 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2190 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2193 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))… in sljit_emit_fop1()
2199 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), dst_r, dst, dstw); in sljit_emit_fop1()
2203 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
2211 CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w)); in sljit_emit_fop2()
2216 compiler->cache_arg = 0; in sljit_emit_fop2()
2217 compiler->cache_argw = 0; in sljit_emit_fop2()
2223 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop2()
2228 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop2()
2234 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2238 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2242 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2246 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2251 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw)); in sljit_emit_fop2()
2264 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
2267 CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw)); in sljit_emit_fast_enter()
2275 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, RM(TMP_REG3))); in sljit_emit_fast_enter()
2278 if (getput_arg_fast(compiler, WORD_DATA, TMP_REG3, dst, dstw)) in sljit_emit_fast_enter()
2279 return compiler->error; in sljit_emit_fast_enter()
2281 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG2, SLJIT_UNUSED, RM(TMP_REG3))… in sljit_emit_fast_enter()
2282 compiler->cache_arg = 0; in sljit_emit_fast_enter()
2283 compiler->cache_argw = 0; in sljit_emit_fast_enter()
2284 return getput_arg(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fast_enter()
2287 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
2290 CHECK(check_sljit_emit_fast_return(compiler, src, srcw)); in sljit_emit_fast_return()
2294 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(src)))); in sljit_emit_fast_return()
2296 if (getput_arg_fast(compiler, WORD_DATA | LOAD_DATA, TMP_REG3, src, srcw)) in sljit_emit_fast_return()
2297 FAIL_IF(compiler->error); in sljit_emit_fast_return()
2299 compiler->cache_arg = 0; in sljit_emit_fast_return()
2300 compiler->cache_argw = 0; in sljit_emit_fast_return()
2301 FAIL_IF(getput_arg(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw, 0, 0)); in sljit_emit_fast_return()
2302 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(TMP_REG2))… in sljit_emit_fast_return()
2306 FAIL_IF(load_immediate(compiler, TMP_REG3, srcw)); in sljit_emit_fast_return()
2307 return push_inst(compiler, BLX | RM(TMP_REG3)); in sljit_emit_fast_return()
2369 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
2374 CHECK_PTR(check_sljit_emit_label(compiler)); in sljit_emit_label()
2376 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
2377 return compiler->last_label; in sljit_emit_label()
2379 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
2381 set_label(label, compiler); in sljit_emit_label()
2385 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
2390 CHECK_PTR(check_sljit_emit_jump(compiler, type)); in sljit_emit_jump()
2392 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2394 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2400 PTR_FAIL_IF(prepare_blx(compiler)); in sljit_emit_jump()
2401 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, ((EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1,… in sljit_emit_jump()
2405 jump->addr = compiler->size; in sljit_emit_jump()
2406 compiler->patches++; in sljit_emit_jump()
2411 PTR_FAIL_IF(emit_blx(compiler)); in sljit_emit_jump()
2415 jump->addr = compiler->size; in sljit_emit_jump()
2419 PTR_FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_jump()
2420 …PTR_FAIL_IF(push_inst(compiler, (((type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)) & ~COND_MASK) | … in sljit_emit_jump()
2421 jump->addr = compiler->size; in sljit_emit_jump()
2426 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
2431 CHECK(check_sljit_emit_ijump(compiler, type, src, srcw)); in sljit_emit_ijump()
2437 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(src)); in sljit_emit_ijump()
2440 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
2441 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG2)); in sljit_emit_ijump()
2444 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2446 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2451 FAIL_IF(prepare_blx(compiler)); in sljit_emit_ijump()
2452 …FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, ty… in sljit_emit_ijump()
2454 FAIL_IF(emit_blx(compiler)); in sljit_emit_ijump()
2456 FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_ijump()
2457 FAIL_IF(push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1))); in sljit_emit_ijump()
2459 jump->addr = compiler->size; in sljit_emit_ijump()
2463 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
2472 CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type)); in sljit_emit_op_flags()
2484 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 0))); in sljit_emit_op_flags()
2485 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 1) &… in sljit_emit_op_flags()
2486 …return (dst_r == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
2491 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst, dst, SRC2_IMM | 1) & ~COND_MASK) |… in sljit_emit_op_flags()
2493 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2496 compiler->cache_arg = 0; in sljit_emit_op_flags()
2497 compiler->cache_argw = 0; in sljit_emit_op_flags()
2499 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2503 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_op_flags()
2508 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 1) & ~COND_MASK)… in sljit_emit_op_flags()
2509 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 0) & ~COND_MASK)… in sljit_emit_op_flags()
2511 FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0)); in sljit_emit_op_flags()
2513 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2516 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
2522 CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value)); in sljit_emit_const()
2525 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
2531 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0… in sljit_emit_const()
2532 compiler->patches++; in sljit_emit_const()
2534 PTR_FAIL_IF(emit_imm(compiler, reg, init_value)); in sljit_emit_const()
2536 set_const(const_, compiler); in sljit_emit_const()
2539 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()