summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomer Hsing <homer.xing@intel.com>2012-09-18 13:25:53 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2012-09-26 23:27:00 -0400
commit8c59c185c22ec52a27de4324882a286df116d8d1 (patch)
treec093eada8bafcf98accf6553102393349c49ba10
parent6608fc4de927d8a940625d07522f805c47552a21 (diff)
Explain the difference between binaryinstruction and binaryaccinstruction
Developers may add new instructions in wrong place in the future if they don't know the difference between binaryinstruction and binaryaccinstruction.
-rw-r--r--src/gram.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gram.y b/src/gram.y
index ad53a08..58940cb 100644
--- a/src/gram.y
+++ b/src/gram.y
@@ -367,6 +367,8 @@ instrseq: instrseq pragma
;
/* 1.4.1: Instruction groups */
+// binaryinstruction: Source operands cannot be accumulators
+// binaryaccinstruction: Source operands can be accumulators
instruction: unaryinstruction
| binaryinstruction
| binaryaccinstruction
@@ -417,6 +419,7 @@ unaryop: MOV | FRC | RNDU | RNDD | RNDE | RNDZ | NOT | LZD | BFREV | CBIT
| F16TO32 | F32TO16 | FBH | FBL
;
+// Source operands cannot be accumulators
binaryinstruction:
predicate binaryop conditionalmodifier saturate execsize
dst src srcimm instoptions
@@ -454,6 +457,7 @@ binaryinstruction:
binaryop: MUL | MAC | MACH | LINE | SAD2 | SADA2 | DP4 | DPH | DP3 | DP2 | SUBB
;
+// Source operands can be accumulators
binaryaccinstruction:
predicate binaryaccop conditionalmodifier saturate execsize
dst srcacc srcimm instoptions