Lines Matching refs:imm
136 …SLJIT_INLINE sljit_si emit_imm64_const(struct sljit_compiler *compiler, sljit_si dst, sljit_uw imm) in emit_imm64_const() argument
138 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in emit_imm64_const()
139 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21))); in emit_imm64_const()
140 FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21))); in emit_imm64_const()
141 return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21)); in emit_imm64_const()
349 static sljit_ins logical_imm(sljit_sw imm, sljit_si len) in logical_imm() argument
357 if (len == 32 && (imm == 0 || imm == -1)) in logical_imm()
359 if (len == 16 && ((sljit_si)imm == 0 || (sljit_si)imm == -1)) in logical_imm()
363 SLJIT_ASSERT((len == 32 && imm != 0 && imm != -1) in logical_imm()
364 || (len == 16 && (sljit_si)imm != 0 && (sljit_si)imm != -1)); in logical_imm()
365 uimm = (sljit_uw)imm; in logical_imm()
392 imm = (sljit_sw)~uimm; in logical_imm()
393 SLJIT_ASSERT(imm < 0); in logical_imm()
395 COUNT_TRAILING_ZERO(imm, ones); in logical_imm()
397 if (~imm) in logical_imm()
415 sljit_uw imm = (sljit_uw)simm; in load_immediate() local
419 if (imm <= 0xffff) in load_immediate()
420 return push_inst(compiler, MOVZ | RD(dst) | (imm << 5)); in load_immediate()
423 return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
425 if (imm <= 0xffffffffl) { in load_immediate()
426 if ((imm & 0xffff0000l) == 0xffff0000) in load_immediate()
427 return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5)); in load_immediate()
428 if ((imm & 0xffff) == 0xffff) in load_immediate()
429 …return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21… in load_immediate()
440 if (imm <= 0xffffffffl) { in load_immediate()
441 FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5))); in load_immediate()
442 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
446 FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5))); in load_immediate()
447 return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21)); in load_immediate()
463 simm = (sljit_sw)imm; in load_immediate()
524 sljit_sw imm, nimm; in emit_op_imm() local
539 imm = (flags & ARG2_IMM) ? arg2 : arg1; in emit_op_imm()
552 return load_immediate(compiler, dst, imm); in emit_op_imm()
555 FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm)); in emit_op_imm()
560 imm = -imm; in emit_op_imm()
563 if (imm == 0) { in emit_op_imm()
567 if (imm > 0 && imm <= 0xfff) { in emit_op_imm()
569 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10)); in emit_op_imm()
571 nimm = -imm; in emit_op_imm()
576 if (imm > 0 && imm <= 0xffffff && !(imm & 0xfff)) { in emit_op_imm()
578 …return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)… in emit_op_imm()
584 if (imm > 0 && imm <= 0xffffff && !(flags & SET_FLAGS)) { in emit_op_imm()
585 …FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22… in emit_op_imm()
586 return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10)); in emit_op_imm()
594 inst_bits = logical_imm(imm, LOGICAL_IMM_CHECK | ((flags & INT_OP) ? 16 : 32)); in emit_op_imm()
601 inst_bits = logical_imm(imm, LOGICAL_IMM_CHECK | ((flags & INT_OP) ? 16 : 32)); in emit_op_imm()
614 imm &= 0x1f; in emit_op_imm()
615 …h_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 - imm) << 1… in emit_op_imm()
618 imm &= 0x3f; in emit_op_imm()
619 …ler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) << 16) | ((63 - imm) << 1… in emit_op_imm()
629 imm &= 0x1f; in emit_op_imm()
630 FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10))); in emit_op_imm()
633 imm &= 0x3f; in emit_op_imm()
634 …FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63… in emit_op_imm()