intel/tools: Simplify notification register handling
authorMatt Turner <mattst88@gmail.com>
Thu, 16 Jul 2020 05:55:35 +0000 (22:55 -0700)
committerMatt Turner <mattst88@gmail.com>
Fri, 31 Jul 2020 19:59:24 +0000 (12:59 -0700)
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956>

src/intel/tools/i965_gram.y
src/intel/tools/i965_lex.l

index 0db574ca1732b5e79f6f96670e6fea40a14ce634..2b657688e25bc6a81fc2720f6552051df43a367b 100644 (file)
@@ -1813,10 +1813,6 @@ maskreg:
 notifyreg:
        NOTIFYREG subregnum
        {
-               if ($1 > 0)
-                       error(&@1, "Notification register number %d"
-                                  " out of range\n", $1);
-
                int subnr = (p->devinfo->gen >= 11) ? 2 : 3;
                if ($2 > subnr)
                        error(&@2, "Notification sub register number %d"
index 9768c83d5a6c605bfb7a6d4d59c875e934f39178..4e575a3253ffaa9b9e301c6a938d36f2251ce403 100644 (file)
@@ -333,7 +333,7 @@ m[0-9]+     { yylval.integer = atoi(yytext + 1); BEGIN(REG); return MSGREG; }
 sr[0-9]+       { yylval.integer = atoi(yytext + 2); return STATEREG; }
 
  /* notification registers */
-"n"[0-2]+      { yylval.integer = atoi(yytext + 1); BEGIN(REG); return NOTIFYREG; }
+"n0"           { BEGIN(REG); return NOTIFYREG; }
 
  /* IP register */
 "ip"           { return IPREG; }