Lines Matching defs:instr

45 #include "ir3/instr-a3xx.h"
69 static struct ir3_instruction *instr; /* current instruction */
96 instr = ir3_instr_create(block, opc, 4, 6);
97 instr->flags = iflags.flags;
98 instr->repeat = iflags.repeat;
99 instr->nop = iflags.nop;
100 instr->line = ir3_yyget_lineno();
103 return instr;
148 static struct ir3_instruction * parse_type_type(struct ir3_instruction *instr,
151 instr->cat1.src_type = parse_type(&type_type);
152 instr->cat1.dst_type = parse_type(&type_type);
153 return instr;
162 reg = ir3_src_create(instr, num>>1, flags);
174 reg = ir3_dst_create(instr, num>>1, flags);
187 assert(opc_cat(instr->opc) == 5);
188 if (!(instr->flags & IR3_INSTR_S2EN))
196 struct ir3_register *s2en_src = instr->srcs[instr->srcs_count - 1];
198 if (instr->flags & IR3_INSTR_B)
203 for (int i = 0; i < instr->srcs_count - 1; i++) {
204 instr->srcs[i+1] = instr->srcs[i];
206 instr->srcs[0] = s2en_src;
243 foreach_instr (instr, &block->instr_list) {
244 if (opc_cat(instr->opc) == 0 && instr->cat0.target_label) {
245 struct hash_entry *entry = _mesa_hash_table_search(labels, instr->cat0.target_label);
247 fprintf(stderr, "unknown label %s\n", instr->cat0.target_label);
251 instr->cat0.immed = target_ip - instr_ip;
797 instrs: instrs instr
798 | instr
800 instr: iflags cat0_instr
812 cat0_src1: '!' T_P0 { instr->cat0.inv1 = true; instr->cat0.comp1 = $2 >> 1; }
813 | T_P0 { instr->cat0.comp1 = $1 >> 1; }
815 cat0_src2: '!' T_P0 { instr->cat0.inv2 = true; instr->cat0.comp2 = $2 >> 1; }
816 | T_P0 { instr->cat0.comp2 = $1 >> 1; }
818 cat0_immed: '#' integer { instr->cat0.immed = $2; }
819 | '#' T_IDENTIFIER { ralloc_steal(instr, (void *)$2); instr->cat0.target_label = $2; }
825 | T_OP_BRAC '.' integer { new_instr(OPC_B)->cat0.brtype = BRANCH_CONST; instr->cat0.idx = $3; } cat0_immed
865 instr->cat1.src_type = TYPE_U32;
866 instr->cat1.dst_type = TYPE_U32;
875 instr->repeat = num - 1;
876 instr->dsts[0]->wrmask = (1 << num) - 1;
881 instr->cat1.src_type = TYPE_U16;
882 instr->cat1.dst_type = TYPE_U16;
888 instr->cat1.src_type = TYPE_S16;
889 instr->cat1.dst_type = TYPE_S16;
959 cond: T_LT { instr->cat2.condition = IR3_COND_LT; }
960 | T_LE { instr->cat2.condition = IR3_COND_LE; }
961 | T_GT { instr->cat2.condition = IR3_COND_GT; }
962 | T_GE { instr->cat2.condition = IR3_COND_GE; }
963 | T_EQ { instr->cat2.condition = IR3_COND_EQ; }
964 | T_NE { instr->cat2.condition = IR3_COND_NE; }
970 cat3_dp_signedness:'.' T_MIXED { instr->cat3.signedness = IR3_SRC_MIXED; }
971 | '.' T_UNSIGNED{ instr->cat3.signedness = IR3_SRC_UNSIGNED; }
973 cat3_dp_pack: '.' T_LOW { instr->cat3.packed = IR3_SRC_PACKED_LOW; }
974 | '.' T_HIGH { instr->cat3.packed = IR3_SRC_PACKED_HIGH; }
1058 cat5_flag: '.' T_3D { instr->flags |= IR3_INSTR_3D; }
1059 | '.' 'a' { instr->flags |= IR3_INSTR_A; }
1060 | '.' 'o' { instr->flags |= IR3_INSTR_O; }
1061 | '.' 'p' { instr->flags |= IR3_INSTR_P; }
1062 | '.' 's' { instr->flags |= IR3_INSTR_S; }
1063 | '.' T_S2EN { instr->flags |= IR3_INSTR_S2EN; }
1065 | '.' T_NONUNIFORM { instr->flags |= IR3_INSTR_NONUNIF; }
1066 | '.' T_BASE { instr->flags |= IR3_INSTR_B; instr->cat5.tex_base = $2; }
1067 | '.' T_W { instr->cat5.cluster_size = $2; }
1071 cat5_samp: T_SAMP { instr->cat5.samp = $1; }
1072 cat5_tex: T_TEX { instr->cat5.tex = $1; }
1073 cat5_type: '(' type ')' { instr->cat5.type = $2; }
1074 cat5_a1: src_reg { instr->flags |= IR3_INSTR_A1EN; }
1092 cat6_typed: '.' T_UNTYPED { instr->cat6.typed = 0; }
1093 | '.' T_TYPED { instr->cat6.typed = 1; }
1095 cat6_dim: '.' T_1D { instr->cat6.d = 1; }
1096 | '.' T_2D { instr->cat6.d = 2; }
1097 | '.' T_3D { instr->cat6.d = 3; }
1098 | '.' T_4D { instr->cat6.d = 4; }
1100 cat6_type: '.' type { instr->cat6.type = $2; }
1104 cat6_dst_offset: offset { instr->cat6.dst_offset = $1; }
1107 cat6_immed: integer { instr->cat6.iim_val = $1; }
1204 | '.' T_BASE { instr->flags |= IR3_INSTR_B; instr->cat6.base = $2; }
1208 | T_NONUNIFORM cat6_bindless_base { instr->flags |= IR3_INSTR_NONUNIF; }
1231 | cat6_bindless_ibo_opc_2src cat6_typed cat6_dim cat6_type '.' cat6_immed '.' cat6_bindless_mode src_reg ',' cat6_reg_or_immed ',' cat6_reg_or_immed { swap(instr->srcs[0], instr->srcs[2]); }
1232 | cat6_bindless_ibo_opc_2src_dst cat6_typed cat6_dim cat6_type '.' cat6_immed '.' cat6_bindless_mode dst_reg ',' cat6_reg_or_immed ',' cat6_reg_or_immed { swap(instr->srcs[0], instr->srcs[1]); }
1238 T_OFFSET '.' cat6_immed '.' cat6_bindless_mode dst_reg { instr->cat6.d = $1; }
1239 | cat6_immed '.' 'k' '.' cat6_bindless_mode 'c' '[' T_A1 ']' { instr->opc = OPC_LDC_K; }
1242 instr->cat6.type = TYPE_U32;
1244 swap(instr->srcs[0], instr->srcs[1]);
1248 | T_A1 { new_src(0, IR3_REG_IMMED)->iim_val = 0; instr->flags |= IR3_INSTR_A1EN; }
1249 | T_A1 '+' integer { new_src(0, IR3_REG_IMMED)->iim_val = $3; instr->flags |= IR3_INSTR_A1EN; }
1270 cat7_scope: '.' 'w' { instr->cat7.w = true; }
1271 | '.' 'r' { instr->cat7.r = true; }
1272 | '.' 'l' { instr->cat7.l = true; }
1273 | '.' 'g' { instr->cat7.g = true; }
1295 dst_reg_flag: T_EVEN { instr->cat1.round = ROUND_EVEN; }
1296 | T_POS_INFINITY { instr->cat1.round = ROUND_POS_INF; }
1297 | T_NEG_INFINITY { instr->cat1.round = ROUND_NEG_INF; }
1360 immediate_cat1: integer { new_src(0, IR3_REG_IMMED)->iim_val = type_size(instr->cat1.src_type) < 32 ? $1 & 0xffff : $1; }