mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 00:46:17 +00:00
1. type syntax :ud :uw etc
2. empty instruction option 3. remove a conflict
This commit is contained in:
parent
5608d2765d
commit
c6f2da4e82
@ -172,9 +172,6 @@ ROOT: instrseq
|
|||||||
|
|
||||||
|
|
||||||
label: STRING COLON
|
label: STRING COLON
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
instrseq: instruction SEMICOLON instrseq
|
instrseq: instruction SEMICOLON instrseq
|
||||||
@ -202,7 +199,7 @@ instrseq: instruction SEMICOLON instrseq
|
|||||||
{
|
{
|
||||||
struct brw_program_instruction *list_entry =
|
struct brw_program_instruction *list_entry =
|
||||||
calloc(sizeof(struct brw_program_instruction), 1);
|
calloc(sizeof(struct brw_program_instruction), 1);
|
||||||
list_entry->string = $1;
|
list_entry->string = strdup($1);
|
||||||
list_entry->islabel = 1;
|
list_entry->islabel = 1;
|
||||||
list_entry->next = $2.first;
|
list_entry->next = $2.first;
|
||||||
$2.first = list_entry;
|
$2.first = list_entry;
|
||||||
@ -1353,6 +1350,13 @@ region: LANGLE exp COMMA exp COMMA exp RANGLE
|
|||||||
$$.width = ffs($4) - 1;
|
$$.width = ffs($4) - 1;
|
||||||
$$.horiz_stride = ffs($6);
|
$$.horiz_stride = ffs($6);
|
||||||
}
|
}
|
||||||
|
| LANGLE exp SEMICOLON exp COMMA exp RANGLE
|
||||||
|
{
|
||||||
|
memset (&$$, '\0', sizeof ($$));
|
||||||
|
$$.vert_stride = ffs($2);
|
||||||
|
$$.width = ffs($4) - 1;
|
||||||
|
$$.horiz_stride = ffs($6);
|
||||||
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
/* region_wh is used in specifying indirect operands where rather than having
|
/* region_wh is used in specifying indirect operands where rather than having
|
||||||
@ -1461,7 +1465,6 @@ writemask_w: /* empty */ { $$ = 0; }
|
|||||||
|
|
||||||
/* 1.4.11: Immediate values */
|
/* 1.4.11: Immediate values */
|
||||||
imm32: exp { $$.r = imm32_d; $$.u.d = $1; }
|
imm32: exp { $$.r = imm32_d; $$.u.d = $1; }
|
||||||
| MINUS exp { $$.r = imm32_d; $$.u.d = -$2; }
|
|
||||||
| NUMBER { $$.r = imm32_f; $$.u.f = $1; }
|
| NUMBER { $$.r = imm32_f; $$.u.f = $1; }
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1547,11 +1550,14 @@ conditionalmodifier: /* empty */ { $$ = BRW_CONDITIONAL_NONE; }
|
|||||||
;
|
;
|
||||||
|
|
||||||
/* 1.4.13: Instruction options */
|
/* 1.4.13: Instruction options */
|
||||||
instoptions: LCURLY instoption_list RCURLY
|
instoptions: /* empty */
|
||||||
|
{ memset(&$$, 0, sizeof($$)); }
|
||||||
|
| LCURLY instoption_list RCURLY
|
||||||
{ $$ = $2; }
|
{ $$ = $2; }
|
||||||
;
|
;
|
||||||
|
|
||||||
instoption_list: instoption instoption_list
|
instoption_list:
|
||||||
|
instoption instoption_list
|
||||||
{
|
{
|
||||||
$$ = $2;
|
$$ = $2;
|
||||||
switch ($1) {
|
switch ($1) {
|
||||||
|
@ -239,14 +239,23 @@ extern char *input_filename;
|
|||||||
* in the BNF of the assembly, but our existing source didn't use that syntax.
|
* in the BNF of the assembly, but our existing source didn't use that syntax.
|
||||||
*/
|
*/
|
||||||
"UD" { return TYPE_UD; }
|
"UD" { return TYPE_UD; }
|
||||||
|
":UD" { return TYPE_UD; }
|
||||||
"D" { return TYPE_D; }
|
"D" { return TYPE_D; }
|
||||||
|
":D" { return TYPE_D; }
|
||||||
"UW" { return TYPE_UW; }
|
"UW" { return TYPE_UW; }
|
||||||
|
":UW" { return TYPE_UW; }
|
||||||
"W" { return TYPE_W; }
|
"W" { return TYPE_W; }
|
||||||
|
":W" { return TYPE_W; }
|
||||||
"UB" { return TYPE_UB; }
|
"UB" { return TYPE_UB; }
|
||||||
|
":UB" { return TYPE_UB; }
|
||||||
"B" { return TYPE_B; }
|
"B" { return TYPE_B; }
|
||||||
|
":B" { return TYPE_B; }
|
||||||
"F" { return TYPE_F; }
|
"F" { return TYPE_F; }
|
||||||
|
":F" { return TYPE_B; }
|
||||||
"VF" {return TYPE_VF; }
|
"VF" {return TYPE_VF; }
|
||||||
|
":VF" {return TYPE_VF; }
|
||||||
"V" { return TYPE_V; }
|
"V" { return TYPE_V; }
|
||||||
|
":V" { return TYPE_V; }
|
||||||
|
|
||||||
"sat" { return SATURATE; }
|
"sat" { return SATURATE; }
|
||||||
"align1" { return ALIGN1; }
|
"align1" { return ALIGN1; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user