[Mesa-dev] [PATCH 10/14] i965: Add BRW_OPCODE_NENOP for G45.

Ian Romanick idr at freedesktop.org
Wed Sep 24 10:41:25 PDT 2014


There are a bunch of other places that do special things for
BRW_OPCODE_NOP.  Do any of those also need changes?

On 08/28/2014 08:10 PM, Matt Turner wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_defines.h | 1 +
>  src/mesa/drivers/dri/i965/brw_disasm.c  | 5 +++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
> index 0ef43e9..251f5b7 100644
> --- a/src/mesa/drivers/dri/i965/brw_defines.h
> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> @@ -847,6 +847,7 @@ enum opcode {
>     BRW_OPCODE_PLN =	90,  /**< G45+ */
>     BRW_OPCODE_MAD =	91,  /**< Gen6+ */
>     BRW_OPCODE_LRP =	92,  /**< Gen6+ */
> +   BRW_OPCODE_NENOP =	125, /**< G45 only */
>     BRW_OPCODE_NOP =	126,
>  
>     /* These are compiler backend opcodes that get translated into other
> diff --git a/src/mesa/drivers/dri/i965/brw_disasm.c b/src/mesa/drivers/dri/i965/brw_disasm.c
> index 5a56591..a729d11 100644
> --- a/src/mesa/drivers/dri/i965/brw_disasm.c
> +++ b/src/mesa/drivers/dri/i965/brw_disasm.c
> @@ -84,6 +84,7 @@ const struct opcode_desc opcode_descs[128] = {
>     [BRW_OPCODE_SEND]     = { .name = "send",    .nsrc = 1, .ndst = 1 },
>     [BRW_OPCODE_SENDC]    = { .name = "sendc",   .nsrc = 1, .ndst = 1 },
>     [BRW_OPCODE_NOP]      = { .name = "nop",     .nsrc = 0, .ndst = 0 },
> +   [BRW_OPCODE_NENOP]    = { .name = "nenop",   .nsrc = 0, .ndst = 0 },
>     [BRW_OPCODE_JMPI]     = { .name = "jmpi",    .nsrc = 0, .ndst = 0 },
>     [BRW_OPCODE_IF]       = { .name = "if",      .nsrc = 2, .ndst = 0 },
>     [BRW_OPCODE_IFF]      = { .name = "iff",     .nsrc = 2, .ndst = 1 },
> @@ -1225,7 +1226,7 @@ brw_disassemble_inst(FILE *file, struct brw_context *brw, brw_inst *inst,
>        }
>     }
>  
> -   if (opcode != BRW_OPCODE_NOP) {
> +   if (opcode != BRW_OPCODE_NOP && opcode != BRW_OPCODE_NENOP) {
>        string(file, "(");
>        err |= control(file, "execution size", exec_size,
>                       brw_inst_exec_size(brw, inst), NULL);
> @@ -1509,7 +1510,7 @@ brw_disassemble_inst(FILE *file, struct brw_context *brw, brw_inst *inst,
>        }
>     }
>     pad(file, 64);
> -   if (opcode != BRW_OPCODE_NOP) {
> +   if (opcode != BRW_OPCODE_NOP && opcode != BRW_OPCODE_NENOP) {
>        string(file, "{");
>        space = 1;
>        err |= control(file, "access mode", access_mode,
> 



More information about the mesa-dev mailing list