Lines Matching refs:imm

396 static SLJIT_INLINE sljit_s32 emit_imm(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)  in emit_imm()  argument
398 FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); in emit_imm()
399 return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); in emit_imm()
522 static sljit_uw get_imm(sljit_uw imm);
934 #define TYPE2_TRANSFER_IMM(imm) \ argument
935 (((imm) & 0xf) | (((imm) & 0xf0) << 4) | (1 << 22))
1188 static sljit_uw get_imm(sljit_uw imm) in get_imm() argument
1192 if (imm <= 0xff) in get_imm()
1193 return SRC2_IMM | imm; in get_imm()
1195 if (!(imm & 0xff000000)) { in get_imm()
1196 imm <<= 8; in get_imm()
1200 imm = (imm << 24) | (imm >> 8); in get_imm()
1204 if (!(imm & 0xff000000)) { in get_imm()
1205 imm <<= 8; in get_imm()
1209 if (!(imm & 0xf0000000)) { in get_imm()
1210 imm <<= 4; in get_imm()
1214 if (!(imm & 0xc0000000)) { in get_imm()
1215 imm <<= 2; in get_imm()
1219 if (!(imm & 0x00ffffff)) in get_imm()
1220 return SRC2_IMM | (imm >> 24) | (rol << 8); in get_imm()
1226 static sljit_s32 generate_int(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw imm, sljit_s… in generate_int() argument
1237 if (!(imm & mask)) { in generate_int()
1239 imm = (imm << rol) | (imm >> (32 - rol)); in generate_int()
1248 imm = (imm << 8) | (imm >> 24); in generate_int()
1252 if (!(imm & mask)) { in generate_int()
1254 imm = (imm << rol) | (imm >> (32 - rol)); in generate_int()
1269 SLJIT_ASSERT(!(imm & 0xff)); in generate_int()
1271 if (!(imm & 0xff000000)) { in generate_int()
1272 imm1 = SRC2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8); in generate_int()
1273 imm2 = SRC2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8); in generate_int()
1275 else if (imm & 0xc0000000) { in generate_int()
1276 imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); in generate_int()
1277 imm <<= 8; in generate_int()
1280 if (!(imm & 0xff000000)) { in generate_int()
1281 imm <<= 8; in generate_int()
1285 if (!(imm & 0xf0000000)) { in generate_int()
1286 imm <<= 4; in generate_int()
1290 if (!(imm & 0xc0000000)) { in generate_int()
1291 imm <<= 2; in generate_int()
1295 if (!(imm & 0x00ffffff)) in generate_int()
1296 imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8); in generate_int()
1301 if (!(imm & 0xf0000000)) { in generate_int()
1302 imm <<= 4; in generate_int()
1306 if (!(imm & 0xc0000000)) { in generate_int()
1307 imm <<= 2; in generate_int()
1311 imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8); in generate_int()
1312 imm <<= 8; in generate_int()
1315 if (!(imm & 0xf0000000)) { in generate_int()
1316 imm <<= 4; in generate_int()
1320 if (!(imm & 0xc0000000)) { in generate_int()
1321 imm <<= 2; in generate_int()
1325 if (!(imm & 0x00ffffff)) in generate_int()
1326 imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8); in generate_int()
1337 static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw imm) in load_immediate() argument
1342 if (!(imm & ~0xffff)) in load_immediate()
1343 return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)); in load_immediate()
1347 tmp = get_imm(imm); in load_immediate()
1351 tmp = get_imm(~imm); in load_immediate()
1357 FAIL_IF(generate_int(compiler, reg, imm, 1)); in load_immediate()
1358 FAIL_IF(generate_int(compiler, reg, ~imm, 0)); in load_immediate()
1361 …ush_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_SIZE | LOAD_DATA, 1, reg, TMP_PC, 0), imm); in load_immediate()
1363 FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff))); in load_immediate()
1364 if (imm <= 0xffff) in load_immediate()
1366 return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff)); in load_immediate()
1373 sljit_uw imm, offset_reg; in emit_op_mem() local
1412 imm = get_imm(argw & ~0xfff); in emit_op_mem()
1413 if (imm) { in emit_op_mem()
1414 FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | imm)); in emit_op_mem()
1420 imm = get_imm(-argw & ~0xfff); in emit_op_mem()
1421 if (imm) { in emit_op_mem()
1422 FAIL_IF(push_inst(compiler, SUB | RD(tmp_reg) | RN(arg) | imm)); in emit_op_mem()
1436 imm = get_imm(argw & ~0xff); in emit_op_mem()
1437 if (imm) { in emit_op_mem()
1438 FAIL_IF(push_inst(compiler, ADD | RD(tmp_reg) | RN(arg) | imm)); in emit_op_mem()
1444 imm = get_imm(-argw & ~0xff); in emit_op_mem()
1445 if (imm) { in emit_op_mem()
1446 FAIL_IF(push_inst(compiler, SUB | RD(tmp_reg) | RN(arg) | imm)); in emit_op_mem()
1850 sljit_uw imm; in emit_fop_mem() local
1869 imm = get_imm(argw & ~0x3fc); in emit_fop_mem()
1870 if (imm) { in emit_fop_mem()
1871 FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG2) | RN(arg & REG_MASK) | imm)); in emit_fop_mem()
1874 imm = get_imm(-argw & ~0x3fc); in emit_fop_mem()
1875 if (imm) { in emit_fop_mem()
1877 FAIL_IF(push_inst(compiler, SUB | RD(TMP_REG2) | RN(arg & REG_MASK) | imm)); in emit_fop_mem()