From patchwork Mon Feb 4 15:28:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lespiau, Damien" X-Patchwork-Id: 2093781 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id A766A3FD56 for ; Mon, 4 Feb 2013 16:11:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 24D8CE6212 for ; Mon, 4 Feb 2013 08:11:39 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 06D85E60E3 for ; Mon, 4 Feb 2013 07:30:31 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 04 Feb 2013 07:30:30 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,600,1355126400"; d="scan'208";a="257442539" Received: from unknown (HELO dyon.amr.corp.intel.com) ([10.255.12.132]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2013 07:30:29 -0800 From: Damien Lespiau To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Feb 2013 15:28:19 +0000 Message-Id: <1359991705-5254-85-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 84/90] assembler: Merge declared_register's type into the reg structure 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 Signed-off-by: Damien Lespiau --- assembler/gen4asm.h | 1 - assembler/gram.y | 12 +++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/assembler/gen4asm.h b/assembler/gen4asm.h index 3b98444..49baf9d 100644 --- a/assembler/gen4asm.h +++ b/assembler/gen4asm.h @@ -220,7 +220,6 @@ struct declared_register { int element_size; struct region src_region; int dst_region; - int type; }; struct declared_register *find_register(char *name); void insert_register(struct declared_register *reg); diff --git a/assembler/gram.y b/assembler/gram.y index d69d7b4..aa6d709 100644 --- a/assembler/gram.y +++ b/assembler/gram.y @@ -181,8 +181,7 @@ static bool declared_register_equal(struct declared_register *r1, return false; if (r1->element_size != r2->element_size || - r1->dst_region != r2->dst_region || - r1->type != r2->type) + r1->dst_region != r2->dst_region) return false; return true; @@ -650,7 +649,7 @@ declare_pragma: DECLARE_PRAGMA STRING declare_base declare_elementsize declare_s reg.element_size = $4; reg.src_region = $5; reg.dst_region = $6; - reg.type = $7; + reg.reg.type = $7; found = find_register($2); if (found) { @@ -1771,7 +1770,6 @@ dstoperand: symbol_reg dstregion { $$ = $1.reg; $$.hstride = resolve_dst_region(&$1, $2); - $$.type = $1.type; } | dstreg dstregion writemask regtype { @@ -1860,7 +1858,7 @@ symbol_reg_p: STRING LPAREN exp RPAREN memcpy(&$$, dcl_reg, sizeof(*dcl_reg)); $$.reg.nr += $3; if(advanced_flag) { - int size = get_type_size(dcl_reg->type); + int size = get_type_size(dcl_reg->reg.type); $$.reg.nr += ($$.reg.subnr + $5) / (32 / size); $$.reg.subnr = ($$.reg.subnr + $5) % (32 / size); } else { @@ -2047,7 +2045,7 @@ directsrcoperand: negate abs symbol_reg region regtype $$.reg.nr = $3.reg.nr; $$.reg.subnr = $3.reg.subnr; if ($5.is_default) { - $$.reg.type = $3.type; + $$.reg.type = $3.reg.type; } else { $$.reg.type = $5.type; } @@ -2434,7 +2432,7 @@ relativelocation2: $$.reg.file = $1.reg.file; $$.reg.nr = $1.reg.nr; $$.reg.subnr = $1.reg.subnr; - $$.reg.type = $1.type; + $$.reg.type = $1.reg.type; $$.reg.vstride = $1.src_region.vert_stride; $$.reg.width = $1.src_region.width; $$.reg.hstride = $1.src_region.horiz_stride;