Lines Matching refs:imm
44 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm) in load_immediate() argument
51 if (imm <= SIMM_MAX && imm >= SIMM_MIN) in load_immediate()
52 return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm)); in load_immediate()
54 if (!(imm & ~0xffff)) in load_immediate()
55 return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm)); in load_immediate()
57 if (imm <= 0x7fffffffl && imm >= -0x80000000l) { in load_immediate()
58 FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16))); in load_immediate()
59 return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS; in load_immediate()
63 tmp = (imm >= 0) ? imm : ~imm; in load_immediate()
67 tmp = (imm << shift); in load_immediate()
84 tmp2 = imm & ((1ul << (63 - shift)) - 1); in load_immediate()
96 return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS; in load_immediate()
112 FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48))); in load_immediate()
113 FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32))); in load_immediate()
115 FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16))); in load_immediate()
116 return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)); in load_immediate()
220 return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm); in emit_single_op()
225 return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm); in emit_single_op()
230 return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm); in emit_single_op()
234 FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff))); in emit_single_op()
235 …sh_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >>… in emit_single_op()
255 return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm); in emit_single_op()
260 …F(push_inst(compiler, CMPI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm)); in emit_single_op()
262 …n push_inst(compiler, CMPLI | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm); in emit_single_op()
291 return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm); in emit_single_op()
301 return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
305 return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
312 return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
316 return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
320 FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm))); in emit_single_op()
321 return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16)); in emit_single_op()
328 return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
332 return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
336 FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm))); in emit_single_op()
337 return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16)); in emit_single_op()
345 compiler->imm &= 0x1f; in emit_single_op()
346 …ompiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << … in emit_single_op()
349 compiler->imm &= 0x3f; in emit_single_op()
350 return push_inst(compiler, RLDI(dst, src1, compiler->imm, 63 - compiler->imm, 1) | RC(flags)); in emit_single_op()
359 compiler->imm &= 0x1f; in emit_single_op()
360 …RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << … in emit_single_op()
363 compiler->imm &= 0x3f; in emit_single_op()
364 return push_inst(compiler, RLDI(dst, src1, 64 - compiler->imm, compiler->imm, 0) | RC(flags)); in emit_single_op()
375 compiler->imm &= 0x1f; in emit_single_op()
376 FAIL_IF(push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11))); in emit_single_op()
379 compiler->imm &= 0x3f; in emit_single_op()
380 …piler, SRADI | RC(flags) | S(src1) | A(dst) | ((compiler->imm & 0x1f) << 11) | ((compiler->imm & 0… in emit_single_op()