diff options
author | Homer Hsing <homer.xing@intel.com> | 2012-09-28 13:46:21 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2012-09-28 04:06:01 -0400 |
commit | 34f06e1ea81354bb09bf5f9134cbfd9f7cc81922 (patch) | |
tree | c77d4739e62057b6dfeeb9b8b3228f661b19a6d3 | |
parent | f414c680322e1149ea18f1e130b4fc2894184342 (diff) |
Make sure Gen6 ENDIF work
-rw-r--r-- | src/gram.y | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -431,6 +431,10 @@ instruction: unaryinstruction ifelseinstruction: ENDIF { // for Gen4 + if(gen_level > 5) { + fprintf(stderr, "ENDIF Syntax error: should be 'ENDIF execsize relativelocation'\n"); + YYERROR; + } memset(&$$, 0, sizeof($$)); $$.header.opcode = $1; $$.header.thread_control |= BRW_THREAD_SWITCH; @@ -440,8 +444,12 @@ ifelseinstruction: ENDIF } | ENDIF execsize relativelocation instoptions { - // for Gen7+ - /* Gen7 bspec: predication is prohibited */ + // for Gen6+ + /* Gen6, Gen7 bspec: predication is prohibited */ + if(gen_level <= 5) { + fprintf(stderr, "ENDIF Syntax error: should be 'ENDIF'\n"); + YYERROR; + } memset(&$$, 0, sizeof($$)); $$.header.opcode = $1; $$.header.execution_size = $2; |