Lines Matching refs:sljit_ins
38 typedef sljit_u32 sljit_ins; typedef
65 #define RD(rd) ((sljit_ins)reg_map[rd] << 7)
66 #define RS1(rs1) ((sljit_ins)reg_map[rs1] << 15)
67 #define RS2(rs2) ((sljit_ins)reg_map[rs2] << 20)
68 #define FRD(rd) ((sljit_ins)freg_map[rd] << 7)
69 #define FRS1(rs1) ((sljit_ins)freg_map[rs1] << 15)
70 #define FRS2(rs2) ((sljit_ins)freg_map[rs2] << 20)
71 #define IMM_I(imm) ((sljit_ins)(imm) << 20)
72 #define IMM_S(imm) ((((sljit_ins)(imm) & 0xfe0) << 20) | (((sljit_ins)(imm) & 0x1f) << 7))
75 #define OPC(o) ((sljit_ins)(o))
76 #define F3(f) ((sljit_ins)(f) << 12)
77 #define F12(f) ((sljit_ins)(f) << 20)
78 #define F7(f) ((sljit_ins)(f) << 25)
156 static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins) in push_inst()
158 sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in push_inst()
165 static sljit_s32 push_imm_s_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_sw imm) in push_imm_s_inst()
170 static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code, sljit_sw … in detect_jump_type()
174 sljit_ins *inst; in detect_jump_type()
176 inst = (sljit_ins *)jump->addr; in detect_jump_type()
207 inst[-1] -= (sljit_ins)(1 * sizeof(sljit_ins)) << 7; in detect_jump_type()
209 inst[-1] -= (sljit_ins)(5 * sizeof(sljit_ins)) << 7; in detect_jump_type()
220 inst[-1] -= (sljit_ins)(4 * sizeof(sljit_ins)) << 7; in detect_jump_type()
229 inst[-1] -= (sljit_ins)(4 * sizeof(sljit_ins)) << 7; in detect_jump_type()
238 inst[-1] -= (sljit_ins)(2 * sizeof(sljit_ins)) << 7; in detect_jump_type()
247 inst[-1] -= (sljit_ins)(1 * sizeof(sljit_ins)) << 7; in detect_jump_type()
267 …INLINE sljit_sw mov_addr_get_length(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code,… in mov_addr_get_length()
315 sljit_ins *ins = (sljit_ins*)jump->addr; in load_addr_to_reg()
331 ins[0] = AUIPC | RD(reg) | (sljit_ins)((sljit_sw)addr & ~0xfff); in load_addr_to_reg()
346 ins[0] = LUI | RD(reg) | (sljit_ins)((sljit_sw)addr & ~0xfff); in load_addr_to_reg()
351 ins[0] = LUI | RD(reg) | (sljit_ins)((sljit_sw)addr & ~0xfff); in load_addr_to_reg()
358 ins[0] = LUI | RD(reg) | (sljit_ins)0x80000000u; in load_addr_to_reg()
364 ins[0] = LUI | RD(reg) | (sljit_ins)(high & ~0xfff); in load_addr_to_reg()
378 ins[0] = LUI | RD(TMP_REG3) | (sljit_ins)(high << 12); in load_addr_to_reg()
382 ins[0] = LUI | RD(TMP_REG3) | (sljit_ins)(high & ~0xfff); in load_addr_to_reg()
387 ins[1] = LUI | RD(reg) | (sljit_ins)((sljit_sw)addr & ~0xfff); in load_addr_to_reg()
502 sljit_ins *code; in sljit_generate_code()
503 sljit_ins *code_ptr; in sljit_generate_code()
504 sljit_ins *buf_ptr; in sljit_generate_code()
505 sljit_ins *buf_end; in sljit_generate_code()
520 …code = (sljit_ins*)allocate_executable_memory(compiler->size * sizeof(sljit_ins), options, exec_al… in sljit_generate_code()
535 buf_ptr = (sljit_ins*)buf->memory; in sljit_generate_code()
557 …CH_B) || ((sljit_uw)code_ptr - jump->addr < (jump->flags >> JUMP_SIZE_SHIFT) * sizeof(sljit_ins))); in sljit_generate_code()
607 buf_ptr = (sljit_ins *)jump->addr; in sljit_generate_code()
613 buf_ptr[0] |= (sljit_ins)addr; in sljit_generate_code()
619 buf_ptr[0] = JAL | RD((jump->flags & IS_CALL) ? RETURN_ADDR_REG : TMP_ZERO) | (sljit_ins)addr; in sljit_generate_code()
627 compiler->executable_size = (sljit_uw)(code_ptr - code) * sizeof(sljit_ins); in sljit_generate_code()
629 code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); in sljit_generate_code()
630 code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset); in sljit_generate_code()
946 static const sljit_ins data_transfer_insts[16 + 4] = {
975 sljit_ins ins; in push_mem_inst()
1169 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_clz_ctz()
1170 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_clz_ctz()
1172 sljit_ins word_size = 32; in emit_clz_ctz()
1184 …er, BEQ | RS1(TMP_REG2) | RS2(TMP_ZERO) | ((sljit_ins)((is_clz ? 4 : 5) * SSIZE_OF(ins)) << 7) | (… in emit_clz_ctz()
1189 …t(compiler, BNE | RS1(TMP_REG1) | RS2(TMP_ZERO) | ((sljit_ins)(2 * SSIZE_OF(ins)) << 7) | ((sljit_… in emit_clz_ctz()
1191 …t(compiler, BLT | RS1(TMP_REG2) | RS2(TMP_ZERO) | ((sljit_ins)(2 * SSIZE_OF(ins)) << 7) | ((sljit_… in emit_clz_ctz()
1200 …FAIL_IF(push_inst(compiler, BNE | RS1(TMP_REG2) | RS2(TMP_ZERO) | ((sljit_ins)0xfe000e80 - ((2 * S… in emit_clz_ctz()
1204 …FAIL_IF(push_inst(compiler, BEQ | RS1(TMP_REG2) | RS2(TMP_ZERO) | ((sljit_ins)0xfe000e80 - ((5 * S… in emit_clz_ctz()
1255 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_rev16()
1256 sljit_ins word_size = (op & SLJIT_32) ? 32 : 64; in emit_rev16()
1258 sljit_ins word_size = 32; in emit_rev16()
1290 sljit_ins op_imm, op_reg; in emit_single_op()
1292 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in emit_single_op()
1851 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_op0()
2044 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_op2r()
2069 sljit_ins ins1, ins2, ins3; in sljit_emit_shift_into()
2071 sljit_ins word = (sljit_ins)(op & SLJIT_32) >> 5; in sljit_emit_shift_into()
2136 FAIL_IF(push_inst(compiler, XORI | RD(TMP_REG2) | RS1(src3) | IMM_I((sljit_ins)bit_length - 1))); in sljit_emit_shift_into()
2221 return push_inst(compiler, *(sljit_ins*)instruction); in sljit_emit_op_custom()
2229 #define FMT(op) ((sljit_ins)((op & SLJIT_32) ^ SLJIT_32) << 17)
2264 static sljit_s32 sljit_emit_fop1_conv_f64_from_w(struct sljit_compiler *compiler, sljit_ins ins, in sljit_emit_fop1_conv_f64_from_w()
2293 sljit_ins ins = FCVT_S_W | FMT(op); in sljit_emit_fop1_conv_f64_from_sw()
2315 sljit_ins ins = FCVT_S_WU | FMT(op); in sljit_emit_fop1_conv_f64_from_uw()
2337 sljit_ins inst; in sljit_emit_fop1_cmp()
2558 #define BRANCH_LENGTH ((sljit_ins)(3 * sizeof(sljit_ins)) << 7)
2560 #define BRANCH_LENGTH ((sljit_ins)(7 * sizeof(sljit_ins)) << 7)
2563 static sljit_ins get_jump_instruction(sljit_s32 type) in get_jump_instruction()
2614 sljit_ins inst; in sljit_emit_jump()
2668 sljit_ins inst; in sljit_emit_cmp()
2912 sljit_ins *ptr; in sljit_emit_select()
2915 sljit_ins word = (sljit_ins)(type & SLJIT_32) >> 5; in sljit_emit_select()
2950 ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in sljit_emit_select()
2966 …*ptr = get_jump_instruction(type & ~SLJIT_32) | (sljit_ins)((size & 0x7) << 9) | (sljit_ins)((size… in sljit_emit_select()
2977 sljit_ins *ptr; in sljit_emit_fselect()
2996 ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins)); in sljit_emit_fselect()
3006 …*ptr = get_jump_instruction(type & ~SLJIT_32) | (sljit_ins)((size & 0x7) << 9) | (sljit_ins)((size… in sljit_emit_fselect()
3105 PTR_FAIL_IF(push_inst(compiler, (sljit_ins)dst_r)); in sljit_emit_mov_addr()