Lines Matching refs:instr

28 #include "ir3/instr-a3xx.h"  // TODO move opc's and other useful things to ir3-instr.h or so
40 struct ir3_instruction *instr;
49 extract_SRC1_R(struct ir3_instruction *instr)
51 if (instr->nop) {
52 assert(!instr->repeat);
53 return instr->nop & 0x1;
55 return !!(instr->srcs[0]->flags & IR3_REG_R);
59 extract_SRC2_R(struct ir3_instruction *instr)
61 if (instr->nop) {
62 assert(!instr->repeat);
63 return (instr->nop >> 1) & 0x1;
66 if (instr->srcs_count > 1)
67 return !!(instr->srcs[1]->flags & IR3_REG_R);
72 __instruction_case(struct encode_state *s, struct ir3_instruction *instr)
82 if (instr->opc == OPC_B) {
83 switch (instr->cat0.brtype) {
99 } else if (instr->opc == OPC_MOV) {
100 struct ir3_register *src = instr->srcs[0];
114 } else if (instr->opc == OPC_DEMOTE) {
116 } else if ((instr->block->shader->compiler->gen >= 6) &&
117 is_atomic(instr->opc) && (instr->flags & IR3_INSTR_G)) {
118 return instr->opc - OPC_ATOMIC_ADD + OPC_ATOMIC_B_ADD;
120 if (instr->opc == OPC_RESINFO) {
122 } else if (instr->opc == OPC_LDIB) {
124 } else if (instr->opc == OPC_STIB) {
128 return instr->opc;
155 extract_cat5_SRC(struct ir3_instruction *instr, unsigned n)
157 if (instr->flags & IR3_INSTR_S2EN) {
160 if (n < instr->srcs_count)
161 return instr->srcs[n];
166 extract_cat5_FULL(struct ir3_instruction *instr)
168 struct ir3_register *reg = extract_cat5_SRC(instr, 0);
176 extract_cat5_DESC_MODE(struct ir3_instruction *instr)
178 assert(instr->flags & (IR3_INSTR_S2EN | IR3_INSTR_B));
179 if (instr->flags & IR3_INSTR_S2EN) {
180 if (instr->flags & IR3_INSTR_B) {
181 if (instr->flags & IR3_INSTR_A1EN) {
182 if (instr->flags & IR3_INSTR_NONUNIF) {
187 } else if (instr->flags & IR3_INSTR_NONUNIF) {
200 assert(!(instr->cat5.samp | instr->cat5.tex));
201 } else if (instr->flags & IR3_INSTR_B) {
202 if (instr->flags & IR3_INSTR_A1EN) {
212 extract_cat6_DESC_MODE(struct ir3_instruction *instr)
214 struct ir3_register *ssbo = instr->srcs[0];
217 } else if (instr->flags & IR3_INSTR_NONUNIF) {
232 extract_cat6_SRC(struct ir3_instruction *instr, unsigned n)
234 if (instr->flags & IR3_INSTR_G) {
237 assert(n < instr->srcs_count);
238 return instr->srcs[n];
255 assert(opc_cat(s->instr->opc) == 2);
256 if (ir3_cat2_int(s->instr->opc)) {
312 foreach_instr (instr, &block->instr_list) {
315 .instr = instr,
318 const bitmask_t encoded = encode__instruction(&s, NULL, instr);