From patchwork Mon Feb 4 15:27:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2092961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 7EABFDFE82 for ; Mon, 4 Feb 2013 15:46:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D150E60D2 for ; Mon, 4 Feb 2013 07:46:46 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id A7846E60D2 for ; Mon, 4 Feb 2013 07:29:29 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 04 Feb 2013 07:28:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,600,1355126400"; d="scan'208";a="257441859" Received: from unknown (HELO dyon.amr.corp.intel.com) ([10.255.12.132]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2013 07:29:27 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Feb 2013 15:27:28 +0000 Message-Id: <1359991705-5254-34-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 1.7.7.5 In-Reply-To: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> References: <1359991705-5254-1-git-send-email-damien.lespiau@intel.com> Subject: [Intel-gfx] [PATCH 33/90] assembler: Remove the writemask_set field of struct dest_operand X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 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 writemask_set gets in the way of switching to using struct brw_reg and it's possible to derive it from the writemask value. Signed-off-by: Damien Lespiau --- assembler/gen4asm.h | 1 - assembler/gram.y | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 71b8a4d..e57a699 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -91,7 +91,6 @@ struct indirect_reg { struct dst_operand { int reg_file, reg_nr, subreg_nr, reg_type; - int writemask_set; int writemask; int horiz_stride; diff --git a/assembler/gram.y b/assembler/gram.y index a27375b..62dad6d 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -1541,7 +1541,6 @@ dstoperand: symbol_reg dstregion $$.address_subreg_nr = $1.address_subreg_nr; $$.indirect_offset = $1.indirect_offset; $$.horiz_stride = $2; - $$.writemask_set = $3.writemask_set; $$.writemask = $3.writemask; $$.reg_type = $4.type; } @@ -2431,12 +2430,10 @@ chansel: X | Y | Z | W */ writemask: /* empty */ { - $$.writemask_set = 0; $$.writemask = BRW_WRITEMASK_XYZW; } | DOT writemask_x writemask_y writemask_z writemask_w { - $$.writemask_set = 1; $$.writemask = $2 | $3 | $4 | $5; } ; @@ -2843,7 +2840,8 @@ int set_instruction_dest(struct brw_instruction *instr, instr->bits1.da1.dest_reg_nr = dest->reg_nr; instr->bits1.da1.dest_horiz_stride = dest->horiz_stride; instr->bits1.da1.dest_address_mode = dest->address_mode; - if (dest->writemask_set) { + if (dest->writemask != 0 && + dest->writemask != BRW_WRITEMASK_XYZW) { fprintf(stderr, "error: write mask set in align1 " "instruction\n"); return 1; @@ -2863,7 +2861,8 @@ int set_instruction_dest(struct brw_instruction *instr, instr->bits1.ia1.dest_horiz_stride = dest->horiz_stride; instr->bits1.ia1.dest_indirect_offset = dest->indirect_offset; instr->bits1.ia1.dest_address_mode = dest->address_mode; - if (dest->writemask_set) { + if (dest->writemask != 0 && + dest->writemask != BRW_WRITEMASK_XYZW) { fprintf(stderr, "error: write mask set in align1 " "instruction\n"); return 1; @@ -3134,7 +3133,6 @@ void set_direct_dst_operand(struct dst_operand *dst, struct direct_reg *reg, dst->subreg_nr = reg->subreg_nr; dst->reg_type = type; dst->horiz_stride = 1; - dst->writemask_set = 0; dst->writemask = BRW_WRITEMASK_XYZW; }