mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-07 16:06:25 +00:00
assembler: distinguish the channel of .z from the condition of .z
The scratch patch only works for generic register Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75631 Tested-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
881afff297
commit
737d248a12
@ -24,6 +24,8 @@ int yycolumn = 1;
|
||||
%x CHANNEL
|
||||
%x LINENUMBER
|
||||
%x FILENAME
|
||||
%x REG
|
||||
%x DOTSEL
|
||||
|
||||
%%
|
||||
\/\/.*[\r\n] { yycolumn = 1; } /* eat up single-line comments */
|
||||
@ -247,8 +249,46 @@ yylval.integer = BRW_CHANNEL_W;
|
||||
|
||||
[gr][0-9]+ {
|
||||
yylval.integer = atoi(yytext + 1);
|
||||
BEGIN(REG);
|
||||
return GENREG;
|
||||
}
|
||||
<REG>"<" { return LANGLE; }
|
||||
<REG>[0-9][0-9]* {
|
||||
yylval.integer = strtoul(yytext, NULL, 10);
|
||||
return INTEGER;
|
||||
}
|
||||
<REG>">" { return RANGLE; }
|
||||
|
||||
<REG>"," { return COMMA; }
|
||||
<REG>"." { BEGIN(DOTSEL); return DOT; }
|
||||
<REG>";" { return SEMICOLON; }
|
||||
|
||||
<DOTSEL>"x" {
|
||||
yylval.integer = BRW_CHANNEL_X;
|
||||
return X;
|
||||
}
|
||||
<DOTSEL>"y" {
|
||||
yylval.integer = BRW_CHANNEL_Y;
|
||||
return Y;
|
||||
}
|
||||
<DOTSEL>"z" {
|
||||
yylval.integer = BRW_CHANNEL_Z;
|
||||
return Z;
|
||||
}
|
||||
<DOTSEL>"w" {
|
||||
yylval.integer = BRW_CHANNEL_W;
|
||||
return W;
|
||||
}
|
||||
<DOTSEL>[0-9][0-9]* {
|
||||
yylval.integer = strtoul(yytext, NULL, 10);
|
||||
BEGIN(REG);
|
||||
return INTEGER;
|
||||
}
|
||||
<DOTSEL>. {
|
||||
yyless(0);
|
||||
BEGIN(INITIAL);
|
||||
}
|
||||
|
||||
[gr] {
|
||||
return GENREGFILE;
|
||||
}
|
||||
@ -296,6 +336,11 @@ yylval.integer = BRW_CHANNEL_W;
|
||||
return LMS;
|
||||
}
|
||||
|
||||
<REG>. {
|
||||
yyless(0);
|
||||
BEGIN(INITIAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Lexing of register types should probably require the ":" symbol specified
|
||||
* in the BNF of the assembly, but our existing source didn't use that syntax.
|
||||
|
Loading…
x
Reference in New Issue
Block a user