From patchwork Sat Oct 9 07:32:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 243161 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o997YoKj005633 for ; Sat, 9 Oct 2010 07:35:12 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F18D99E9AF for ; Sat, 9 Oct 2010 00:34:49 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id C07659E8DD for ; Sat, 9 Oct 2010 00:32:53 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 09 Oct 2010 00:32:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.57,307,1283756400"; d="scan'208";a="334055531" Received: from xhh-ilk32.sh.intel.com (HELO localhost.localdomain) ([10.239.36.8]) by azsmga001.ch.intel.com with ESMTP; 09 Oct 2010 00:32:52 -0700 From: "Xiang, Haihao" To: intel-gfx@lists.freedesktop.org Date: Sat, 9 Oct 2010 15:32:25 +0800 Message-Id: <1286609550-16083-6-git-send-email-haihao.xiang@intel.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1286609550-16083-1-git-send-email-haihao.xiang@intel.com> References: <1286609550-16083-1-git-send-email-haihao.xiang@intel.com> Subject: [Intel-gfx] [PATCH 05/10] fix send instruction on Sandybridge X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 09 Oct 2010 07:35:12 +0000 (UTC) diff --git a/src/brw_structs.h b/src/brw_structs.h index 515d2aa..92a398e 100644 --- a/src/brw_structs.h +++ b/src/brw_structs.h @@ -1053,7 +1053,7 @@ struct brw_instruction GLuint predicate_control:4; /* 0x000f0000 */ GLuint predicate_inverse:1; /* 0x00100000 */ GLuint execution_size:3; /* 0x00e00000 */ - GLuint destreg__conditionalmod:4; /* destreg - send, conditionalmod - others */ + GLuint sfid_destreg__conditionalmod:4; /* sfid - send on GEN6+, destreg - send on Prev GEN6, conditionalmod - others */ GLuint acc_wr_control:1; /* 0x10000000 */ GLuint pad0:1; /* 0x20000000 */ GLuint debug_control:1; /* 0x40000000 */ diff --git a/src/disasm.c b/src/disasm.c index 37e8b51..8180149 100644 --- a/src/disasm.c +++ b/src/disasm.c @@ -795,7 +795,7 @@ int disasm (FILE *file, struct brw_instruction *inst) if (inst->header.opcode != BRW_OPCODE_SEND) err |= control (file, "conditional modifier", conditional_modifier, - inst->header.destreg__conditionalmod, NULL); + inst->header.sfid_destreg__conditionalmod, NULL); if (inst->header.opcode != BRW_OPCODE_NOP) { string (file, "("); @@ -804,7 +804,7 @@ int disasm (FILE *file, struct brw_instruction *inst) } if (inst->header.opcode == BRW_OPCODE_SEND) - format (file, " %d", inst->header.destreg__conditionalmod); + format (file, " %d", inst->header.sfid_destreg__conditionalmod); if (opcode[inst->header.opcode].ndst > 0) { pad (file, 16); diff --git a/src/gram.y b/src/gram.y index fcbbd81..2dab7a2 100644 --- a/src/gram.y +++ b/src/gram.y @@ -243,7 +243,7 @@ unaryinstruction: { bzero(&$$, sizeof($$)); $$.header.opcode = $2; - $$.header.destreg__conditionalmod = $3; + $$.header.sfid_destreg__conditionalmod = $3; $$.header.saturate = $4; $$.header.execution_size = $5; set_instruction_options(&$$, &$8); @@ -264,7 +264,7 @@ binaryinstruction: { bzero(&$$, sizeof($$)); $$.header.opcode = $2; - $$.header.destreg__conditionalmod = $3; + $$.header.sfid_destreg__conditionalmod = $3; $$.header.saturate = $4; $$.header.execution_size = $5; set_instruction_options(&$$, &$9); @@ -287,7 +287,7 @@ binaryaccinstruction: { bzero(&$$, sizeof($$)); $$.header.opcode = $2; - $$.header.destreg__conditionalmod = $3; + $$.header.sfid_destreg__conditionalmod = $3; $$.header.saturate = $4; $$.header.execution_size = $5; set_instruction_options(&$$, &$9); @@ -322,7 +322,6 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget bzero(&$$, sizeof($$)); $$.header.opcode = $2; $$.header.execution_size = $3; - $$.header.destreg__conditionalmod = $4; /* msg reg index */ set_instruction_predicate(&$$, &$1); if (set_instruction_dest(&$$, &$5) != 0) YYERROR; @@ -331,15 +330,22 @@ sendinstruction: predicate SEND execsize exp post_dst payload msgtarget $$.bits1.da1.src1_reg_file = BRW_IMMEDIATE_VALUE; $$.bits1.da1.src1_reg_type = BRW_REGISTER_TYPE_D; - if (gen_level == 5) { - $$.bits2.send_gen5.sfid = $7.bits2.send_gen5.sfid; - $$.bits2.send_gen5.end_of_thread = $12.bits3.generic_gen5.end_of_thread; + if (gen_level >= 5) { + if (gen_level > 5) { + $$.header.sfid_destreg__conditionalmod = $7.bits2.send_gen5.sfid; + } else { + $$.header.sfid_destreg__conditionalmod = $4; /* msg reg index */ + $$.bits2.send_gen5.sfid = $7.bits2.send_gen5.sfid; + $$.bits2.send_gen5.end_of_thread = $12.bits3.generic_gen5.end_of_thread; + } + $$.bits3.generic_gen5 = $7.bits3.generic_gen5; $$.bits3.generic_gen5.msg_length = $9; $$.bits3.generic_gen5.response_length = $11; $$.bits3.generic_gen5.end_of_thread = $12.bits3.generic_gen5.end_of_thread; } else { + $$.header.sfid_destreg__conditionalmod = $4; /* msg reg index */ $$.bits3.generic = $7.bits3.generic; $$.bits3.generic.msg_length = $9; $$.bits3.generic.response_length = $11;