Lines Matching refs:memw
3209 sljit_s32 mem, sljit_sw memw) in sljit_emit_mem() argument
3215 CHECK(check_sljit_emit_mem(compiler, type, reg, mem, memw)); in sljit_emit_mem()
3218 return sljit_emit_mem_unaligned(compiler, type, reg, mem, memw); in sljit_emit_mem()
3222 if ((memw & 0xfff) >= (0x1000 - SSIZE_OF(sw))) { in sljit_emit_mem()
3223 imm = get_imm((sljit_uw)((memw + 0x1000) & ~0xfff)); in sljit_emit_mem()
3226 memw = (memw & 0xfff) - 0x1000; in sljit_emit_mem()
3228 imm = get_imm((sljit_uw)(memw & ~0xfff)); in sljit_emit_mem()
3231 memw &= 0xfff; in sljit_emit_mem()
3235 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3236 memw = 0; in sljit_emit_mem()
3242 …ADD_W | RD4(TMP_REG1) | RN4(mem & REG_MASK) | RM4(OFFS_REG(mem)) | ((sljit_uw)(memw & 0x3) << 6))); in sljit_emit_mem()
3243 memw = 0; in sljit_emit_mem()
3245 } else if (memw < -0xff) { in sljit_emit_mem()
3247 if ((-memw & 0xfff) <= SSIZE_OF(sw)) in sljit_emit_mem()
3248 tmp = (sljit_uw)((-memw + 0x7ff) & ~0x7ff); in sljit_emit_mem()
3250 tmp = (sljit_uw)((-memw + 0xfff) & ~0xfff); in sljit_emit_mem()
3252 SLJIT_ASSERT(tmp >= (sljit_uw)-memw); in sljit_emit_mem()
3257 memw += (sljit_sw)tmp; in sljit_emit_mem()
3258 SLJIT_ASSERT(memw >= 0 && memw <= 0xfff - SSIZE_OF(sw)); in sljit_emit_mem()
3260 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3262 memw = 0; in sljit_emit_mem()
3266 } else if (memw >= (0x1000 - SSIZE_OF(sw))) { in sljit_emit_mem()
3267 if ((memw & 0xfff) >= (0x1000 - SSIZE_OF(sw))) { in sljit_emit_mem()
3268 imm = get_imm((sljit_uw)((memw + 0x1000) & ~0xfff)); in sljit_emit_mem()
3271 memw = (memw & 0xfff) - 0x1000; in sljit_emit_mem()
3273 imm = get_imm((sljit_uw)(memw & ~0xfff)); in sljit_emit_mem()
3276 memw &= 0xfff; in sljit_emit_mem()
3280 SLJIT_ASSERT(memw >= -0xff && memw <= 0xfff); in sljit_emit_mem()
3283 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3285 memw = 0; in sljit_emit_mem()
3293 SLJIT_ASSERT(memw <= 0xfff - SSIZE_OF(sw) && memw >= -0xff); in sljit_emit_mem()
3298 …FAIL_IF(emit_op_mem(compiler, WORD_SIZE, REG_PAIR_SECOND(reg), mem, memw + SSIZE_OF(sw), TMP_REG2)… in sljit_emit_mem()
3299 return emit_op_mem(compiler, WORD_SIZE, REG_PAIR_FIRST(reg), mem, memw, TMP_REG2); in sljit_emit_mem()
3302 FAIL_IF(emit_op_mem(compiler, flags, REG_PAIR_FIRST(reg), mem, memw, TMP_REG2)); in sljit_emit_mem()
3303 return emit_op_mem(compiler, flags, REG_PAIR_SECOND(reg), mem, memw + SSIZE_OF(sw), TMP_REG2); in sljit_emit_mem()
3309 tmp = (sljit_uw)(memw & 0x7fc); in sljit_emit_mem()
3310 imm = get_imm((sljit_uw)((memw + (tmp <= 0x400 ? 0 : 0x400)) & ~0x3fc)); in sljit_emit_mem()
3313 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3314 memw = 0; in sljit_emit_mem()
3317 memw = (memw & 0x3fc) >> 2; in sljit_emit_mem()
3320 memw = 0x100 - memw; in sljit_emit_mem()
3324 SLJIT_ASSERT(memw >= 0 && memw <= 0xff); in sljit_emit_mem()
3329 …ADD_W | RD4(TMP_REG1) | RN4(mem & REG_MASK) | RM4(OFFS_REG(mem)) | ((sljit_uw)(memw & 0x3) << 6))); in sljit_emit_mem()
3330 memw = 0; in sljit_emit_mem()
3332 } else if (memw < 0) { in sljit_emit_mem()
3333 if ((-memw & ~0x3fc) == 0) { in sljit_emit_mem()
3335 memw = -memw >> 2; in sljit_emit_mem()
3337 tmp = (sljit_uw)(-memw & 0x7fc); in sljit_emit_mem()
3338 imm = get_imm((sljit_uw)((-memw + (tmp <= 0x400 ? 0 : 0x400)) & ~0x3fc)); in sljit_emit_mem()
3342 memw = (-memw & 0x3fc) >> 2; in sljit_emit_mem()
3347 memw = 0x100 - memw; in sljit_emit_mem()
3349 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3351 memw = 0; in sljit_emit_mem()
3356 } else if ((memw & ~0x3fc) != 0) { in sljit_emit_mem()
3357 tmp = (sljit_uw)(memw & 0x7fc); in sljit_emit_mem()
3358 imm = get_imm((sljit_uw)((memw + (tmp <= 0x400 ? 0 : 0x400)) & ~0x3fc)); in sljit_emit_mem()
3362 memw = (memw & 0x3fc) >> 2; in sljit_emit_mem()
3365 memw = 0x100 - memw; in sljit_emit_mem()
3369 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_mem()
3371 memw = 0; in sljit_emit_mem()
3376 memw >>= 2; in sljit_emit_mem()
3378 SLJIT_ASSERT(memw >= 0 && memw <= 0xff); in sljit_emit_mem()
3379 …gs | RN4(mem & REG_MASK) | RT4(REG_PAIR_FIRST(reg)) | RD4(REG_PAIR_SECOND(reg)) | (sljit_ins)memw); in sljit_emit_mem()
3384 sljit_s32 mem, sljit_sw memw) in sljit_emit_mem_update() argument
3390 CHECK(check_sljit_emit_mem_update(compiler, type, reg, mem, memw)); in sljit_emit_mem_update()
3392 if ((mem & OFFS_REG_MASK) || (memw > 255 || memw < -255)) in sljit_emit_mem_update()
3432 if (memw >= 0) in sljit_emit_mem_update()
3435 memw = -memw; in sljit_emit_mem_update()
3437 return push_inst32(compiler, inst | RT4(reg) | RN4(mem & REG_MASK) | (sljit_ins)memw); in sljit_emit_mem_update()
3440 static sljit_s32 update_mem_addr(struct sljit_compiler *compiler, sljit_s32 *mem, sljit_sw *memw, s… in update_mem_addr() argument
3443 sljit_sw argw = *memw; in update_mem_addr()
3449 *memw = 0; in update_mem_addr()
3465 *memw = -(-argw & 0xff); in update_mem_addr()
3472 *memw = argw & 0xfff; in update_mem_addr()
3479 *memw = (argw & 0xfff) - 0x1000; in update_mem_addr()
3489 *memw = (argw & 0xfff) - 0x1000; in update_mem_addr()
3491 *memw = argw & 0xfff; in update_mem_addr()
3503 sljit_s32 mem, sljit_sw memw) in sljit_emit_fmem() argument
3506 CHECK(check_sljit_emit_fmem(compiler, type, freg, mem, memw)); in sljit_emit_fmem()
3509 …iler, ((type ^ SLJIT_32) & SLJIT_32) | ((type & SLJIT_MEM_STORE) ? 0 : FPU_LOAD), freg, mem, memw); in sljit_emit_fmem()
3515 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, mem, memw, TMP_REG1); in sljit_emit_fmem()
3517 FAIL_IF(update_mem_addr(compiler, &mem, &memw, 0xfff - 4)); in sljit_emit_fmem()
3520 FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, mem, memw, TMP_REG1)); in sljit_emit_fmem()
3522 return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, mem, memw + 4, TMP_REG1); in sljit_emit_fmem()
3526 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG2, mem, memw, TMP_REG1)); in sljit_emit_fmem()
3530 FAIL_IF(update_mem_addr(compiler, &mem, &memw, 0xfff - 4)); in sljit_emit_fmem()
3533 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG2, mem, memw, TMP_REG1)); in sljit_emit_fmem()
3534 FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, mem, memw + 4, TMP_REG1)); in sljit_emit_fmem()
3538 …_s32 sljit_emit_simd_mem_offset(struct sljit_compiler *compiler, sljit_s32 *mem_ptr, sljit_sw memw) in sljit_emit_simd_mem_offset() argument
3545 … ADD_W | RD4(TMP_REG1) | RN4(mem & REG_MASK) | RM4(OFFS_REG(mem)) | ((sljit_uw)(memw & 0x3) << 6)); in sljit_emit_simd_mem_offset()
3550 return load_immediate(compiler, TMP_REG1, (sljit_uw)memw); in sljit_emit_simd_mem_offset()
3555 if (memw == 0) { in sljit_emit_simd_mem_offset()
3561 imm = get_imm((sljit_uw)(memw < 0 ? -memw : memw)); in sljit_emit_simd_mem_offset()
3564 return push_inst32(compiler, ((memw < 0) ? SUB_WI : ADD_WI) | RD4(TMP_REG1) | RN4(mem) | imm); in sljit_emit_simd_mem_offset()
3566 FAIL_IF(load_immediate(compiler, TMP_REG1, (sljit_uw)memw)); in sljit_emit_simd_mem_offset()