Lines Matching full:compiler

2  *    Stack-less Just-In-Time 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()
371 static sljit_si push_inst(struct sljit_compiler *compiler, sljit_uw inst) in push_inst() argument
375 ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw)); in push_inst()
377 compiler->size++; in push_inst()
382 static SLJIT_INLINE sljit_si emit_imm(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm) in emit_imm() argument
384 FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); in emit_imm()
385 return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); in emit_imm()
554 SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) in sljit_generate_code() argument
577 check_sljit_generate_code(compiler); in sljit_generate_code()
578 reverse_buf(compiler); in sljit_generate_code()
582 size = compiler->size + (compiler->patches << 1); in sljit_generate_code()
583 if (compiler->cpool_fill > 0) in sljit_generate_code()
584 size += compiler->cpool_fill + CONST_POOL_ALIGNMENT - 1; in sljit_generate_code()
586 size = compiler->size; in sljit_generate_code()
590 buf = compiler->buf; in sljit_generate_code()
604 label = compiler->labels; in sljit_generate_code()
605 jump = compiler->jumps; in sljit_generate_code()
606 const_ = compiler->consts; in sljit_generate_code()
628 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_generate_code()
706 if (compiler->cpool_fill > 0) { in sljit_generate_code()
708 …ndex = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compiler->cpool_fill); in sljit_generate_code()
712 buf_ptr = compiler->cpool; in sljit_generate_code()
713 buf_end = buf_ptr + compiler->cpool_fill; in sljit_generate_code()
718 compiler->error = SLJIT_ERR_ALLOC_FAILED; in sljit_generate_code()
728 jump = compiler->jumps; in sljit_generate_code()
771 const_ = compiler->consts; in sljit_generate_code()
792 compiler->error = SLJIT_ERR_COMPILED; in sljit_generate_code()
793 compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw); in sljit_generate_code()
821 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si inp_flags,
826 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, in sljit_emit_enter() argument
834 …check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size… in sljit_emit_enter()
836 compiler->options = options; in sljit_emit_enter()
837 compiler->scratches = scratches; in sljit_emit_enter()
838 compiler->saveds = saveds; in sljit_emit_enter()
839 compiler->fscratches = fscratches; in sljit_emit_enter()
840 compiler->fsaveds = fsaveds; in sljit_emit_enter()
842 compiler->logical_local_size = local_size; in sljit_emit_enter()
856 FAIL_IF(push_inst(compiler, push)); in sljit_emit_enter()
861 compiler->local_size = local_size; in sljit_emit_enter()
863 FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size)); in sljit_emit_enter()
866 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S0, SLJIT_UNUSED, RM(SLJIT_R0))… in sljit_emit_enter()
868 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S1, SLJIT_UNUSED, RM(SLJIT_R1))… in sljit_emit_enter()
870 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S2, SLJIT_UNUSED, RM(SLJIT_R2))… in sljit_emit_enter()
875 SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, in sljit_set_context() argument
882 …check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_siz… in sljit_set_context()
884 compiler->options = options; in sljit_set_context()
885 compiler->scratches = scratches; in sljit_set_context()
886 compiler->saveds = saveds; in sljit_set_context()
887 compiler->fscratches = fscratches; in sljit_set_context()
888 compiler->fsaveds = fsaveds; in sljit_set_context()
890 compiler->logical_local_size = local_size; in sljit_set_context()
894 compiler->local_size = ((size + local_size + 7) & ~7) - size; in sljit_set_context()
897 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, s… in sljit_emit_return() argument
903 check_sljit_emit_return(compiler, op, src, srcw); in sljit_emit_return()
905 FAIL_IF(emit_mov_before_return(compiler, op, src, srcw)); in sljit_emit_return()
907 if (compiler->local_size > 0) in sljit_emit_return()
908 …FAIL_IF(emit_op(compiler, SLJIT_ADD, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->loc… in sljit_emit_return()
914 …tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJ… in sljit_emit_return()
918 for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) in sljit_emit_return()
921 return push_inst(compiler, pop); in sljit_emit_return()
983 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, (src2 & SRC…
986 return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, src2))
990 if (compiler->shift_imm != 0x20) { \
993 if (compiler->shift_imm != 0) \
994 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (co…
995 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, reg…
997 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (re…
999 static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, sljit_si op, sljit_si … in emit_single_op() argument
1023 return push_inst(compiler, EMIT_DATA_PROCESS_INS(AND_DP, 0, dst, src2, SRC2_IMM | 0xff)); in emit_single_op()
1024 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | reg_ma… in emit_single_op()
1025 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | (op == … in emit_single_op()
1027 return push_inst(compiler, (op == SLJIT_MOV_UB ? UXTB : SXTB) | RD(dst) | RM(src2)); in emit_single_op()
1043 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | reg_ma… in emit_single_op()
1044 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | (op == … in emit_single_op()
1046 return push_inst(compiler, (op == SLJIT_MOV_UH ? UXTH : SXTH) | RD(dst) | RM(src2)); in emit_single_op()
1068 FAIL_IF(push_inst(compiler, CLZ | RD(dst) | RM(src2))); in emit_single_op()
1102 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src1] << 8) | reg_map[src2])); in emit_single_op()
1104 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[src1])); in emit_single_op()
1108 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, reg_map[src2]… in emit_single_op()
1109 FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[TMP_REG1])); in emit_single_op()
1116 compiler->cache_arg = 0; in emit_single_op()
1117 compiler->cache_argw = 0; in emit_single_op()
1119 …return push_inst(compiler, EMIT_DATA_PROCESS_INS(CMP_DP, SET_FLAGS, SLJIT_UNUSED, TMP_REG3, RM(dst… in emit_single_op()
1191 static sljit_si generate_int(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm, sljit_si … in generate_int() argument
1296 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? MOV_DP : MVN_DP, 0, reg, SLJIT_UNUSED… in generate_int()
1297 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? ORR_DP : BIC_DP, 0, reg, reg, imm2))); in generate_int()
1302 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm) in load_immediate() argument
1308 return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)); in load_immediate()
1314 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, tmp)); in load_immediate()
1318 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, tmp)); in load_immediate()
1322 FAIL_IF(generate_int(compiler, reg, imm, 1)); in load_immediate()
1323 FAIL_IF(generate_int(compiler, reg, ~imm, 0)); in load_immediate()
1326 …return push_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_P… in load_immediate()
1328 return emit_imm(compiler, reg, imm); in load_immediate()
1333 static sljit_si emit_set_delta(struct sljit_compiler *compiler, sljit_si dst, sljit_si reg, sljit_s… in emit_set_delta() argument
1338 return push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, dst, reg, value)); in emit_set_delta()
1343 return push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, dst, reg, value)); in emit_set_delta()
1349 static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, … in getput_arg_fast() argument
1358 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1365 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1383 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1392 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1398 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1406 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1413 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & RE… in getput_arg_fast()
1455 FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, imm))); \
1457 …FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, TYPE2_TRANSFER_IM…
1466 … FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(reg)))); \
1472 static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, sljit… in getput_arg() argument
1481 return load_immediate(compiler, reg, argw); in getput_arg()
1491 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1492 …if ((compiler->cache_arg & SLJIT_IMM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delt… in getput_arg()
1495 argw = argw - compiler->cache_argw; in getput_arg()
1499 argw = compiler->cache_argw - argw; in getput_arg()
1512 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1513 compiler->cache_argw = argw; in getput_arg()
1517 FAIL_IF(load_immediate(compiler, tmp_r, argw)); in getput_arg()
1526 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, RM(OFFS_REG(ar… in getput_arg()
1527 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, 0, reg, tmp_r, TYPE2_TRANSFER_IMM(0))); in getput_arg()
1530 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1531 if (compiler->cache_arg == arg && imm <= (sljit_uw)max_delta) { in getput_arg()
1536 if (compiler->cache_arg == arg && imm >= (sljit_uw)-max_delta) { in getput_arg()
1546 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1555 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1560 if ((compiler->cache_arg & SLJIT_IMM) && compiler->cache_argw == argw) { in getput_arg()
1562 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1567 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in getput_arg()
1569 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1570 compiler->cache_argw = argw; in getput_arg()
1573 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1579 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in getput_arg()
1580 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, TMP_REG3, reg_map[arg & REG… in getput_arg()
1582 compiler->cache_arg = arg; in getput_arg()
1583 compiler->cache_argw = argw; in getput_arg()
1590 compiler->cache_arg = SLJIT_IMM; in getput_arg()
1591 compiler->cache_argw = argw; in getput_arg()
1595 FAIL_IF(load_immediate(compiler, tmp_r, argw)); in getput_arg()
1596 …return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG… in getput_arg()
1599 static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si … in emit_op_mem() argument
1601 if (getput_arg_fast(compiler, flags, reg, arg, argw)) in emit_op_mem()
1602 return compiler->error; in emit_op_mem()
1603 compiler->cache_arg = 0; in emit_op_mem()
1604 compiler->cache_argw = 0; in emit_op_mem()
1605 return getput_arg(compiler, flags, reg, arg, argw, 0, 0); in emit_op_mem()
1608 static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si… in emit_op_mem2() argument
1610 if (getput_arg_fast(compiler, flags, reg, arg1, arg1w)) in emit_op_mem2()
1611 return compiler->error; in emit_op_mem2()
1612 return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w); in emit_op_mem2()
1615 static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si inp_flags, in emit_op() argument
1632 compiler->cache_arg = 0; in emit_op()
1633 compiler->cache_argw = 0; in emit_op()
1649 if (getput_arg_fast(compiler, inp_flags | ARG_TEST, TMP_REG2, dst, dstw)) { in emit_op()
1700 if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w)) { in emit_op()
1701 FAIL_IF(compiler->error); in emit_op()
1745 if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) { in emit_op()
1746 FAIL_IF(compiler->error); in emit_op()
1758 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src2, src2w, src1, src1w)); in emit_op()
1759 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src1, src1w, dst, dstw)); in emit_op()
1762 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
1763 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw)); in emit_op()
1769 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w)); in emit_op()
1773 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw)); in emit_op()
1777 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw)); in emit_op()
1785 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0)); in emit_op()
1790 FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0)); in emit_op()
1794 FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r)); in emit_op()
1798 FAIL_IF(getput_arg_fast(compiler, inp_flags, dst_r, dst, dstw)); in emit_op()
1800 FAIL_IF(getput_arg(compiler, inp_flags, dst_r, dst, dstw, 0, 0)); in emit_op()
1820 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) in sljit_emit_op0() argument
1823 check_sljit_emit_op0(compiler, op); in sljit_emit_op0()
1828 FAIL_IF(push_inst(compiler, BKPT)); in sljit_emit_op0()
1831 FAIL_IF(push_inst(compiler, NOP)); in sljit_emit_op0()
1836 return push_inst(compiler, (op == SLJIT_UMUL ? UMULL : SMULL) in sljit_emit_op0()
1842 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, RM(SLJIT_R1))… in sljit_emit_op0()
1843 return push_inst(compiler, (op == SLJIT_UMUL ? UMULL : SMULL) in sljit_emit_op0()
1851 if (compiler->scratches >= 3) in sljit_emit_op0()
1852 FAIL_IF(push_inst(compiler, 0xe52d2008 /* str r2, [sp, #-8]! */)); in sljit_emit_op0()
1854 FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM, in sljit_emit_op0()
1859 if (compiler->scratches >= 3) in sljit_emit_op0()
1860 return push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */); in sljit_emit_op0()
1867 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op1() argument
1872 check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw); in sljit_emit_op1()
1881 return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1884 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1887 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1890 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (sr… in sljit_emit_op1()
1893 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA, dst, dstw, TMP_REG… in sljit_emit_op1()
1899 …return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1902 …return emit_op(compiler, SLJIT_MOV_UB, ALLOW_ANY_IMM | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1905 …return emit_op(compiler, SLJIT_MOV_SB, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1908 …return emit_op(compiler, SLJIT_MOV_UH, ALLOW_ANY_IMM | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1… in sljit_emit_op1()
1911 …return emit_op(compiler, SLJIT_MOV_SH, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA | WRITE_BACK, dst, … in sljit_emit_op1()
1914 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1918 compiler->skip_checks = 1; in sljit_emit_op1()
1920 …return sljit_emit_op2(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw); in sljit_emit_op1()
1923 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw); in sljit_emit_op1()
1929 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op2() argument
1935 check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1947 return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1950 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1953 return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1959 compiler->shift_imm = src2w & 0x1f; in sljit_emit_op2()
1960 return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src1, src1w); in sljit_emit_op2()
1963 compiler->shift_imm = 0x20; in sljit_emit_op2()
1964 return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_op2()
1983 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler, in sljit_emit_op_custom() argument
1987 check_sljit_emit_op_custom(compiler, instruction, size); in sljit_emit_op_custom()
1990 return push_inst(compiler, *(sljit_uw*)instruction); in sljit_emit_op_custom()
2041 static sljit_si emit_fop_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_s… in emit_fop_mem() argument
2049 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, RM(OFFS_REG… in emit_fop_mem()
2057 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, arg & REG_MASK, reg, argw >> 2)); in emit_fop_mem()
2059 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, arg & REG_MASK, reg, (-argw) >> 2)); in emit_fop_mem()
2062 if (compiler->cache_arg == arg) { in emit_fop_mem()
2063 tmp = argw - compiler->cache_argw; in emit_fop_mem()
2065 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, tmp >> 2)); in emit_fop_mem()
2067 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG3, reg, -tmp >> 2)); in emit_fop_mem()
2068 if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2069 FAIL_IF(compiler->error); in emit_fop_mem()
2070 compiler->cache_argw = argw; in emit_fop_mem()
2071 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2076 if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) { in emit_fop_mem()
2077 FAIL_IF(compiler->error); in emit_fop_mem()
2078 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, 0)); in emit_fop_mem()
2082 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2083 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2088 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2089 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG1, reg, (argw & 0x3fc) >> 2)); in emit_fop_mem()
2093 compiler->cache_arg = arg; in emit_fop_mem()
2094 compiler->cache_argw = argw; in emit_fop_mem()
2096 FAIL_IF(load_immediate(compiler, TMP_REG1, argw)); in emit_fop_mem()
2097 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, arg & REG_MASK, reg_map[TMP… in emit_fop_mem()
2100 FAIL_IF(load_immediate(compiler, TMP_REG3, argw)); in emit_fop_mem()
2102 return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0)); in emit_fop_mem()
2105 static SLJIT_INLINE sljit_si sljit_emit_fop1_convw_fromd(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convw_fromd() argument
2110 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convw_fromd()
2114 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_SINGLE_OP, TMP_FREG1, src,… in sljit_emit_fop1_convw_fromd()
2120 return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | (TMP_FREG1 << 16)); in sljit_emit_fop1_convw_fromd()
2123 return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw); in sljit_emit_fop1_convw_fromd()
2126 static SLJIT_INLINE sljit_si sljit_emit_fop1_convd_fromw(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fop1_convd_fromw() argument
2133 FAIL_IF(push_inst(compiler, VMOV | RD(src) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2136 FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw)); in sljit_emit_fop1_convd_fromw()
2139 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_fop1_convd_fromw()
2140 FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | (TMP_FREG1 << 16))); in sljit_emit_fop1_convd_fromw()
2143 …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()
2146 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw); in sljit_emit_fop1_convd_fromw()
2150 static SLJIT_INLINE sljit_si sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1_cmp() argument
2155 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop1_cmp()
2160 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop1_cmp()
2164 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_SINGLE_OP, src1, src2, 0))); in sljit_emit_fop1_cmp()
2165 return push_inst(compiler, VMRS); in sljit_emit_fop1_cmp()
2168 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop1() argument
2175 compiler->cache_arg = 0; in sljit_emit_fop1()
2176 compiler->cache_argw = 0; in sljit_emit_fop1()
2181 SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw); in sljit_emit_fop1()
2186 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, dst_r, src, srcw)); in sljit_emit_fop1()
2194 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2200 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2203 FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))); in sljit_emit_fop1()
2206 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_SINGLE_OP, dst_r, src, 0))… in sljit_emit_fop1()
2212 return emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), dst_r, dst, dstw); in sljit_emit_fop1()
2216 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_fop2() argument
2224 check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w); in sljit_emit_fop2()
2229 compiler->cache_arg = 0; in sljit_emit_fop2()
2230 compiler->cache_argw = 0; in sljit_emit_fop2()
2236 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG2, src2, src2w)); in sljit_emit_fop2()
2241 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP) | FPU_LOAD, TMP_FREG1, src1, src1w)); in sljit_emit_fop2()
2247 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2251 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2255 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2259 …FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_SINGLE_OP, dst_r, src2, src1))… in sljit_emit_fop2()
2264 FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_SINGLE_OP), TMP_FREG1, dst, dstw)); in sljit_emit_fop2()
2277 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si d… in sljit_emit_fast_enter() argument
2280 check_sljit_emit_fast_enter(compiler, dst, dstw); in sljit_emit_fast_enter()
2288 return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, RM(TMP_REG3))); in sljit_emit_fast_enter()
2291 if (getput_arg_fast(compiler, WORD_DATA, TMP_REG3, dst, dstw)) in sljit_emit_fast_enter()
2292 return compiler->error; in sljit_emit_fast_enter()
2294 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG2, SLJIT_UNUSED, RM(TMP_REG3))… in sljit_emit_fast_enter()
2295 compiler->cache_arg = 0; in sljit_emit_fast_enter()
2296 compiler->cache_argw = 0; in sljit_emit_fast_enter()
2297 return getput_arg(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0); in sljit_emit_fast_enter()
2300 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si … in sljit_emit_fast_return() argument
2303 check_sljit_emit_fast_return(compiler, src, srcw); in sljit_emit_fast_return()
2307 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(src)))); in sljit_emit_fast_return()
2309 if (getput_arg_fast(compiler, WORD_DATA | LOAD_DATA, TMP_REG3, src, srcw)) in sljit_emit_fast_return()
2310 FAIL_IF(compiler->error); in sljit_emit_fast_return()
2312 compiler->cache_arg = 0; in sljit_emit_fast_return()
2313 compiler->cache_argw = 0; in sljit_emit_fast_return()
2314 FAIL_IF(getput_arg(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw, 0, 0)); in sljit_emit_fast_return()
2315 …FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(TMP_REG2))… in sljit_emit_fast_return()
2319 FAIL_IF(load_immediate(compiler, TMP_REG3, srcw)); in sljit_emit_fast_return()
2320 return push_inst(compiler, BLX | RM(TMP_REG3)); in sljit_emit_fast_return()
2381 SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) in sljit_emit_label() argument
2386 check_sljit_emit_label(compiler); in sljit_emit_label()
2388 if (compiler->last_label && compiler->last_label->size == compiler->size) in sljit_emit_label()
2389 return compiler->last_label; in sljit_emit_label()
2391 label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label)); in sljit_emit_label()
2393 set_label(label, compiler); in sljit_emit_label()
2397 SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_… in sljit_emit_jump() argument
2402 check_sljit_emit_jump(compiler, type); in sljit_emit_jump()
2404 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_jump()
2406 set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP); in sljit_emit_jump()
2412 PTR_FAIL_IF(prepare_blx(compiler)); in sljit_emit_jump()
2413 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, ((EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1,… in sljit_emit_jump()
2417 jump->addr = compiler->size; in sljit_emit_jump()
2418 compiler->patches++; in sljit_emit_jump()
2423 PTR_FAIL_IF(emit_blx(compiler)); in sljit_emit_jump()
2427 jump->addr = compiler->size; in sljit_emit_jump()
2431 PTR_FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_jump()
2432 …PTR_FAIL_IF(push_inst(compiler, (((type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)) & ~COND_MASK) | … in sljit_emit_jump()
2433 jump->addr = compiler->size; in sljit_emit_jump()
2438 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, … in sljit_emit_ijump() argument
2443 check_sljit_emit_ijump(compiler, type, src, srcw); in sljit_emit_ijump()
2449 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(src)); in sljit_emit_ijump()
2452 FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw)); in sljit_emit_ijump()
2453 return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG2)); in sljit_emit_ijump()
2456 jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump)); in sljit_emit_ijump()
2458 set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0)); in sljit_emit_ijump()
2463 FAIL_IF(prepare_blx(compiler)); in sljit_emit_ijump()
2464 …FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, ty… in sljit_emit_ijump()
2466 FAIL_IF(emit_blx(compiler)); in sljit_emit_ijump()
2468 FAIL_IF(emit_imm(compiler, TMP_REG1, 0)); in sljit_emit_ijump()
2469 FAIL_IF(push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1))); in sljit_emit_ijump()
2471 jump->addr = compiler->size; in sljit_emit_ijump()
2475 SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op, in sljit_emit_op_flags() argument
2484 check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type); in sljit_emit_op_flags()
2496 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 0))); in sljit_emit_op_flags()
2497 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 1) &… in sljit_emit_op_flags()
2498 …return (dst_r == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS; in sljit_emit_op_flags()
2503 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst, dst, SRC2_IMM | 1) & ~COND_MASK) |… in sljit_emit_op_flags()
2505 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2508 compiler->cache_arg = 0; in sljit_emit_op_flags()
2509 compiler->cache_argw = 0; in sljit_emit_op_flags()
2511 FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw)); in sljit_emit_op_flags()
2515 FAIL_IF(load_immediate(compiler, TMP_REG1, srcw)); in sljit_emit_op_flags()
2520 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 1) & ~COND_MASK)… in sljit_emit_op_flags()
2521 …FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 0) & ~COND_MASK)… in sljit_emit_op_flags()
2523 FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0)); in sljit_emit_op_flags()
2525 …return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_RE… in sljit_emit_op_flags()
2528 SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, slji… in sljit_emit_const() argument
2534 check_sljit_emit_const(compiler, dst, dstw, init_value); in sljit_emit_const()
2537 const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const)); in sljit_emit_const()
2543 …PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0… in sljit_emit_const()
2544 compiler->patches++; in sljit_emit_const()
2546 PTR_FAIL_IF(emit_imm(compiler, reg, init_value)); in sljit_emit_const()
2548 set_const(const_, compiler); in sljit_emit_const()
2551 PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw)); in sljit_emit_const()