assembler: Remove the writemask_set field of struct dest_operand

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 <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau 2013-01-20 21:52:05 +00:00
parent db6f5e08ba
commit 02019d4d55
2 changed files with 4 additions and 7 deletions

View File

@ -91,7 +91,6 @@ struct indirect_reg {
struct dst_operand { struct dst_operand {
int reg_file, reg_nr, subreg_nr, reg_type; int reg_file, reg_nr, subreg_nr, reg_type;
int writemask_set;
int writemask; int writemask;
int horiz_stride; int horiz_stride;

View File

@ -1541,7 +1541,6 @@ dstoperand: symbol_reg dstregion
$$.address_subreg_nr = $1.address_subreg_nr; $$.address_subreg_nr = $1.address_subreg_nr;
$$.indirect_offset = $1.indirect_offset; $$.indirect_offset = $1.indirect_offset;
$$.horiz_stride = $2; $$.horiz_stride = $2;
$$.writemask_set = $3.writemask_set;
$$.writemask = $3.writemask; $$.writemask = $3.writemask;
$$.reg_type = $4.type; $$.reg_type = $4.type;
} }
@ -2431,12 +2430,10 @@ chansel: X | Y | Z | W
*/ */
writemask: /* empty */ writemask: /* empty */
{ {
$$.writemask_set = 0;
$$.writemask = BRW_WRITEMASK_XYZW; $$.writemask = BRW_WRITEMASK_XYZW;
} }
| DOT writemask_x writemask_y writemask_z writemask_w | DOT writemask_x writemask_y writemask_z writemask_w
{ {
$$.writemask_set = 1;
$$.writemask = $2 | $3 | $4 | $5; $$.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_reg_nr = dest->reg_nr;
instr->bits1.da1.dest_horiz_stride = dest->horiz_stride; instr->bits1.da1.dest_horiz_stride = dest->horiz_stride;
instr->bits1.da1.dest_address_mode = dest->address_mode; 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 " fprintf(stderr, "error: write mask set in align1 "
"instruction\n"); "instruction\n");
return 1; 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_horiz_stride = dest->horiz_stride;
instr->bits1.ia1.dest_indirect_offset = dest->indirect_offset; instr->bits1.ia1.dest_indirect_offset = dest->indirect_offset;
instr->bits1.ia1.dest_address_mode = dest->address_mode; 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 " fprintf(stderr, "error: write mask set in align1 "
"instruction\n"); "instruction\n");
return 1; 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->subreg_nr = reg->subreg_nr;
dst->reg_type = type; dst->reg_type = type;
dst->horiz_stride = 1; dst->horiz_stride = 1;
dst->writemask_set = 0;
dst->writemask = BRW_WRITEMASK_XYZW; dst->writemask = BRW_WRITEMASK_XYZW;
} }