Lines Matching refs:imm

41 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)  in load_immediate()  argument
48 if (imm <= SIMM_MAX && imm >= SIMM_MIN) in load_immediate()
49 return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm)); in load_immediate()
51 if (!(imm & ~0xffff)) in load_immediate()
52 return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm)); in load_immediate()
54 if (imm <= 0x7fffffffl && imm >= -0x80000000l) { in load_immediate()
55 FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16))); in load_immediate()
56 return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS; in load_immediate()
60 tmp = (imm >= 0) ? imm : ~imm; in load_immediate()
64 tmp = (imm << shift); in load_immediate()
81 tmp2 = imm & ((1ul << (63 - shift)) - 1); in load_immediate()
93 return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS; in load_immediate()
109 FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48))); in load_immediate()
110 FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32))); in load_immediate()
112 FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16))); in load_immediate()
113 return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)); in load_immediate()
241 return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm); in emit_single_op()
244 …h_inst(compiler, ADDIS | D(dst) | A(src1) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >>… in emit_single_op()
248 return push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)); in emit_single_op()
253 return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm); in emit_single_op()
269 …(push_inst(compiler, CMPLI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm)); in emit_single_op()
272 return push_inst(compiler, ADDI | D(dst) | A(src1) | (-compiler->imm & 0xffff)); in emit_single_op()
297 return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm); in emit_single_op()
303 …rn push_inst(compiler, CMPI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm); in emit_single_op()
322 return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm); in emit_single_op()
332 return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
336 return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
343 return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
347 return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
351 FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm))); in emit_single_op()
352 return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16)); in emit_single_op()
359 return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm); in emit_single_op()
363 return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm); in emit_single_op()
367 FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm))); in emit_single_op()
368 return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16)); in emit_single_op()
376 compiler->imm &= 0x1f; in emit_single_op()
377 …ompiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << … in emit_single_op()
379 compiler->imm &= 0x3f; in emit_single_op()
380 return push_inst(compiler, RLDI(dst, src1, compiler->imm, 63 - compiler->imm, 1) | RC(flags)); in emit_single_op()
388 compiler->imm &= 0x1f; in emit_single_op()
389 …RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << … in emit_single_op()
391 compiler->imm &= 0x3f; in emit_single_op()
392 return push_inst(compiler, RLDI(dst, src1, 64 - compiler->imm, compiler->imm, 0) | RC(flags)); in emit_single_op()
400 compiler->imm &= 0x1f; in emit_single_op()
401 return push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11)); in emit_single_op()
403 compiler->imm &= 0x3f; in emit_single_op()
404 …piler, SRADI | RC(flags) | S(src1) | A(dst) | ((compiler->imm & 0x1f) << 11) | ((compiler->imm & 0… in emit_single_op()