diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index 775d3e38b21..9e6bed53c8e 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -418,6 +418,8 @@ typedef enum ir3_instruction_flags { /* Clamp computed LOD using the given minimum. Only for cat5. */ IR3_INSTR_CLP = BIT(25), + + IR3_INSTR_EOSTSC = BIT(26), } ir3_instruction_flags; struct ir3_instruction { diff --git a/src/freedreno/ir3/ir3_lexer.l b/src/freedreno/ir3/ir3_lexer.l index ca793e34436..d1bf8696fcf 100644 --- a/src/freedreno/ir3/ir3_lexer.l +++ b/src/freedreno/ir3/ir3_lexer.l @@ -173,6 +173,7 @@ static int parse_reg(const char *str) "(sat)" return TOKEN(T_SAT); "(eolm)" return TOKEN(T_EOLM); "(eogm)" return TOKEN(T_EOGM); +"(eostsc)" return TOKEN(T_EOSTSC); "(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; diff --git a/src/freedreno/ir3/ir3_parser.y b/src/freedreno/ir3/ir3_parser.y index 0f111635100..37a0f6ca8e3 100644 --- a/src/freedreno/ir3/ir3_parser.y +++ b/src/freedreno/ir3/ir3_parser.y @@ -131,6 +131,7 @@ static void print_token(FILE *file, int type, YYSTYPE value) %token T_NOP %token T_EOLM %token T_EOGM +%token T_EOSTSC /* category 0: */ %token T_OP_NOP @@ -607,6 +608,7 @@ iflag: T_SY { iflags.flags |= IR3_INSTR_SY; } | T_NOP { iflags.nop = $1; } | T_EOLM { iflags.flags |= IR3_INSTR_EOLM; } | T_EOGM { iflags.flags |= IR3_INSTR_EOGM; } +| T_EOSTSC { iflags.flags |= IR3_INSTR_EOSTSC; } iflags: | iflag iflags diff --git a/src/freedreno/ir3/tests/disasm.c b/src/freedreno/ir3/tests/disasm.c index 1eda1f4a5ed..2b191a40607 100644 --- a/src/freedreno/ir3/tests/disasm.c +++ b/src/freedreno/ir3/tests/disasm.c @@ -71,6 +71,7 @@ static const struct test { INSTR_7XX(00000003_00000000, "(eolm)(eogm)nop"), INSTR_7XX(00000001_00000000, "(eolm)nop"), + INSTR_8XX(00001004_00000000, "(ss)(eostsc)nop"), /* cat1 */ INSTR_6XX(20244000_00000020, "mov.f32f32 r0.x, c8.x"), diff --git a/src/freedreno/isa/ir3-cat0.xml b/src/freedreno/isa/ir3-cat0.xml index b826ec3d23e..9d2182eb22b 100644 --- a/src/freedreno/isa/ir3-cat0.xml +++ b/src/freedreno/isa/ir3-cat0.xml @@ -52,13 +52,14 @@ SOFTWARE. !!(src->flags & IR3_INSTR_EQ) !!(src->flags & IR3_INSTR_EOLM) !!(src->flags & IR3_INSTR_EOGM) + !!(src->flags & IR3_INSTR_EOSTSC) - {SY}{SS}{EQ}{JP}{EOLM}{EOGM}{REPEAT}{NAME} + {SY}{SS}{EQ}{JP}{EOLM}{EOGM}{EOSTSC}{REPEAT}{NAME} @@ -72,7 +73,8 @@ SOFTWARE. of control flow including preambles. Doesn't seem to affect correctness. - 000 + + 00 000 000 000