Lines Matching refs:imm
384 static SLJIT_INLINE sljit_si emit_imm(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm) in emit_imm() argument
386 FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); in emit_imm()
387 return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); in emit_imm()
505 static sljit_uw get_imm(sljit_uw imm);
946 #define TYPE2_TRANSFER_IMM(imm) \ argument
947 (((imm) & 0xf) | (((imm) & 0xf0) << 4) | (1 << 22))
1140 static sljit_uw get_imm(sljit_uw imm) in get_imm() argument
1144 if (imm <= 0xff) in get_imm()
1145 return SRC2_IMM | imm; in get_imm()
1147 if (!(imm & 0xff000000)) { in get_imm()
1148 imm <<= 8; in get_imm()
1152 imm = (imm << 24) | (imm >> 8); in get_imm()
1156 if (!(imm & 0xff000000)) { in get_imm()
1157 imm <<= 8; in get_imm()
1161 if (!(imm & 0xf0000000)) { in get_imm()
1162 imm <<= 4; in get_imm()
1166 if (!(imm & 0xc0000000)) { in get_imm()
1167 imm <<= 2; in get_imm()
1171 if (!(imm & 0x00ffffff)) in get_imm()
1172 return SRC2_IMM | (imm >> 24) | (rol << 8); in get_imm()
1178 static sljit_si generate_int(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm, sljit_si … in generate_int() argument
1189 if (!(imm & mask)) { in generate_int()
1191 imm = (imm << rol) | (imm >> (32 - rol)); in generate_int()
1200 imm = (imm << 8) | (imm >> 24); in generate_int()
1204 if (!(imm & mask)) { in generate_int()
1206 imm = (imm << rol) | (imm >> (32 - rol)); in generate_int()
1221 SLJIT_ASSERT(!(imm & 0xff)); in generate_int()
1223 if (!(imm & 0xff000000)) { in generate_int()
1224 imm1 = SRC2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8); in generate_int()
1225 imm2 = SRC2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8); in generate_int()
1227 else if (imm & 0xc0000000) { in generate_int()
1228 imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); in generate_int()
1229 imm <<= 8; in generate_int()
1232 if (!(imm & 0xff000000)) { in generate_int()
1233 imm <<= 8; in generate_int()
1237 if (!(imm & 0xf0000000)) { in generate_int()
1238 imm <<= 4; in generate_int()
1242 if (!(imm & 0xc0000000)) { in generate_int()
1243 imm <<= 2; in generate_int()
1247 if (!(imm & 0x00ffffff)) in generate_int()
1248 imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8); in generate_int()
1253 if (!(imm & 0xf0000000)) { in generate_int()
1254 imm <<= 4; in generate_int()
1258 if (!(imm & 0xc0000000)) { in generate_int()
1259 imm <<= 2; in generate_int()
1263 imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); in generate_int()
1264 imm <<= 8; in generate_int()
1267 if (!(imm & 0xf0000000)) { in generate_int()
1268 imm <<= 4; in generate_int()
1272 if (!(imm & 0xc0000000)) { in generate_int()
1273 imm <<= 2; in generate_int()
1277 if (!(imm & 0x00ffffff)) in generate_int()
1278 imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8); in generate_int()
1289 static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_uw imm) in load_immediate() argument
1294 if (!(imm & ~0xffff)) in load_immediate()
1295 return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)); in load_immediate()
1299 tmp = get_imm(imm); in load_immediate()
1303 tmp = get_imm(~imm); in load_immediate()
1309 FAIL_IF(generate_int(compiler, reg, imm, 1)); in load_immediate()
1310 FAIL_IF(generate_int(compiler, reg, ~imm, 0)); in load_immediate()
1313 …_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_PC, 0), imm); in load_immediate()
1315 return emit_imm(compiler, reg, imm); in load_immediate()
1338 sljit_uw imm; in getput_arg_fast() local
1341 imm = get_imm(argw); in getput_arg_fast()
1342 if (imm) { in getput_arg_fast()
1345 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1348 imm = get_imm(~argw); in getput_arg_fast()
1349 if (imm) { in getput_arg_fast()
1352 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, imm))); in getput_arg_fast()
1440 #define GETPUT_ARG_DATA_TRANSFER(add, wb, target, base, imm) \ argument
1442 FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, imm))); \
1444 …ush_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, TYPE2_TRANSFER_IMM(imm))));
1464 sljit_uw imm; in getput_arg() local
1478 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1479 …if ((compiler->cache_arg & SLJIT_IMM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delt… in getput_arg()
1480 if (imm <= (sljit_uw)max_delta) { in getput_arg()
1495 imm = (sljit_uw)(argw - next_argw); in getput_arg()
1496 if ((next_arg & SLJIT_MEM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delta)) { in getput_arg()
1517 imm = (sljit_uw)(argw - compiler->cache_argw); in getput_arg()
1518 if (compiler->cache_arg == arg && imm <= (sljit_uw)max_delta) { in getput_arg()
1520 GETPUT_ARG_DATA_TRANSFER(1, 0, reg, TMP_REG3, imm); in getput_arg()
1523 if (compiler->cache_arg == arg && imm >= (sljit_uw)-max_delta) { in getput_arg()
1525 imm = (sljit_uw)-(sljit_sw)imm; in getput_arg()
1526 GETPUT_ARG_DATA_TRANSFER(0, 0, reg, TMP_REG3, imm); in getput_arg()
1530 imm = get_imm(argw & ~max_delta); in getput_arg()
1531 if (imm) { in getput_arg()
1533 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1538 imm = get_imm(-argw & ~max_delta); in getput_arg()
1539 if (imm) { in getput_arg()
1542 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, tmp_r, arg & REG_MASK, imm))); in getput_arg()
1563 imm = (sljit_uw)(argw - next_argw); in getput_arg()
1564 …if (arg == next_arg && !(inp_flags & WRITE_BACK) && (imm <= (sljit_uw)max_delta || imm >= (sljit_u… in getput_arg()
2046 sljit_uw imm; in emit_fop_mem() local
2082 imm = get_imm(argw & ~0x3fc); in emit_fop_mem()
2083 if (imm) { in emit_fop_mem()
2084 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()
2087 imm = get_imm(-argw & ~0x3fc); in emit_fop_mem()
2088 if (imm) { in emit_fop_mem()
2090 FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & REG_MASK, imm))); in emit_fop_mem()