summaryrefslogtreecommitdiff
path: root/assembler
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-27 14:56:30 +0800
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:54:34 +0000
commitb899aba57f0e1b8a01b3f74b26a8c575a69ab6ae (patch)
tree5d65d4fe8bb4ab965194729551ed2fc0962822f0 /assembler
parent7e2461b6fc357476adebad19095f5cfdb4038b31 (diff)
Replace variable init code in WAIT by src_null_reg
Diffstat (limited to 'assembler')
-rw-r--r--assembler/src/gram.y10
1 files changed, 2 insertions, 8 deletions
diff --git a/assembler/src/gram.y b/assembler/src/gram.y
index 0c5de5a1..fc0a02a5 100644
--- a/assembler/src/gram.y
+++ b/assembler/src/gram.y
@@ -44,6 +44,7 @@ static struct src_operand src_null_reg =
{
.reg_file = BRW_ARCHITECTURE_REGISTER_FILE,
.reg_nr = BRW_ARF_NULL,
+ .reg_type = BRW_REGISTER_TYPE_UD,
};
static struct dst_operand dst_null_reg =
{
@@ -1103,15 +1104,9 @@ maskpushop: MSAVE | PUSH
syncinstruction: predicate WAIT notifyreg
{
- struct direct_reg null;
struct dst_operand notify_dst;
- struct src_operand null_src;
struct src_operand notify_src;
- null.reg_file = BRW_ARCHITECTURE_REGISTER_FILE;
- null.reg_nr = BRW_ARF_NULL;
- null.subreg_nr = 0;
-
memset(&$$, 0, sizeof($$));
$$.header.opcode = $2;
$$.header.execution_size = ffs(1) - 1;
@@ -1119,8 +1114,7 @@ syncinstruction: predicate WAIT notifyreg
set_instruction_dest(&$$, &notify_dst);
set_direct_src_operand(&notify_src, &$3, BRW_REGISTER_TYPE_D);
set_instruction_src0(&$$, &notify_src);
- set_direct_src_operand(&null_src, &null, BRW_REGISTER_TYPE_UD);
- set_instruction_src1(&$$, &null_src);
+ set_instruction_src1(&$$, &src_null_reg);
}
;