Lines Matching refs:instr
29 #include "ir3/instr-a3xx.h" // TODO move opc's and other useful things to ir3-instr.h or so
43 struct ir3_instruction *instr;
52 extract_SRC1_R(struct ir3_instruction *instr)
54 if (instr->nop) {
55 assert(!instr->repeat);
56 return instr->nop & 0x1;
58 return !!(instr->srcs[0]->flags & IR3_REG_R);
62 extract_SRC2_R(struct ir3_instruction *instr)
64 if (instr->nop) {
65 assert(!instr->repeat);
66 return (instr->nop >> 1) & 0x1;
69 if (instr->srcs_count > 1)
70 return !!(instr->srcs[1]->flags & IR3_REG_R);
75 __instruction_case(struct encode_state *s, struct ir3_instruction *instr)
85 if (instr->opc == OPC_B) {
86 switch (instr->cat0.brtype) {
102 } else if (instr->opc == OPC_MOV) {
103 struct ir3_register *src = instr->srcs[0];
117 } else if (instr->opc == OPC_DEMOTE) {
120 if (instr->opc == OPC_RESINFO) {
122 } else if (instr->opc == OPC_LDIB) {
124 } else if (instr->opc == OPC_STIB) {
128 return instr->opc;
169 extract_cat5_SRC(struct ir3_instruction *instr, unsigned n)
171 if (instr->flags & IR3_INSTR_S2EN) {
174 if (n < instr->srcs_count)
175 return instr->srcs[n];
180 extract_cat5_FULL(struct ir3_instruction *instr)
182 struct ir3_register *reg = extract_cat5_SRC(instr, 0);
190 extract_cat5_DESC_MODE(struct ir3_instruction *instr)
192 assert(instr->flags & (IR3_INSTR_S2EN | IR3_INSTR_B));
193 if (instr->flags & IR3_INSTR_S2EN) {
194 if (instr->flags & IR3_INSTR_B) {
195 if (instr->flags & IR3_INSTR_A1EN) {
196 if (instr->flags & IR3_INSTR_NONUNIF) {
201 } else if (instr->flags & IR3_INSTR_NONUNIF) {
207 if (instr->flags & IR3_INSTR_NONUNIF)
212 assert(!(instr->cat5.samp | instr->cat5.tex));
213 } else if (instr->flags & IR3_INSTR_B) {
214 if (instr->flags & IR3_INSTR_A1EN) {
224 extract_cat6_DESC_MODE(struct ir3_instruction *instr)
226 struct ir3_register *ssbo = instr->srcs[0];
229 } else if (instr->flags & IR3_INSTR_NONUNIF) {
244 extract_cat6_SRC(struct ir3_instruction *instr, unsigned n)
246 if (is_global_a3xx_atomic(instr->opc)) {
249 assert(n < instr->srcs_count);
250 return instr->srcs[n];
267 assert(opc_cat(s->instr->opc) == 2);
268 if (ir3_cat2_int(s->instr->opc)) {
317 __stc_dst_case(struct encode_state *s, struct ir3_instruction *instr)
319 return (instr->flags & IR3_INSTR_A1EN) ? STC_DST_A1 : STC_DST_IMM;
335 foreach_instr (instr, &block->instr_list) {
339 .instr = instr,
342 const bitmask_t encoded = encode__instruction(&s, NULL, instr);