From: Damien Lespiau Subject: Re: [PATCH intel-gpu-tools] assembler: Add support for the SENDC instruction. Date: Fri, 10 May 2013 15:45:43 +0100 Message-ID: <20130510144543.GA24243@strange.amr.corp.intel.com> References: <1368121488-20531-1-git-send-email-mattst88@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C95FE645A for ; Fri, 10 May 2013 07:45:45 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1368121488-20531-1-git-send-email-mattst88@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Matt Turner Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 09, 2013 at 10:44:48AM -0700, Matt Turner wrote: > --- > assembler/gram.y | 20 ++++++++++++-------- > assembler/lex.l | 1 + > 2 files changed, 13 insertions(+), 8 deletions(-) Looks good to me. Reviewed-by: Damien Lespiau -- Damien > > diff --git a/assembler/gram.y b/assembler/gram.y > index 50d71d1..09f21f1 100644 > --- a/assembler/gram.y > +++ b/assembler/gram.y > @@ -440,7 +440,7 @@ static void resolve_subnr(struct brw_reg *reg) > %token MUL MAC MACH LINE SAD2 SADA2 DP4 DPH DP3 DP2 > %token AVG ADD SEL AND OR XOR SHR SHL ASR CMP CMPN PLN > %token ADDC BFI1 BFREV CBIT F16TO32 F32TO16 FBH FBL > -%token SEND NOP JMPI IF IFF WHILE ELSE BREAK CONT HALT MSAVE > +%token SEND SENDC NOP JMPI IF IFF WHILE ELSE BREAK CONT HALT MSAVE > %token PUSH MREST POP WAIT DO ENDIF ILLEGAL > %token MATH_INST > %token MAD LRP BFE BFI2 SUBB > @@ -494,6 +494,7 @@ static void resolve_subnr(struct brw_reg *reg) > %type instoption > %type unaryop binaryop binaryaccop breakop > %type trinaryop > +%type sendop > %type conditionalmodifier > %type predicate > %type instoptions instoption_list > @@ -1099,7 +1100,10 @@ trinaryinstruction: > } > ; > > -sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > +sendop: SEND | SENDC > +; > + > +sendinstruction: predicate sendop execsize exp post_dst payload msgtarget > MSGLEN exp RETURNLEN exp instoptions > { > /* Send instructions are messy. The first argument is the > @@ -1163,7 +1167,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > GEN(&$$)->bits3.generic.end_of_thread = $12.end_of_thread; > } > } > - | predicate SEND execsize dst sendleadreg payload directsrcoperand instoptions > + | predicate sendop execsize dst sendleadreg payload directsrcoperand instoptions > { > memset(&$$, 0, sizeof($$)); > set_instruction_opcode(&$$, $2); > @@ -1181,7 +1185,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > YYERROR; > > } > - | predicate SEND execsize dst sendleadreg payload imm32reg instoptions > + | predicate sendop execsize dst sendleadreg payload imm32reg instoptions > { > if ($7.reg.type != BRW_REGISTER_TYPE_UD && > $7.reg.type != BRW_REGISTER_TYPE_D && > @@ -1202,7 +1206,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > if (set_instruction_src1(&$$, &$7, &@7) != 0) > YYERROR; > } > - | predicate SEND execsize dst sendleadreg sndopr imm32reg instoptions > + | predicate sendop execsize dst sendleadreg sndopr imm32reg instoptions > { > struct src_operand src0; > > @@ -1243,7 +1247,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > > GEN(&$$)->bits3.generic_gen5.end_of_thread = !!($6 & EX_DESC_EOT_MASK); > } > - | predicate SEND execsize dst sendleadreg sndopr directsrcoperand instoptions > + | predicate sendop execsize dst sendleadreg sndopr directsrcoperand instoptions > { > struct src_operand src0; > > @@ -1284,7 +1288,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > set_instruction_src1(&$$, &$7, &@7); > GEN(&$$)->bits3.generic_gen5.end_of_thread = !!($6 & EX_DESC_EOT_MASK); > } > - | predicate SEND execsize dst sendleadreg payload sndopr imm32reg instoptions > + | predicate sendop execsize dst sendleadreg payload sndopr imm32reg instoptions > { > if ($8.reg.type != BRW_REGISTER_TYPE_UD && > $8.reg.type != BRW_REGISTER_TYPE_D && > @@ -1310,7 +1314,7 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget > GEN(&$$)->bits3.generic_gen5.end_of_thread = !!($7 & EX_DESC_EOT_MASK); > } > } > - | predicate SEND execsize dst sendleadreg payload exp directsrcoperand instoptions > + | predicate sendop execsize dst sendleadreg payload exp directsrcoperand instoptions > { > memset(&$$, 0, sizeof($$)); > set_instruction_opcode(&$$, $2); > diff --git a/assembler/lex.l b/assembler/lex.l > index 769d98b..4f1f961 100644 > --- a/assembler/lex.l > +++ b/assembler/lex.l > @@ -129,6 +129,7 @@ yylval.integer = BRW_CHANNEL_W; > "subb" { yylval.integer = BRW_OPCODE_SUBB; return SUBB; } > > "send" { yylval.integer = BRW_OPCODE_SEND; return SEND; } > +"sendc" { yylval.integer = BRW_OPCODE_SENDC; return SENDC; } > "nop" { yylval.integer = BRW_OPCODE_NOP; return NOP; } > "jmpi" { yylval.integer = BRW_OPCODE_JMPI; return JMPI; } > "if" { yylval.integer = BRW_OPCODE_IF; return IF; } > -- > 1.8.1.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx