Lines Matching defs:dst

52 fs_inst::init(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
62 this->dst = dst;
67 assert(dst.file != IMM && dst.file != UNIFORM);
74 switch (dst.file) {
80 this->size_written = dst.component_size(exec_size);
95 init(BRW_OPCODE_NOP, 8, dst, NULL, 0);
103 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst)
105 init(opcode, exec_size, dst, NULL, 0);
108 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
112 init(opcode, exec_size, dst, src, 1);
115 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
119 init(opcode, exec_size, dst, src, 2);
122 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_size, const fs_reg &dst,
126 init(opcode, exec_size, dst, src, 3);
129 fs_inst::fs_inst(enum opcode opcode, uint8_t exec_width, const fs_reg &dst,
132 init(opcode, exec_width, dst, src, sources);
167 const fs_reg &dst,
189 * We also want to use a 32-bit data type for the dst of the load operation
199 shuffle_from_32bit_read(bld, dst, vec4_result,
200 (const_offset & 0xf) / type_sz(dst.type), 1);
333 * code generator: if src == dst and one instruction writes the
475 return dst.type == src[0].type &&
479 dst.type == src[1].type &&
569 fs_reg dst = fs_reg(VGRF, alloc.allocate(1), BRW_REGISTER_TYPE_UD);
574 bld.group(4, 0).exec_all().MOV(dst, ts);
576 return dst;
646 (this->exec_size * type_sz(this->dst.type)) < 32 ||
647 !this->dst.is_contiguous() ||
648 this->dst.offset % REG_SIZE != 0);
1055 return flag_mask(dst, size_written);
1343 * dst+0: .7 .6 .5 .4 .3 .2 .1 .0
1346 * dst+1: .7 .6 .5 .4 .3 .2 .1 .0 (if SIMD16)
1356 * and(16) dst<1>D tmp<8,8,1>W 0xf:W
2157 if (inst->dst.file == VGRF) {
2158 int reg = vgrf_to_reg[inst->dst.nr];
2159 for (unsigned j = 1; j < this->alloc.sizes[inst->dst.nr]; j++)
2178 assert(inst->dst.file == VGRF);
2179 assert(inst->dst.offset == 0);
2180 assert(inst->size_written == alloc.sizes[inst->dst.nr] * REG_SIZE);
2184 if (inst->dst.file == VGRF) {
2185 int reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE;
2251 assert(inst->dst.file == VGRF);
2252 if (vgrf_has_split[inst->dst.nr]) {
2257 reg = vgrf_to_reg[inst->dst.nr] + reg_offset;
2258 ibld.UNDEF(fs_reg(VGRF, new_virtual_grf[reg], inst->dst.type));
2263 reg = vgrf_to_reg[inst->dst.nr];
2265 assert(new_virtual_grf[reg] == (int)inst->dst.nr);
2270 if (inst->dst.file == VGRF) {
2271 reg = vgrf_to_reg[inst->dst.nr] + inst->dst.offset / REG_SIZE;
2272 if (vgrf_has_split[inst->dst.nr]) {
2273 inst->dst.nr = new_virtual_grf[reg];
2274 inst->dst.offset = new_reg_offset[reg] * REG_SIZE +
2275 inst->dst.offset % REG_SIZE;
2279 assert(new_reg_offset[reg] == inst->dst.offset / REG_SIZE);
2280 assert(new_virtual_grf[reg] == (int)inst->dst.nr);
2331 if (inst->dst.file == VGRF)
2332 remap_table[inst->dst.nr] = 0;
2360 if (inst->dst.file == VGRF)
2361 inst->dst.nr = remap_table[inst->dst.nr];
2501 const fs_reg dst = ubld.vgrf(BRW_REGISTER_TYPE_UD);
2505 dst, brw_imm_ud(index), brw_imm_ud(base & ~(block_sz - 1)));
2509 inst->src[i].nr = dst.nr;
2520 VARYING_PULL_CONSTANT_LOAD(ibld, inst->dst,
2539 inst->dst.type == BRW_REGISTER_TYPE_DF) {
2540 assert(inst->dst.type == inst->src[0].type);
2546 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_F, 1),
2548 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_F, 0),
2556 (inst->dst.type == BRW_REGISTER_TYPE_UQ ||
2557 inst->dst.type == BRW_REGISTER_TYPE_Q)) {
2558 assert(inst->dst.type == inst->src[0].type);
2564 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 1),
2566 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 0),
2575 inst->dst.is_null() &&
2594 if (inst->dst.type != inst->src[0].type &&
2595 inst->dst.type != BRW_REGISTER_TYPE_DF &&
2685 (inst->dst.type == BRW_REGISTER_TYPE_DF ||
2686 inst->dst.type == BRW_REGISTER_TYPE_UQ ||
2687 inst->dst.type == BRW_REGISTER_TYPE_Q)) {
2688 assert(inst->dst.type == inst->src[0].type);
2695 ibld.SEL(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 0),
2699 ibld.SEL(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 1),
2923 if (lp->dst.file != send->src[2].file || lp->dst.nr != send->src[2].nr)
2944 ibld.LOAD_PAYLOAD(lp->dst, &lp->src[i], lp->sources - i, 0);
2949 lp->dst = fs_reg(VGRF, alloc.allocate(lp->size_written / REG_SIZE), lp->dst.type);
2950 lp2->dst = fs_reg(VGRF, alloc.allocate(lp2->size_written / REG_SIZE), lp2->dst.type);
2953 send->src[2] = lp->dst;
2954 send->src[3] = lp2->dst;
2996 const unsigned dst = inst->dst.nr;
2999 inst->dst.file == VGRF &&
3000 alloc.sizes[inst->dst.nr] * REG_SIZE == inst->size_written &&
3002 if (remap[dst] == ~0u) {
3003 remap[dst] = dst;
3005 remap[dst] = alloc.allocate(regs_written(inst));
3006 inst->dst.nr = remap[dst];
3009 } else if (inst->dst.file == VGRF &&
3010 remap[dst] != ~0u &&
3011 remap[dst] != dst) {
3012 inst->dst.nr = remap[dst];
3118 inst->dst.file != MRF || inst->src[0].file != VGRF ||
3119 inst->dst.type != inst->src[0].type ||
3139 if (regions_overlap(scan_inst->dst, scan_inst->size_written,
3157 if (!region_contained_in(scan_inst->dst, scan_inst->size_written,
3176 inst->src[0], scan_inst->dst, scan_inst->size_written);
3201 if (regions_overlap(scan_inst->dst, scan_inst->size_written,
3202 inst->dst, inst->size_written)) {
3211 inst->dst, inst->size_written)) {
3230 if (regions_overlap(scan_inst->dst, scan_inst->size_written,
3234 inst->src[0], scan_inst->dst, scan_inst->size_written);
3236 const unsigned rel_offset = reg_offset(scan_inst->dst) -
3239 if (inst->dst.nr & BRW_MRF_COMPR4) {
3244 scan_inst->dst.nr = inst->dst.nr + rel_offset / REG_SIZE * 4;
3250 scan_inst->dst.nr &= ~BRW_MRF_COMPR4;
3256 scan_inst->dst.nr = inst->dst.nr + rel_offset / REG_SIZE;
3259 scan_inst->dst.file = MRF;
3260 scan_inst->dst.offset = inst->dst.offset + rel_offset % REG_SIZE;
3432 inst->dst.file == MRF) {
3433 fs_inst *prev_inst = last_mrf_move[inst->dst.nr];
3435 inst->dst.equals(prev_inst->dst) &&
3448 if (inst->dst.file == MRF) {
3449 last_mrf_move[inst->dst.nr] = NULL;
3464 regions_overlap(inst->dst, inst->size_written,
3472 inst->dst.file == MRF &&
3475 last_mrf_move[inst->dst.nr] = inst;
3576 int first_write_grf = inst->dst.nr;
3607 if (scan_inst->dst.file == VGRF) {
3609 int reg = scan_inst->dst.nr + i;
3647 unsigned first_write_grf = inst->dst.nr;
3673 if (scan_inst->dst.file == VGRF &&
3674 scan_inst->dst.nr >= first_write_grf &&
3675 scan_inst->dst.nr < first_write_grf + write_len &&
3676 needs_dep[scan_inst->dst.nr - first_write_grf]) {
3678 scan_inst->dst.nr);
3679 needs_dep[scan_inst->dst.nr - first_write_grf] = false;
3702 if (inst->mlen != 0 && inst->dst.file == VGRF) {
3822 assert(inst->dst.file == MRF || inst->dst.file == VGRF);
3824 fs_reg dst = inst->dst;
3827 if (dst.file == MRF)
3828 dst.nr = dst.nr & ~BRW_MRF_COMPR4;
3843 ubld.group(8 * n, 0).MOV(retype(dst, BRW_REGISTER_TYPE_UD),
3846 dst = byte_offset(dst, n * REG_SIZE);
3850 if (inst->dst.file == MRF && (inst->dst.nr & BRW_MRF_COMPR4) &&
3873 fs_reg compr4_dst = retype(dst, inst->src[i].type);
3878 fs_reg mov_dst = retype(dst, inst->src[i].type);
3885 dst.nr++;
3893 dst.nr += 4;
3904 dst.type = inst->src[i].type;
3906 ibld.MOV(dst, inst->src[i]);
3908 dst = offset(dst, ibld, 1);
3938 fs_reg imm(VGRF, alloc.allocate(dispatch_width / 8), inst->dst.type);
3940 ibld.MUL(inst->dst, imm, inst->src[0]);
3942 ibld.MUL(inst->dst, inst->src[0],
3993 fs_reg orig_dst = inst->dst;
4000 fs_reg low = inst->dst;
4002 regions_overlap(inst->dst, inst->size_written,
4004 regions_overlap(inst->dst, inst->size_written,
4006 inst->dst.stride >= 4) {
4009 inst->dst.type);
4012 /* Get a new VGRF but keep the same stride as inst->dst */
4013 fs_reg high(VGRF, alloc.allocate(regs_written(inst)), inst->dst.type);
4014 high.stride = inst->dst.stride;
4015 high.offset = inst->dst.offset % REG_SIZE;
4118 ibld.MOV(inst->dst, bd);
4120 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 0),
4122 ibld.MOV(subscript(inst->dst, BRW_REGISTER_TYPE_UD, 1),
4146 const fs_reg acc = retype(brw_acc_reg(inst->exec_size), inst->dst.type);
4148 fs_inst *mach = ibld.MACH(inst->dst, inst->src[0], inst->src[1]);
4187 mach->dst = ibld.vgrf(inst->dst.type);
4188 ibld.MOV(inst->dst, mach->dst);
4210 if ((inst->dst.type == BRW_REGISTER_TYPE_Q ||
4211 inst->dst.type == BRW_REGISTER_TYPE_UQ) &&
4219 } else if (!inst->dst.is_accumulator() &&
4220 (inst->dst.type == BRW_REGISTER_TYPE_D ||
4221 inst->dst.type == BRW_REGISTER_TYPE_UD) &&
4322 fs_inst *add = ibld.ADD(inst->dst, acc, inst->src[0]);
4327 * dst = add.sat(add.sat(src0, -tmp), -(src1 - tmp));
4343 add = ibld.ADD(inst->dst, tmp3, tmp2);
4351 fs_inst *add = ibld.ADD(inst->dst, inst->src[0], inst->src[1]);
4354 ibld.SEL(inst->dst, inst->dst, brw_imm_ud(0))
4499 if (inst->dst.type != BRW_REGISTER_TYPE_F)
4518 inst->dst.stride == 1)
4521 if (inst->dst.type != BRW_REGISTER_TYPE_HF ||
4522 inst->dst.stride != 1)
4596 type_sz(inst->dst.type) == 4 && inst->dst.stride == 1 &&
4693 (exec_type_size == 8 || type_sz(inst->dst.type) == 8))
4866 !inst->dst.is_null() ? 8 : ~0);
4894 if (inst->dst.type == BRW_REGISTER_TYPE_HF)
4905 if (inst->dst.type == BRW_REGISTER_TYPE_HF)
5091 max_size / (inst->dst.stride * type_sz(inst->dst.type)),
5097 DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE);
5106 assert(type_sz(inst->dst.type) == type_sz(inst->src[i].type) ||
5188 if (inst->size_written > inst->dst.component_size(inst->exec_size))
5211 if (regions_overlap(inst->dst, inst->size_written,
5213 !inst->dst.equals(inst->src[i]))
5237 const fs_reg dst = horiz_offset(inst->dst, lbld_after.group() - inst->group);
5239 inst->dst.component_size(inst->exec_size);
5242 const fs_reg tmp = lbld_after.vgrf(inst->dst.type, dst_size);
5254 offset(dst, inst->exec_size, k));
5266 gbld_after.MOV(offset(dst, inst->exec_size, k),
5276 return dst;
5304 inst->dst.component_size(inst->exec_size);
5373 split_inst.dst = emit_zip(lbld.at(block, inst),
5376 split_inst.dst.component_size(lower_width) * dst_size;
5444 const fs_reg tmp = ibld.vgrf(inst->dst.type, 2);
5449 .MOV(horiz_offset(offset(inst->dst, ibld, i),
5458 inst->dst = tmp;
5586 ubld.FBL(inst->dst, exec_mask);
5590 ubld.ADD(inst->dst, negate(tmp), brw_imm_uw(31));
5688 switch (inst->dst.file) {
5690 fprintf(file, "vgrf%d", inst->dst.nr);
5693 fprintf(file, "g%d", inst->dst.nr);
5696 fprintf(file, "m%d", inst->dst.nr);
5702 fprintf(file, "***u%d***", inst->dst.nr);
5705 fprintf(file, "***attr%d***", inst->dst.nr);
5708 switch (inst->dst.nr) {
5713 fprintf(file, "a0.%d", inst->dst.subnr);
5716 fprintf(file, "acc%d", inst->dst.subnr);
5719 fprintf(file, "f%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
5722 fprintf(file, "arf%d.%d", inst->dst.nr & 0xf, inst->dst.subnr);
5730 if (inst->dst.offset ||
5731 (inst->dst.file == VGRF &&
5732 alloc.sizes[inst->dst.nr] * REG_SIZE != inst->size_written)) {
5733 const unsigned reg_size = (inst->dst.file == UNIFORM ? 4 : REG_SIZE);
5734 fprintf(file, "+%d.%d", inst->dst.offset / reg_size,
5735 inst->dst.offset % reg_size);
5738 if (inst->dst.stride != 1)
5739 fprintf(file, "<%u>", inst->dst.stride);
5740 fprintf(file, ":%s, ", brw_reg_type_to_letters(inst->dst.type));
6258 if (inst->is_3src(compiler) && inst->dst.is_null()) {
6259 inst->dst = fs_reg(VGRF, alloc.allocate(dispatch_width / 8),
6260 inst->dst.type);
6286 return inst->dst.file == BAD_FILE;
6319 fs_reg dst = ubld.vgrf(BRW_REGISTER_TYPE_UD);
6321 dst, brw_vec8_grf(0, 0),
6327 ubld.emit(FS_OPCODE_SCHEDULING_FENCE, ubld.null_reg_ud(), dst);