assembler: Use brw_set_dest() to encode the destination

A few notes:

I needed to introduce a brw context and compile structs. These are only
used to get which generation we are compiling code for, but eventually
we can use more of the infrastructure.

brw_set_dest() uses the destination register width to program the
instruction execution size.

The assembler can either take subnr in bytes or in number of elements,
so we need a resolve step when setting a brw_reg.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau
2013-01-24 16:16:35 +00:00
parent 5e0da9f854
commit 9fcc1bdcad
3 changed files with 91 additions and 94 deletions
+3
View File
@@ -43,6 +43,9 @@ typedef float GLfloat;
extern long int gen_level;
extern struct brw_context genasm_context;
extern struct brw_compile genasm_compile;
/* Predicate for Gen X and above */
#define IS_GENp(x) (gen_level >= (x)*10)