Lines Matching refs:inst

31 	sljit_ub *inst;  in emit_load_imm64()  local
33 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw)); in emit_load_imm64()
34 FAIL_IF(!inst); in emit_load_imm64()
36 *inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B); in emit_load_imm64()
37 *inst++ = MOV_r_i32 + (reg_map[reg] & 0x7); in emit_load_imm64()
38 *(sljit_sw*)inst = imm; in emit_load_imm64()
95 sljit_ub *inst; in sljit_emit_enter() local
109 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
110 FAIL_IF(!inst); in sljit_emit_enter()
113 *inst++ = REX_B; in sljit_emit_enter()
119 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
120 FAIL_IF(!inst); in sljit_emit_enter()
123 *inst++ = REX_B; in sljit_emit_enter()
129 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
130 FAIL_IF(!inst); in sljit_emit_enter()
136 *inst++ = REX_W; in sljit_emit_enter()
137 *inst++ = MOV_r_rm; in sljit_emit_enter()
138 *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x7 /* rdi */; in sljit_emit_enter()
141 *inst++ = REX_W | REX_R; in sljit_emit_enter()
142 *inst++ = MOV_r_rm; in sljit_emit_enter()
143 *inst++ = MOD_REG | (reg_lmap[SLJIT_S1] << 3) | 0x6 /* rsi */; in sljit_emit_enter()
146 *inst++ = REX_W | REX_R; in sljit_emit_enter()
147 *inst++ = MOV_r_rm; in sljit_emit_enter()
148 *inst++ = MOD_REG | (reg_lmap[SLJIT_S2] << 3) | 0x2 /* rdx */; in sljit_emit_enter()
152 *inst++ = REX_W; in sljit_emit_enter()
153 *inst++ = MOV_r_rm; in sljit_emit_enter()
154 *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x1 /* rcx */; in sljit_emit_enter()
157 *inst++ = REX_W; in sljit_emit_enter()
158 *inst++ = MOV_r_rm; in sljit_emit_enter()
159 *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | 0x2 /* rdx */; in sljit_emit_enter()
162 *inst++ = REX_W | REX_B; in sljit_emit_enter()
163 *inst++ = MOV_r_rm; in sljit_emit_enter()
164 *inst++ = MOD_REG | (reg_map[SLJIT_S2] << 3) | 0x0 /* r8 */; in sljit_emit_enter()
175 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_si))); in sljit_emit_enter()
176 FAIL_IF(!inst); in sljit_emit_enter()
178 *inst++ = REX_W; in sljit_emit_enter()
179 *inst++ = GROUP_BINARY_83; in sljit_emit_enter()
180 *inst++ = MOD_REG | SUB | 4; in sljit_emit_enter()
185 *inst++ = 5 * sizeof(sljit_sw); in sljit_emit_enter()
188 *inst++ = 4 * sizeof(sljit_sw); in sljit_emit_enter()
193 *inst++ = REX_W; in sljit_emit_enter()
194 *inst++ = MOV_rm_i32; in sljit_emit_enter()
195 *inst++ = MOD_REG | reg_lmap[SLJIT_R0]; in sljit_emit_enter()
196 *(sljit_si*)inst = local_size; in sljit_emit_enter()
207 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in sljit_emit_enter()
208 FAIL_IF(!inst); in sljit_emit_enter()
210 *inst++ = REX_W; in sljit_emit_enter()
211 *inst++ = GROUP_BINARY_83; in sljit_emit_enter()
212 *inst++ = MOD_REG | SUB | 4; in sljit_emit_enter()
213 *inst++ = local_size; in sljit_emit_enter()
216 inst = (sljit_ub*)ensure_buf(compiler, 1 + 7); in sljit_emit_enter()
217 FAIL_IF(!inst); in sljit_emit_enter()
219 *inst++ = REX_W; in sljit_emit_enter()
220 *inst++ = GROUP_BINARY_81; in sljit_emit_enter()
221 *inst++ = MOD_REG | SUB | 4; in sljit_emit_enter()
222 *(sljit_si*)inst = local_size; in sljit_emit_enter()
223 inst += sizeof(sljit_si); in sljit_emit_enter()
229 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in sljit_emit_enter()
230 FAIL_IF(!inst); in sljit_emit_enter()
232 *inst++ = GROUP_0F; in sljit_emit_enter()
233 *(sljit_si*)inst = 0x20247429; in sljit_emit_enter()
259 sljit_ub *inst; in sljit_emit_return() local
270 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5); in sljit_emit_return()
271 FAIL_IF(!inst); in sljit_emit_return()
273 *inst++ = GROUP_0F; in sljit_emit_return()
274 *(sljit_si*)inst = 0x20247428; in sljit_emit_return()
280 inst = (sljit_ub*)ensure_buf(compiler, 1 + 4); in sljit_emit_return()
281 FAIL_IF(!inst); in sljit_emit_return()
283 *inst++ = REX_W; in sljit_emit_return()
284 *inst++ = GROUP_BINARY_83; in sljit_emit_return()
285 *inst++ = MOD_REG | ADD | 4; in sljit_emit_return()
286 *inst = compiler->local_size; in sljit_emit_return()
289 inst = (sljit_ub*)ensure_buf(compiler, 1 + 7); in sljit_emit_return()
290 FAIL_IF(!inst); in sljit_emit_return()
292 *inst++ = REX_W; in sljit_emit_return()
293 *inst++ = GROUP_BINARY_81; in sljit_emit_return()
294 *inst++ = MOD_REG | ADD | 4; in sljit_emit_return()
295 *(sljit_si*)inst = compiler->local_size; in sljit_emit_return()
301 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
302 FAIL_IF(!inst); in sljit_emit_return()
305 *inst++ = REX_B; in sljit_emit_return()
312 inst = (sljit_ub*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
313 FAIL_IF(!inst); in sljit_emit_return()
316 *inst++ = REX_B; in sljit_emit_return()
320 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_return()
321 FAIL_IF(!inst); in sljit_emit_return()
333 sljit_ub *inst; in emit_do_imm32() local
336 inst = (sljit_ub*)ensure_buf(compiler, 1 + length); in emit_do_imm32()
337 FAIL_IF(!inst); in emit_do_imm32()
340 *inst++ = rex; in emit_do_imm32()
341 *inst++ = opcode; in emit_do_imm32()
342 *(sljit_si*)inst = imm; in emit_do_imm32()
352 sljit_ub *inst; in emit_x86_instruction() local
459 inst = (sljit_ub*)ensure_buf(compiler, 1 + inst_size); in emit_x86_instruction()
460 PTR_FAIL_IF(!inst); in emit_x86_instruction()
465 *inst++ = 0xf2; in emit_x86_instruction()
467 *inst++ = 0xf3; in emit_x86_instruction()
469 *inst++ = 0x66; in emit_x86_instruction()
471 *inst++ = rex; in emit_x86_instruction()
472 buf_ptr = inst + size; in emit_x86_instruction()
477 *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81; in emit_x86_instruction()
489 *inst = GROUP_SHIFT_1; in emit_x86_instruction()
491 *inst = GROUP_SHIFT_N; in emit_x86_instruction()
493 *inst = GROUP_SHIFT_CL; in emit_x86_instruction()
549 return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1); in emit_x86_instruction()
558 sljit_ub *inst; in call_with_args() local
563 inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
564 FAIL_IF(!inst); in call_with_args()
567 *inst++ = REX_W; in call_with_args()
568 *inst++ = MOV_r_rm; in call_with_args()
569 *inst++ = MOD_REG | (0x2 /* rdx */ << 3) | reg_lmap[SLJIT_R2]; in call_with_args()
571 *inst++ = REX_W; in call_with_args()
572 *inst++ = MOV_r_rm; in call_with_args()
573 *inst++ = MOD_REG | (0x7 /* rdi */ << 3) | reg_lmap[SLJIT_R0]; in call_with_args()
577 inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6)); in call_with_args()
578 FAIL_IF(!inst); in call_with_args()
581 *inst++ = REX_W | REX_R; in call_with_args()
582 *inst++ = MOV_r_rm; in call_with_args()
583 *inst++ = MOD_REG | (0x0 /* r8 */ << 3) | reg_lmap[SLJIT_R2]; in call_with_args()
585 *inst++ = REX_W; in call_with_args()
586 *inst++ = MOV_r_rm; in call_with_args()
587 *inst++ = MOD_REG | (0x1 /* rcx */ << 3) | reg_lmap[SLJIT_R0]; in call_with_args()
594 sljit_ub *inst; in sljit_emit_fast_enter() local
606 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_enter()
607 FAIL_IF(!inst); in sljit_emit_fast_enter()
613 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2); in sljit_emit_fast_enter()
614 FAIL_IF(!inst); in sljit_emit_fast_enter()
616 *inst++ = REX_B; in sljit_emit_fast_enter()
623 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in sljit_emit_fast_enter()
624 FAIL_IF(!inst); in sljit_emit_fast_enter()
625 *inst++ = POP_rm; in sljit_emit_fast_enter()
631 sljit_ub *inst; in sljit_emit_fast_return() local
644 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1); in sljit_emit_fast_return()
645 FAIL_IF(!inst); in sljit_emit_fast_return()
651 inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 1); in sljit_emit_fast_return()
652 FAIL_IF(!inst); in sljit_emit_fast_return()
655 *inst++ = REX_B; in sljit_emit_fast_return()
662 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); in sljit_emit_fast_return()
663 FAIL_IF(!inst); in sljit_emit_fast_return()
664 *inst++ = GROUP_FF; in sljit_emit_fast_return()
665 *inst |= PUSH_rm; in sljit_emit_fast_return()
667 inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_return()
668 FAIL_IF(!inst); in sljit_emit_fast_return()
674 inst = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1); in sljit_emit_fast_return()
675 FAIL_IF(!inst); in sljit_emit_fast_return()
678 *inst++ = PUSH_i32; in sljit_emit_fast_return()
679 *(sljit_si*)inst = srcw; in sljit_emit_fast_return()
680 inst += sizeof(sljit_si); in sljit_emit_fast_return()
696 sljit_ub* inst; in emit_mov_int() local
707 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw); in emit_mov_int()
708 FAIL_IF(!inst); in emit_mov_int()
709 *inst = MOV_rm_i32; in emit_mov_int()
715 inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw); in emit_mov_int()
716 FAIL_IF(!inst); in emit_mov_int()
717 *inst = MOV_rm_i32; in emit_mov_int()
728 inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw); in emit_mov_int()
729 FAIL_IF(!inst); in emit_mov_int()
730 *inst++ = MOVSXD_r_rm; in emit_mov_int()
740 inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw); in emit_mov_int()
741 FAIL_IF(!inst); in emit_mov_int()
742 *inst = MOV_rm_r; in emit_mov_int()