Lines Matching refs:inst

31 	sljit_u8 *inst;  in emit_do_imm()  local
33 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_sw)); in emit_do_imm()
34 FAIL_IF(!inst); in emit_do_imm()
36 *inst++ = opcode; in emit_do_imm()
37 sljit_unaligned_store_sw(inst, imm); in emit_do_imm()
71 sljit_u8 *inst; in sljit_emit_enter() local
107 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_enter()
108 FAIL_IF(!inst); in sljit_emit_enter()
114 *inst++ = MOV_r_rm; in sljit_emit_enter()
115 *inst++ = MOD_REG | (reg_map[TMP_REG1] << 3) | 0x4 /* esp */; in sljit_emit_enter()
127 *inst++ = MOV_r_rm; in sljit_emit_enter()
128 *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | reg_map[SLJIT_R2]; in sljit_emit_enter()
131 *inst++ = MOV_r_rm; in sljit_emit_enter()
132 *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | reg_map[SLJIT_R1]; in sljit_emit_enter()
135 *inst++ = MOV_r_rm; in sljit_emit_enter()
136 *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | 0x4 /* esp */; in sljit_emit_enter()
137 *inst++ = 0x24; in sljit_emit_enter()
138 *inst++ = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */ in sljit_emit_enter()
142 *inst++ = MOV_r_rm; in sljit_emit_enter()
143 *inst++ = MOD_DISP8 | (reg_map[SLJIT_S0] << 3) | reg_map[TMP_REG1]; in sljit_emit_enter()
144 *inst++ = sizeof(sljit_sw) * 2; in sljit_emit_enter()
147 *inst++ = MOV_r_rm; in sljit_emit_enter()
148 *inst++ = MOD_DISP8 | (reg_map[SLJIT_S1] << 3) | reg_map[TMP_REG1]; in sljit_emit_enter()
149 *inst++ = sizeof(sljit_sw) * 3; in sljit_emit_enter()
152 *inst++ = MOV_r_rm; in sljit_emit_enter()
153 *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | reg_map[TMP_REG1]; in sljit_emit_enter()
154 *inst++ = sizeof(sljit_sw) * 4; in sljit_emit_enter()
204 inst = (sljit_u8*)ensure_buf(compiler, 1 + 6); in sljit_emit_enter()
205 FAIL_IF(!inst); in sljit_emit_enter()
208 inst[0] = GROUP_BINARY_81; in sljit_emit_enter()
209 inst[1] = MOD_REG | AND | reg_map[SLJIT_SP]; in sljit_emit_enter()
210 sljit_unaligned_store_sw(inst + 2, ~(sizeof(sljit_f64) - 1)); in sljit_emit_enter()
267 sljit_u8 *inst; in sljit_emit_return() local
297 inst = (sljit_u8*)ensure_buf(compiler, 1 + size); in sljit_emit_return()
298 FAIL_IF(!inst); in sljit_emit_return()
332 sljit_u8 *inst; in emit_x86_instruction() local
402 inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size); in emit_x86_instruction()
403 PTR_FAIL_IF(!inst); in emit_x86_instruction()
408 *inst++ = 0xf2; in emit_x86_instruction()
410 *inst++ = 0xf3; in emit_x86_instruction()
412 *inst++ = 0x66; in emit_x86_instruction()
414 buf_ptr = inst + size; in emit_x86_instruction()
419 *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81; in emit_x86_instruction()
431 *inst = GROUP_SHIFT_1; in emit_x86_instruction()
433 *inst = GROUP_SHIFT_N; in emit_x86_instruction()
435 *inst = GROUP_SHIFT_CL; in emit_x86_instruction()
486 return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1); in emit_x86_instruction()
495 sljit_u8 *inst; in call_with_args() local
498 inst = (sljit_u8*)ensure_buf(compiler, type >= SLJIT_CALL3 ? 1 + 2 + 1 : 1 + 2); in call_with_args()
499 FAIL_IF(!inst); in call_with_args()
504 *inst++ = MOV_r_rm; in call_with_args()
505 *inst++ = MOD_REG | (reg_map[SLJIT_R2] << 3) | reg_map[SLJIT_R0]; in call_with_args()
507 inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 * (type - SLJIT_CALL0)); in call_with_args()
508 FAIL_IF(!inst); in call_with_args()
511 *inst++ = MOV_rm_r; in call_with_args()
512 *inst++ = MOD_DISP8 | (reg_map[SLJIT_R0] << 3) | 0x4 /* SIB */; in call_with_args()
513 *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP]; in call_with_args()
514 *inst++ = 0; in call_with_args()
516 *inst++ = MOV_rm_r; in call_with_args()
517 *inst++ = MOD_DISP8 | (reg_map[SLJIT_R1] << 3) | 0x4 /* SIB */; in call_with_args()
518 *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP]; in call_with_args()
519 *inst++ = sizeof(sljit_sw); in call_with_args()
522 *inst++ = MOV_rm_r; in call_with_args()
523 *inst++ = MOD_DISP8 | (reg_map[SLJIT_R2] << 3) | 0x4 /* SIB */; in call_with_args()
524 *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP]; in call_with_args()
525 *inst++ = 2 * sizeof(sljit_sw); in call_with_args()
533 sljit_u8 *inst; in sljit_emit_fast_enter() local
547 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_enter()
548 FAIL_IF(!inst); in sljit_emit_fast_enter()
556 inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw); in sljit_emit_fast_enter()
557 FAIL_IF(!inst); in sljit_emit_fast_enter()
558 *inst++ = POP_rm; in sljit_emit_fast_enter()
564 sljit_u8 *inst; in sljit_emit_fast_return() local
573 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 1); in sljit_emit_fast_return()
574 FAIL_IF(!inst); in sljit_emit_fast_return()
580 inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw); in sljit_emit_fast_return()
581 FAIL_IF(!inst); in sljit_emit_fast_return()
582 *inst++ = GROUP_FF; in sljit_emit_fast_return()
583 *inst |= PUSH_rm; in sljit_emit_fast_return()
585 inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); in sljit_emit_fast_return()
586 FAIL_IF(!inst); in sljit_emit_fast_return()
591 inst = (sljit_u8*)ensure_buf(compiler, 1 + 5 + 1); in sljit_emit_fast_return()
592 FAIL_IF(!inst); in sljit_emit_fast_return()
595 *inst++ = PUSH_i32; in sljit_emit_fast_return()
596 sljit_unaligned_store_sw(inst, srcw); in sljit_emit_fast_return()
597 inst += sizeof(sljit_sw); in sljit_emit_fast_return()