Lines Matching refs:sljit_ins
32 typedef sljit_u32 sljit_ins; typedef
77 #define RD(rd) ((sljit_ins)reg_map[rd])
78 #define RJ(rj) ((sljit_ins)reg_map[rj] << 5)
79 #define RK(rk) ((sljit_ins)reg_map[rk] << 10)
80 #define RA(ra) ((sljit_ins)reg_map[ra] << 15)
82 #define FD(fd) ((sljit_ins)reg_map[fd])
83 #define FRD(fd) ((sljit_ins)freg_map[fd])
84 #define FRJ(fj) ((sljit_ins)freg_map[fj] << 5)
85 #define FRK(fk) ((sljit_ins)freg_map[fk] << 10)
86 #define FRA(fa) ((sljit_ins)freg_map[fa] << 15)
88 #define IMM_V(imm) ((sljit_ins)(imm) << 10)
89 #define IMM_I8(imm) (((sljit_ins)(imm)&0xff) << 10)
90 #define IMM_I12(imm) (((sljit_ins)(imm)&0xfff) << 10)
91 #define IMM_I14(imm) (((sljit_ins)(imm)&0xfff3) << 10)
92 #define IMM_I16(imm) (((sljit_ins)(imm)&0xffff) << 10)
93 #define IMM_I20(imm) (((sljit_ins)(imm)&0xffffffff) >> 12 << 5)
94 #define IMM_I21(imm) ((((sljit_ins)(imm)&0xffff) << 10) | (((sljit_ins)(imm) >> 16) & 0x1f))
95 #define IMM_I26(imm) ((((sljit_ins)(imm)&0xffff) << 10) | (((sljit_ins)(imm) >> 16) & 0x3ff))
97 #define OPC_I26(opc) ((sljit_ins)(opc) << 26)
98 #define OPC_1RI21(opc) ((sljit_ins)(opc) << 26)
99 #define OPC_2RI16(opc) ((sljit_ins)(opc) << 26)
100 #define OPC_2RI14(opc) ((sljit_ins)(opc) << 24)
101 #define OPC_2RI12(opc) ((sljit_ins)(opc) << 22)
102 #define OPC_2RI8(opc) ((sljit_ins)(opc) << 18)
103 #define OPC_4R(opc) ((sljit_ins)(opc) << 20)
104 #define OPC_3R(opc) ((sljit_ins)(opc) << 15)
105 #define OPC_2R(opc) ((sljit_ins)(opc) << 10)
106 #define OPC_1RI20(opc) ((sljit_ins)(opc) << 25)
163 #define SLLI_D ((sljit_ins)(0x41) << 16)
165 #define SRLI_D ((sljit_ins)(0x45) << 16)
167 #define SRAI_D ((sljit_ins)(0x49) << 16)
169 #define ROTRI_D ((sljit_ins)(0x4d) << 16)
368 #define INST(inst, type) ((sljit_ins)((type & SLJIT_32) ? inst##_W : inst##_D))
399 static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins) in push_inst()
401 sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in push_inst()
408 static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code, sljit_sw … in detect_jump_type()
412 sljit_ins *inst; in detect_jump_type()
414 inst = (sljit_ins *)jump->addr; in detect_jump_type()
444 inst[-1] |= (sljit_ins)IMM_I16(2); in detect_jump_type()
453 inst[-1] |= (sljit_ins)IMM_I16(3); in detect_jump_type()
462 inst[-1] |= (sljit_ins)IMM_I16(3); in detect_jump_type()
471 inst[-1] |= (sljit_ins)IMM_I16(4); in detect_jump_type()
480 inst[-1] |= (sljit_ins)IMM_I16(5); in detect_jump_type()
485 …INLINE sljit_sw mov_addr_get_length(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code,… in mov_addr_get_length()
525 sljit_ins *ins = (sljit_ins*)jump->addr; in load_addr_to_reg()
549 ins[0] = LU12I_W | RD(reg) | (sljit_ins)(((addr & 0xffffffff) >> 12) << 5); in load_addr_to_reg()
551 ins[0] = LU12I_W | RD(reg) | (sljit_ins)(((addr & 0xffffffff) >> 12) << 5); in load_addr_to_reg()
552 ins[1] = LU32I_D | RD(reg) | (sljit_ins)(((addr >> 32) & 0xfffff) << 5); in load_addr_to_reg()
555 ins[0] = LU12I_W | RD(reg) | (sljit_ins)(((addr & 0xffffffff) >> 12) << 5); in load_addr_to_reg()
556 ins[1] = LU32I_D | RD(reg) | (sljit_ins)(((addr >> 32) & 0xfffff) << 5); in load_addr_to_reg()
660 sljit_ins *code; in sljit_generate_code()
661 sljit_ins *code_ptr; in sljit_generate_code()
662 sljit_ins *buf_ptr; in sljit_generate_code()
663 sljit_ins *buf_end; in sljit_generate_code()
678 …code = (sljit_ins*)allocate_executable_memory(compiler->size * sizeof(sljit_ins), options, exec_al… in sljit_generate_code()
693 buf_ptr = (sljit_ins*)buf->memory; in sljit_generate_code()
715 …CH_B) || ((sljit_uw)code_ptr - jump->addr < (jump->flags >> JUMP_SIZE_SHIFT) * sizeof(sljit_ins))); in sljit_generate_code()
759 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
764 buf_ptr[0] |= (sljit_ins)IMM_I16(addr >> 2); in sljit_generate_code()
770 buf_ptr[0] = BL | (sljit_ins)IMM_I26(addr >> 2); in sljit_generate_code()
772 buf_ptr[0] = B | (sljit_ins)IMM_I26(addr >> 2); in sljit_generate_code()
779 compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); in sljit_generate_code()
781 code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); in sljit_generate_code()
782 code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
874 FAIL_IF(push_inst(compiler, LU12I_W | RD(dst_r) | (sljit_ins)(((imm & 0xffffffff) >> 12) << 5))); in load_immediate()
877 FAIL_IF(push_inst(compiler, LU12I_W | RD(dst_r) | (sljit_ins)(((imm & 0xffffffff) >> 12) << 5))); in load_immediate()
879 return push_inst(compiler, LU32I_D | RD(dst_r) | (sljit_ins)(((imm >> 32) & 0xfffff) << 5)); in load_immediate()
881 FAIL_IF(push_inst(compiler, LU12I_W | RD(dst_r) | (sljit_ins)(((imm & 0xffffffff) >> 12) << 5))); in load_immediate()
883 FAIL_IF(push_inst(compiler, LU32I_D | RD(dst_r) | (sljit_ins)(((imm >> 32) & 0xfffff) << 5))); in load_immediate()
1079 static const sljit_ins data_transfer_insts[16 + 4] = {
1104 static const sljit_ins data_transfer_insts_x[16 + 4] = {
1131 sljit_ins ins; in push_mem_inst()
1317 sljit_ins op_imm, op_reg; in emit_single_op()
1318 sljit_ins word_size = ((op & SLJIT_32) ? 32 : 64); in emit_single_op()
2053 sljit_ins ins1, ins2, ins3; in sljit_emit_shift_into()
2113 FAIL_IF(push_inst(compiler, XORI | RD(TMP_REG2) | RJ(src3) | IMM_I12((sljit_ins)bit_length - 1))); in sljit_emit_shift_into()
2211 return push_inst(compiler, *(sljit_ins*)instruction); in sljit_emit_op_custom()
2217 #define SET_COND(cond) (sljit_ins)(cond << 15)
2230 #define FINST(inst, type) (sljit_ins)((type & SLJIT_32) ? inst##_S : inst##_D)
2231 #define FCD(cd) (sljit_ins)(cd & 0x7)
2232 #define FCJ(cj) (sljit_ins)((cj & 0x7) << 5)
2233 #define FCA(ca) (sljit_ins)((ca & 0x7) << 15)
2243 sljit_ins inst; in sljit_emit_fop1_conv_sw_from_f64()
2278 sljit_ins inst; in sljit_emit_fop1_conv_f64_from_w()
2286 inst = (sljit_ins)((op & SLJIT_32) ? FFINT_S_L : FFINT_D_L); in sljit_emit_fop1_conv_f64_from_w()
2289 inst = (sljit_ins)((op & SLJIT_32) ? FFINT_S_W : FFINT_D_W); in sljit_emit_fop1_conv_f64_from_w()
2325 sljit_ins inst; in sljit_emit_fop1_conv_f64_from_uw()
2333 inst = (sljit_ins)((op & SLJIT_32) ? FFINT_S_L : FFINT_D_L); in sljit_emit_fop1_conv_f64_from_uw()
2336 inst = (sljit_ins)((op & SLJIT_32) ? FFINT_S_W : FFINT_D_W); in sljit_emit_fop1_conv_f64_from_uw()
2611 sljit_ins inst; in sljit_emit_fcopy()
2643 static sljit_ins get_jump_instruction(sljit_s32 type) in get_jump_instruction()
2697 sljit_ins inst; in sljit_emit_jump()
2751 sljit_ins inst; in sljit_emit_cmp()
2997 sljit_ins *ptr; in sljit_emit_select()
3027 ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in sljit_emit_select()
3169 sljit_ins ins = 0; in sljit_emit_simd_mov()
3192 ins |= VOR_V | (sljit_ins)1 << 26; in sljit_emit_simd_mov()
3218 sljit_ins ins = 0; in sljit_emit_simd_replicate()
3238 ins = (sljit_ins)1 << 25; in sljit_emit_simd_replicate()
3240 …return push_inst(compiler, VLDREPL | ins | FRD(freg) | RJ(src) | (sljit_ins)1 << (23 - elem_size)); in sljit_emit_simd_replicate()
3244 ins = (sljit_ins)1 << 26; in sljit_emit_simd_replicate()
3248 …return push_inst(compiler, VREPLGR2VR | ins | FRD(freg) | RJ(TMP_ZERO) | (sljit_ins)elem_size << 1… in sljit_emit_simd_replicate()
3250 …FAIL_IF(push_inst(compiler, VREPLVE | ins | FRD(freg) | FRJ(src) | RK(TMP_ZERO) | (sljit_ins)elem_… in sljit_emit_simd_replicate()
3253 ins = (sljit_ins)(0x44 << 10); in sljit_emit_simd_replicate()
3260 ins |= VREPLGR2VR | (sljit_ins)elem_size << 10; in sljit_emit_simd_replicate()
3276 sljit_ins ins = 0; in sljit_emit_simd_lane_mov()
3299 ins = (reg_size == 5) ? ((sljit_ins)1 << 26) : 0; in sljit_emit_simd_lane_mov()
3314 ins = (sljit_ins)1 << 25; in sljit_emit_simd_lane_mov()
3317 ins |= (sljit_ins)lane_index << 18 | (sljit_ins)(1 << (23 - elem_size)); in sljit_emit_simd_lane_mov()
3322 ins = (sljit_ins)(0x3f ^ (0x1f >> elem_size)) << 10; in sljit_emit_simd_lane_mov()
3326 … FAIL_IF(push_inst(compiler, VOR_V | (sljit_ins)1 << 26 | FRD(TMP_FREG1) | FRJ(freg) | FRK(freg))); in sljit_emit_simd_lane_mov()
3328 …FAIL_IF(push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(TMP_FREG1) | FRJ(freg) | IMM_I8(1))… in sljit_emit_simd_lane_mov()
3330 … return push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(freg) | FRJ(TMP_FREG1) | IMM_I8(2)); in sljit_emit_simd_lane_mov()
3333 …return push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(freg) | FRJ(TMP_FREG1) | IMM_I8(18)); in sljit_emit_simd_lane_mov()
3336 ins = (sljit_ins)(0x3f ^ (0x3f >> elem_size)) << 10 | (sljit_ins)1 << 26; in sljit_emit_simd_lane_mov()
3344 …ins = (reg_size == 5) ? (sljit_ins)(0x3f ^ (0x3f >> elem_size)) << 10 | (sljit_ins)1 << 26 : (slji… in sljit_emit_simd_lane_mov()
3361 ins = (sljit_ins)(0x3f ^ (0x1f >> elem_size)) << 10; in sljit_emit_simd_lane_mov()
3364 ins |= (sljit_ins)(VPICKVE2GR_U ^ (0x7 << 18)); in sljit_emit_simd_lane_mov()
3372 ins |= (sljit_ins)(VPICKVE2GR_U ^ (0x7 << 18)); in sljit_emit_simd_lane_mov()
3376 … FAIL_IF(push_inst(compiler, VOR_V | (sljit_ins)1 << 26 | FRD(TMP_FREG1) | FRJ(freg) | FRK(freg))); in sljit_emit_simd_lane_mov()
3377 …FAIL_IF(push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(TMP_FREG1) | FRJ(freg) | IMM_I8(1))… in sljit_emit_simd_lane_mov()
3381 ins ^= (sljit_ins)1 << (15 - elem_size); in sljit_emit_simd_lane_mov()
3382 ins |= (sljit_ins)1 << 26; in sljit_emit_simd_lane_mov()
3388 ins = (sljit_ins)(0x3f ^ (0x1f >> elem_size)) << 10; in sljit_emit_simd_lane_mov()
3392 … FAIL_IF(push_inst(compiler, VOR_V | (sljit_ins)1 << 26 | FRD(TMP_FREG1) | FRJ(freg) | FRK(freg))); in sljit_emit_simd_lane_mov()
3394 …FAIL_IF(push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(TMP_FREG1) | FRJ(freg) | IMM_I8(1))… in sljit_emit_simd_lane_mov()
3396 … return push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(freg) | FRJ(TMP_FREG1) | IMM_I8(2)); in sljit_emit_simd_lane_mov()
3399 …return push_inst(compiler, XVPERMI | (sljit_ins)1 << 18 | FRD(freg) | FRJ(TMP_FREG1) | IMM_I8(18)); in sljit_emit_simd_lane_mov()
3402 ins = (sljit_ins)(0x3f ^ (0x3f >> elem_size)) << 10 | (sljit_ins)1 << 26; in sljit_emit_simd_lane_mov()
3417 sljit_ins ins = 0; in sljit_emit_simd_lane_replicate()
3431 ins = (sljit_ins)(0x3f ^ (0x1f >> elem_size)) << 10; in sljit_emit_simd_lane_replicate()
3434 …FAIL_IF(push_inst(compiler, VREPLVEI | (sljit_ins)1 << 26 | ins | FRD(freg) | FRJ(src) | IMM_V(src… in sljit_emit_simd_lane_replicate()
3436 …ins = (src_lane_index < (2 << (3 - elem_size))) ? (sljit_ins)(0x44 << 10) : (sljit_ins)(0xee << 10… in sljit_emit_simd_lane_replicate()
3451 sljit_ins ins = 0; in sljit_emit_simd_extend()
3488 ins = (sljit_ins)1 << 26; in sljit_emit_simd_extend()
3495 ins = (type & SLJIT_SIMD_EXTEND_SIGNED) ? VSLLWIL : (VSLLWIL | (sljit_ins)1 << 18); in sljit_emit_simd_extend()
3498 ins |= (sljit_ins)1 << 26; in sljit_emit_simd_extend()
3504 FAIL_IF(push_inst(compiler, ins | ((sljit_ins)1 << (13 + elem_size)) | FRD(freg) | FRJ(src))); in sljit_emit_simd_extend()
3517 sljit_ins ins = 0; in sljit_emit_simd_sign()
3540 ins = (sljit_ins)1 << 26; in sljit_emit_simd_sign()
3542 …FAIL_IF(push_inst(compiler, VMSKLTZ | ins | (sljit_ins)(elem_size << 10) | FRD(TMP_FREG1) | FRJ(fr… in sljit_emit_simd_sign()
3544 FAIL_IF(push_inst(compiler, VPICKVE2GR_U | (sljit_ins)(0x3c << 10) | RD(dst_r) | FRJ(TMP_FREG1))); in sljit_emit_simd_sign()
3547 …FAIL_IF(push_inst(compiler, VPICKVE2GR_U | (sljit_ins)(0x38 << 10) | ins | RD(TMP_REG3) | FRJ(TMP_… in sljit_emit_simd_sign()
3563 sljit_ins ins = 0; in sljit_emit_simd_op2()
3593 ins |= (sljit_ins)1 << 26; in sljit_emit_simd_op2()
3603 sljit_ins ins; in sljit_emit_atomic_load()
3635 sljit_ins ins = 0; in sljit_emit_atomic_store()
3636 sljit_ins unsign = 0; in sljit_emit_atomic_store()
3678 …emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw init_value, sljit_ins last_ins) in emit_const()
3682 …FAIL_IF(push_inst(compiler, LU12I_W | RD(dst) | (sljit_ins)(((init_value & 0xffffffff) >> 12) << 5… in emit_const()
3683 FAIL_IF(push_inst(compiler, LU32I_D | RD(dst) | (sljit_ins)(((init_value >> 32) & 0xfffff) << 5))); in emit_const()
3684 FAIL_IF(push_inst(compiler, LU52I_D | RD(dst) | RJ(dst) | (sljit_ins)(IMM_I12(init_value >> 52)))); in emit_const()
3690 sljit_ins *inst = (sljit_ins*)addr; in sljit_set_jump_addr()
3696 …inst[0] = (inst[0] & (OPC_1RI20(0x7f) | 0x1f)) | (sljit_ins)(((new_target & 0xffffffff) >> 12) << … in sljit_set_jump_addr()
3699 …inst[1] = (inst[1] & (OPC_1RI20(0x7f) | 0x1f)) | (sljit_ins)(sljit_ins)(((new_target >> 32) & 0xff… in sljit_set_jump_addr()
3712 inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); in sljit_set_jump_addr()
3752 PTR_FAIL_IF(push_inst(compiler, (sljit_ins)dst_r)); in sljit_emit_mov_addr()