Mesa (master): intel/tools: Simplify notification register handling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 31 20:40:48 UTC 2020


Module: Mesa
Branch: master
Commit: ac7ecd205b2ea98c57edd98633fc260523219296
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac7ecd205b2ea98c57edd98633fc260523219296

Author: Matt Turner <mattst88 at gmail.com>
Date:   Wed Jul 15 22:55:35 2020 -0700

intel/tools: Simplify notification register handling

Reviewed-by: Sagar Ghuge <sagar.ghuge at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5956>

---

 src/intel/tools/i965_gram.y | 4 ----
 src/intel/tools/i965_lex.l  | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/intel/tools/i965_gram.y b/src/intel/tools/i965_gram.y
index 0db574ca173..2b657688e25 100644
--- a/src/intel/tools/i965_gram.y
+++ b/src/intel/tools/i965_gram.y
@@ -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"
diff --git a/src/intel/tools/i965_lex.l b/src/intel/tools/i965_lex.l
index 9768c83d5a6..4e575a3253f 100644
--- a/src/intel/tools/i965_lex.l
+++ b/src/intel/tools/i965_lex.l
@@ -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; }



More information about the mesa-commit mailing list