"(ei)" return TOKEN(T_EI);
"(jp)" return TOKEN(T_JP);
"(rpt"[0-7]")" ir3_yylval.num = strtol(yytext+4, NULL, 10); return T_RPT;
+"(nop"[0-7]")" ir3_yylval.num = strtol(yytext+4, NULL, 10); return T_NOP;
"("[x]?[y]?[z]?[w]?")" ir3_yylval.num = parse_wrmask(yytext); return T_WRMASK;
[h]?"r"[0-9]+"."[xyzw] ir3_yylval.num = parse_reg(yytext); return T_REGISTER;
static struct {
unsigned flags;
unsigned repeat;
+ unsigned nop;
} iflags;
static struct {
instr = ir3_instr_create(block, opc);
instr->flags = iflags.flags;
instr->repeat = iflags.repeat;
+ instr->nop = iflags.nop;
instr->line = ir3_yyget_lineno();
- iflags.flags = iflags.repeat = 0;
+ iflags.flags = iflags.repeat = iflags.nop = 0;
return instr;
}
%token <tok> T_JP
%token <num> T_RPT
%token <tok> T_UL
+%token <tok> T_NOP
/* category 0: */
%token <tok> T_OP_NOP
| T_JP { iflags.flags |= IR3_INSTR_JP; }
| T_RPT { iflags.repeat = $1; }
| T_UL { iflags.flags |= IR3_INSTR_UL; }
+| T_NOP { iflags.nop = $1; }
iflags:
| iflag iflags