Fix a compiler warning by defining struct {in,}direct_reg at the top level.

This commit is contained in:
Eric Anholt 2006-08-30 11:10:45 -07:00 committed by Damien Lespiau
parent cc05ba1d9e
commit 74c81af3dd
2 changed files with 19 additions and 7 deletions

View File

@ -38,6 +38,23 @@ typedef float GLfloat;
void yyerror (char *msg);
/**
* This structure is the internal representation of directly-addressed
* registers in the parser.
*/
struct direct_reg {
int reg_file, reg_nr, subreg_nr;
};
/**
* This structure is the internal representation of register-indirect addressed
* registers in the parser.
*/
struct indirect_reg {
int reg_file, address_subreg_nr, indirect_offset;
};
/**
* This structure is the internal representation of destination operands in the
* parser.

View File

@ -31,7 +31,6 @@
#include "gen4asm.h"
#include "brw_defines.h"
int set_instruction_dest(struct brw_instruction *instr,
struct dst_operand *dest);
int set_instruction_src1(struct brw_instruction *instr,
@ -60,12 +59,8 @@ void set_direct_src_operand(struct src_operand *src, struct direct_reg *reg,
struct region {
int vert_stride, width, horiz_stride;
} region;
struct direct_reg {
int reg_file, reg_nr, subreg_nr;
} direct_reg;
struct indirect_reg {
int reg_file, address_subreg_nr, indirect_offset;
} indirect_reg;
struct direct_reg direct_reg;
struct indirect_reg indirect_reg;
double imm32;