assembler: Replace struct dst_operand by struct brw_reg

One more step on the road to replacing all register-like structures by
struct brw_reg.

Two things in this commit are worth noting:

* As we are using more and more brw_reg, a lot of the field-by-field
  assignments can be replaced by 1 assignment which results is a
  reduction of code

* As the destination horizontal stride is now stored on 2 bits in
  brw_reg, it's not possible to defer the handling of DEFAULT_DSTREGION
  (aka (int)-1) when setting the destination operand. It has to be done
  when parsing the region and resolve_dst_region() is a helper for that
  task.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau
2013-01-23 20:33:00 +00:00
parent 801b4eb1b3
commit 0375073f05
2 changed files with 97 additions and 146 deletions
-16
View File
@@ -81,22 +81,6 @@ struct regtype {
int is_default;
};
/**
* This structure is the internal representation of destination operands in the
* parser.
*/
struct dst_operand {
int reg_file, reg_nr, subreg_nr, reg_type;
int writemask;
int horiz_stride;
int address_mode; /* 0 if direct, 1 if register-indirect */
/* Indirect addressing */
int indirect_offset;
};
/**
* This structure is the internal representation of source operands in the
* parser.