diff mbox

[04/10] add AccWrCtrl flag on Sandybridge

Message ID 1286609550-16083-5-git-send-email-haihao.xiang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Xiang, Haihao Oct. 9, 2010, 7:32 a.m. UTC
None
diff mbox

Patch

diff --git a/src/brw_defines.h b/src/brw_defines.h
index 7812d72..4921d34 100644
--- a/src/brw_defines.h
+++ b/src/brw_defines.h
@@ -552,6 +552,9 @@ 
 #define BRW_MASK_ENABLE   0
 #define BRW_MASK_DISABLE  1
 
+#define BRW_ACCWRCTRL_NONE      0
+#define BRW_ACCWRCTRL_ACCWRCTRL 1
+
 #define BRW_OPCODE_MOV        1
 #define BRW_OPCODE_SEL        2
 #define BRW_OPCODE_NOT        4
diff --git a/src/brw_structs.h b/src/brw_structs.h
index 32a52df..515d2aa 100644
--- a/src/brw_structs.h
+++ b/src/brw_structs.h
@@ -1054,7 +1054,8 @@  struct brw_instruction
       GLuint predicate_inverse:1;	/* 0x00100000 */
       GLuint execution_size:3;		/* 0x00e00000 */
       GLuint destreg__conditionalmod:4; /* destreg - send, conditionalmod - others */
-      GLuint pad0:2;			/* 0x30000000 */
+      GLuint acc_wr_control:1;          /* 0x10000000 */
+      GLuint pad0:1;                    /* 0x20000000 */
       GLuint debug_control:1;		/* 0x40000000 */
       GLuint saturate:1;		/* 0x80000000 */
    } header;
diff --git a/src/gram.y b/src/gram.y
index f57e97c..fcbbd81 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -88,7 +88,7 @@  void set_direct_src_operand(struct src_operand *src, struct direct_reg *reg,
 %token <integer> TYPE_VF TYPE_HF TYPE_V TYPE_F
 
 %token ALIGN1 ALIGN16 SECHALF COMPR SWITCH ATOMIC NODDCHK NODDCLR
-%token MASK_DISABLE BREAKPOINT EOT
+%token MASK_DISABLE BREAKPOINT ACCWRCTRL EOT
 
 %token SEQ ANY2H ALL2H ANY4H ALL4H ANY8H ALL8H ANY16H ALL16H ANYV ALLV
 %token <integer> ZERO EQUAL NOT_ZERO NOT_EQUAL GREATER GREATER_EQUAL LESS LESS_EQUAL
@@ -1605,6 +1605,9 @@  instoption_list:
 		  case BREAKPOINT:
 		    $$.header.debug_control = BRW_DEBUG_BREAKPOINT;
 		    break;
+		  case ACCWRCTRL:
+		    $$.header.acc_wr_control = BRW_ACCWRCTRL_ACCWRCTRL;
+		    break;
 		  case EOT:
 		    /* XXX: EOT shouldn't be an instoption, I don't think */
 		    $$.bits3.generic.end_of_thread = 1;
@@ -1627,6 +1630,7 @@  instoption:	ALIGN1 { $$ = ALIGN1; }
 		| NODDCLR { $$ = NODDCLR; }
 		| MASK_DISABLE { $$ = MASK_DISABLE; }
 		| BREAKPOINT { $$ = BREAKPOINT; }
+		| ACCWRCTRL { $$ = ACCWRCTRL; }
 		| EOT { $$ = EOT; }
 ;
 
diff --git a/src/lex.l b/src/lex.l
index 8d7a4f0..ead12af 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -269,6 +269,7 @@  extern char *input_filename;
 "mask_disable" { return MASK_DISABLE; }
 "nomask" { return MASK_DISABLE; }
 "breakpoint" { return BREAKPOINT; }
+"accwrctrl" { return ACCWRCTRL; }
 "EOT" { return EOT; }
 
  /* extended math functions */