summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-14 08:27:41 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-09-17 04:16:31 -0400
commit59a04d4ad2973368cf1ae182ead40676e26f4598 (patch)
tree85d6d36b9d169d892f368ed1914498c746b8c348
parentf98139b1389132b4cc86511f0725c0beedd23ad6 (diff)
Supporting instruction Bit Field Insert 1
The bfi1 instruction component-wise generates mask with control from src0 and src1 and stores the results in dst.
-rw-r--r--src/brw_defines.h1
-rw-r--r--src/gram.y4
-rw-r--r--src/lex.l1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/brw_defines.h b/src/brw_defines.h
index dc13b8e..7c5c29f 100644
--- a/src/brw_defines.h
+++ b/src/brw_defines.h
@@ -569,6 +569,7 @@
#define BRW_OPCODE_CMP 16
#define BRW_OPCODE_CMPN 17
#define BRW_OPCODE_BFE 24
+#define BRW_OPCODE_BFI1 25
#define BRW_OPCODE_BFI2 26
#define BRW_OPCODE_JMPI 32
#define BRW_OPCODE_IF 34
diff --git a/src/gram.y b/src/gram.y
index f3f3a60..a0c65f3 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -115,7 +115,7 @@ void set_direct_src_operand(struct src_operand *src, struct direct_reg *reg,
%token <integer> MOV FRC RNDU RNDD RNDE RNDZ NOT LZD
%token <integer> MUL MAC MACH LINE SAD2 SADA2 DP4 DPH DP3 DP2
%token <integer> AVG ADD SEL AND OR XOR SHR SHL ASR CMP CMPN PLN
-%token <integer> ADDC
+%token <integer> ADDC BFI1
%token <integer> SEND NOP JMPI IF IFF WHILE ELSE BREAK CONT HALT MSAVE
%token <integer> PUSH MREST POP WAIT DO ENDIF ILLEGAL
%token <integer> MATH_INST
@@ -492,7 +492,7 @@ binaryaccinstruction:
;
binaryaccop: AVG | ADD | SEL | AND | OR | XOR | SHR | SHL | ASR | CMP | CMPN | PLN
- | ADDC
+ | ADDC | BFI1
;
trinaryop: MAD | LRP | BFE | BFI2
diff --git a/src/lex.l b/src/lex.l
index b162033..681ce48 100644
--- a/src/lex.l
+++ b/src/lex.l
@@ -86,6 +86,7 @@ yylval.integer = BRW_CHANNEL_W;
"mad" { yylval.integer = BRW_OPCODE_MAD; return MAD; }
"lrp" { yylval.integer = BRW_OPCODE_LRP; return LRP; }
"bfe" { yylval.integer = BRW_OPCODE_BFE; return BFE; }
+"bfi1" { yylval.integer = BRW_OPCODE_BFI1; return BFI1; }
"bfi2" { yylval.integer = BRW_OPCODE_BFI2; return BFI2; }
"mul" { yylval.integer = BRW_OPCODE_MUL; return MUL; }
"mac" { yylval.integer = BRW_OPCODE_MAC; return MAC; }