Lines Matching refs:bc
31 int eg_bytecode_cf_build(struct r600_bytecode *bc, struct r600_bytecode_cf *cf)
36 bc->bytecode[id++] = cf->isa[0];
37 bc->bytecode[id++] = cf->isa[1];
40 unsigned opcode = r600_isa_cf_opcode(bc->isa->hw_class, cf->op);
45 bc->bytecode[id++] =
53 bc->bytecode[id++] =
55 r600_isa_cf_opcode(bc->isa->hw_class, CF_OP_ALU_EXT)) |
61 bc->bytecode[id++] = S_SQ_CF_ALU_WORD0_ADDR(cf->addr >> 1) |
65 bc->bytecode[id++] = S_SQ_CF_ALU_WORD1_CF_INST(opcode) |
73 bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->addr >> 1);
74 bc->bytecode[id] = S_SQ_CF_WORD1_CF_INST(opcode) |
78 if (bc->gfx_level == EVERGREEN) /* no EOP on cayman */
79 bc->bytecode[id] |= S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program);
83 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) |
88 bc->bytecode[id] =
98 if (bc->gfx_level == EVERGREEN) /* no EOP on cayman */
99 bc->bytecode[id] |= S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program);
102 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RAT_RAT_ID(cf->rat.id) |
109 bc->bytecode[id] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) |
117 if (bc->gfx_level == EVERGREEN) /* no EOP on cayman */
118 bc->bytecode[id] |= S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program);
123 bc->bytecode[id++] = S_SQ_CF_ALLOC_EXPORT_WORD0_RW_GPR(cf->output.gpr) |
128 bc->bytecode[id] = S_SQ_CF_ALLOC_EXPORT_WORD1_BURST_COUNT(cf->output.burst_count - 1) |
134 if (bc->gfx_level == EVERGREEN) /* no EOP on cayman */
135 bc->bytecode[id] |= S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program);
139 bc->bytecode[id++] = S_SQ_CF_WORD0_ADDR(cf->cf_addr >> 1);
140 bc->bytecode[id] = S_SQ_CF_WORD1_CF_INST(opcode) |
146 if (bc->gfx_level == EVERGREEN) /* no EOP on cayman */
147 bc->bytecode[id] |= S_SQ_CF_ALLOC_EXPORT_WORD1_END_OF_PROGRAM(cf->end_of_program);
155 void eg_bytecode_export_read(struct r600_bytecode *bc,
169 output->op = r600_isa_cf_by_opcode(bc->isa,
177 int egcm_load_index_reg(struct r600_bytecode *bc, unsigned id, bool inside_alu_clause)
184 assert(bc->gfx_level >= EVERGREEN);
186 if (bc->index_loaded[id])
191 alu.src[0].sel = bc->index_reg[id];
192 alu.src[0].chan = bc->index_reg_chan[id];
193 if (bc->gfx_level == CAYMAN)
197 r = r600_bytecode_add_alu(bc, &alu);
201 bc->ar_loaded = 0; /* clobbered */
203 if (bc->gfx_level == EVERGREEN) {
207 r = r600_bytecode_add_alu(bc, &alu);
214 type = bc->cf_last->op;
215 if ((r = r600_bytecode_add_cf(bc))) {
218 bc->cf_last->op = type;
221 bc->index_loaded[id] = 1;
226 int eg_bytecode_gds_build(struct r600_bytecode *bc, struct r600_bytecode_gds *gds, unsigned id)
228 unsigned gds_op = (r600_isa_fetch_opcode(bc->isa->hw_class, gds->op) >> 8) & 0x3f;
235 bc->bytecode[id++] = S_SQ_MEM_GDS_WORD0_MEM_INST(2) |
243 bc->bytecode[id++] = S_SQ_MEM_GDS_WORD1_DST_GPR(gds->dst_gpr) |
252 bc->bytecode[id++] = S_SQ_MEM_GDS_WORD2_DST_SEL_X(gds->dst_sel_x) |
259 int eg_bytecode_alu_build(struct r600_bytecode *bc, struct r600_bytecode_alu *alu, unsigned id)
264 bc->bytecode[id++] = S_SQ_ALU_WORD0_SRC0_SEL(alu->src[0].sel) |
276 bc->bytecode[id++] = S_SQ_ALU_WORD0_SRC0_SEL(alu->src[0].sel) |
290 unsigned lds_op = r600_isa_alu_opcode(bc->isa->hw_class, alu->op);
291 bc->bytecode[id++] =
307 bc->bytecode[id++] = S_SQ_ALU_WORD1_DST_GPR(alu->dst.sel) |
315 S_SQ_ALU_WORD1_OP3_ALU_INST(r600_isa_alu_opcode(bc->isa->hw_class, alu->op)) |
318 bc->bytecode[id++] = S_SQ_ALU_WORD1_DST_GPR(alu->dst.sel) |
326 S_SQ_ALU_WORD1_OP2_ALU_INST(r600_isa_alu_opcode(bc->isa->hw_class, alu->op)) |