intel/tools: Handle illegal instruction
authorSagar Ghuge <sagar.ghuge@intel.com>
Wed, 5 Feb 2020 00:37:01 +0000 (16:37 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 25 Feb 2020 22:23:38 +0000 (22:23 +0000)
Allow assembler to handle illegal instruction even though mesa doesn't
use it but might be required at some point in future.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3952>

src/intel/tools/i965_gram.y

index ee2a144669455282c11be72c3e89e10be151a23a..0ac6d50c16a26adfb497ff2b80fcb398cc81d17a 100644 (file)
@@ -616,6 +616,7 @@ instruction:
        | syncinstruction
        | ternaryinstruction
        | sendinstruction
+       | illegalinstruction
        ;
 
 relocatableinstruction:
@@ -625,6 +626,15 @@ relocatableinstruction:
        | loopinstruction
        ;
 
+illegalinstruction:
+       ILLEGAL execsize instoptions
+       {
+               brw_next_insn(p, $1);
+               brw_inst_set_exec_size(p->devinfo, brw_last_inst, $2);
+               i965_asm_set_instruction_options(p, $3);
+       }
+       ;
+
 /* Unary instruction */
 unaryinstruction:
        predicate unaryopcodes saturate cond_mod execsize dst srcaccimm instoptions