summaryrefslogtreecommitdiff
path: root/assemble.c
diff options
context:
space:
mode:
authorBen Rudiak-Gould <benrudiak@gmail.com>2013-02-27 10:13:14 -0800
committerCyrill Gorcunov <gorcunov@gmail.com>2013-03-04 00:46:16 +0400
commit6e87893f068f59929cb2d6dcc50ac1a1da2f602c (patch)
tree118cfec7a0d82720ab368ed025f12bdf66de6f67 /assemble.c
parentd1ac29a3cc513642a8d42ddf964b903f5e1508d4 (diff)
downloadnasm-6e87893f068f59929cb2d6dcc50ac1a1da2f602c.tar.gz
nasm-6e87893f068f59929cb2d6dcc50ac1a1da2f602c.tar.bz2
nasm-6e87893f068f59929cb2d6dcc50ac1a1da2f602c.zip
Drop SAME_AS flag from instruction matcher
It was there to support the SSE5 DREX encoding, which as far as I know is dead forever. Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'assemble.c')
-rw-r--r--assemble.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/assemble.c b/assemble.c
index 6e230ea..be3caaf 100644
--- a/assemble.c
+++ b/assemble.c
@@ -1810,10 +1810,8 @@ static enum match_result find_match(const struct itemplate **tempp,
/*
* Missing operand size and a candidate for fuzzy matching...
*/
- for (i = 0; i < temp->operands; i++) {
- if ((temp->opd[i] & SAME_AS) == 0)
- xsizeflags[i] |= temp->opd[i] & SIZE_MASK;
- }
+ for (i = 0; i < temp->operands; i++)
+ xsizeflags[i] |= temp->opd[i] & SIZE_MASK;
opsizemissing = true;
}
if (m > merr)
@@ -1958,13 +1956,7 @@ static enum match_result matches(const struct itemplate *itemp,
* guess it either from template (IF_S* flag) or
* from code bits.
*
- * 2) If template operand (i) has SAME_AS flag [used for registers only]
- * (ie the same operand as was specified somewhere in template, and
- * this referred operand index is being achieved via ~SAME_AS)
- * we are to be sure that both registers (in template and instruction)
- * do exactly match.
- *
- * 3) If template operand do not match the instruction OR
+ * 2) If template operand do not match the instruction OR
* template has an operand size specified AND this size differ
* from which instruction has (perhaps we got it from code bits)
* we are:
@@ -1980,12 +1972,7 @@ static enum match_result matches(const struct itemplate *itemp,
if (!(type & SIZE_MASK))
type |= size[i];
- if (itemp->opd[i] & SAME_AS) {
- int j = itemp->opd[i] & ~SAME_AS;
- if (type != instruction->oprs[j].type ||
- instruction->oprs[i].basereg != instruction->oprs[j].basereg)
- return MERR_INVALOP;
- } else if (itemp->opd[i] & ~type & ~SIZE_MASK) {
+ if (itemp->opd[i] & ~type & ~SIZE_MASK) {
return MERR_INVALOP;
} else if ((itemp->opd[i] & SIZE_MASK) &&
(itemp->opd[i] & SIZE_MASK) != (type & SIZE_MASK)) {