about summary refs log tree commit diff stats
path: root/subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-07-30 20:33:38 -0700
committerKartik Agaram <vc@akkartik.com>2018-07-30 20:33:38 -0700
commitd9824a1b9431829e9fcbf381c0add5366749ff9c (patch)
tree64c2ada58cc8d77fe10c73e34e3ec6a6880dec68 /subx
parent219d05fa00046da7333c1199e838fea34edb9ef3 (diff)
downloadmu-d9824a1b9431829e9fcbf381c0add5366749ff9c.tar.gz
4464
ModR/M instructions actually can't contain disp16.
Diffstat (limited to 'subx')
-rw-r--r--subx/022check_instruction.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/subx/022check_instruction.cc b/subx/022check_instruction.cc
index 388cd430..1e0bf7de 100644
--- a/subx/022check_instruction.cc
+++ b/subx/022check_instruction.cc
@@ -437,7 +437,7 @@ void compare_bitvector_modrm(const line& inst, uint8_t expected, const word& op)
   for (int i = 0;  i < NUM_OPERAND_TYPES;  ++i, bitvector >>= 1, expected >>= 1) {
 //?     cerr << "comparing for modrm " << HEXBYTE << NUM(bitvector) << " with " << NUM(expected) << '\n';
     if ((bitvector & 0x1) == (expected & 0x1)) continue;  // all good with this operand
-    if (i == DISP8 || i == DISP16 || i == DISP32) continue;  // exception 2
+    if (i == DISP8 || i == DISP32) continue;  // exception 2
     const string& optype = Operand_type_name.at(i);
     if ((bitvector & 0x1) > (expected & 0x1))
       raise << "'" << to_string(inst) << "'" << maybe_name(op) << ": unexpected " << optype << " operand\n" << end();