summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-08-28 19:15:23 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2013-08-29 10:03:02 +0400
commite3a06b9d0a12a7a9ac9143d631717223097849b7 (patch)
tree61bde6ad906fd7695f54fda49fc82add5650d5ff /parser.c
parentfe0ee08586f9cb31e8bc52200818a5bbb9d4c149 (diff)
downloadnasm-e3a06b9d0a12a7a9ac9143d631717223097849b7.tar.gz
nasm-e3a06b9d0a12a7a9ac9143d631717223097849b7.tar.bz2
nasm-e3a06b9d0a12a7a9ac9143d631717223097849b7.zip
AVX-512: Remember the position of operand with broadcast or embedded rounding
It was not so straight forward to find the postion of operand that has a broadcasting, embedded rounding mode or SAE (Suppress All Exceptions) decorator out from operands types or bytecode. Remebering the postion of the operand of interest in the parser reduces the burden that assembler looks through the operands. Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index 585abe2..1b08657 100644
--- a/parser.c
+++ b/parser.c
@@ -262,6 +262,8 @@ restart_parse:
result->label = NULL; /* Assume no label */
result->eops = NULL; /* must do this, whatever happens */
result->operands = 0; /* must initialize this */
+ result->evex_rm = 0; /* Ensure EVEX rounding mode is reset */
+ result->evex_brerop = -1; /* Reset EVEX broadcasting/ER op position */
/* Ignore blank lines */
if (i == TOKEN_EOS) {
@@ -1034,6 +1036,10 @@ is_expression:
"register size specification ignored");
}
}
+
+ /* remember the position of operand having broadcasting/ER mode */
+ if (result->oprs[operand].decoflags & (BRDCAST_MASK | ER | SAE))
+ result->evex_brerop = operand;
}
result->operands = operand; /* set operand count */