break;
}
- if ((i.flags[j] & Operand_Mem) && !match_mem_size (t, j, j))
+ if ((i.flags[j] & Operand_Mem)
+ && operand_type_check (t->operand_types[j], anymem)
+ && !match_mem_size (t, j, j))
{
match = 0;
break;
|| !match_simd_size (t, j, given)))
return match;
- if ((i.flags[given] & Operand_Mem) && !match_mem_size (t, j, given))
+ if ((i.flags[given] & Operand_Mem)
+ && operand_type_check (t->operand_types[j], anymem)
+ && !match_mem_size (t, j, given))
return match;
}
{
case 1:
if (!operand_type_match (overlap0, i.types[0]))
- continue;
+ {
+ specific_error = progress (i.error);
+ continue;
+ }
/* Allow the ModR/M encoding to be requested by using the {load} or
{store} pseudo prefix on an applicable insn. */
}
run_list_test "string-bad" ""
run_list_test "reg-bad" ""
+run_list_test "inval-type"
run_list_test "space1" "-al"
if {![istarget "i*86-*-elfiamcu"]} then {
run_list_test "xmmword"
--- /dev/null
+.*: Assembler messages:
+.*: Error: operand type mismatch for .bsf.
+.*: Error: operand type mismatch for .bswap.
+.*: Error: operand type mismatch for .bswap.
+.*: Error: operand type mismatch for .movntdqa.
+.*: Error: operand type mismatch for .movntdq.
--- /dev/null
+ .text
+
+# All the following should yield "operand type mismatch" (or something yet more
+# specific), but _not_ "operand size mismatch".
+
+ bsf %eax, (%eax)
+ bswap %mm0
+ bswapl %xmm0
+ movntdqa %xmm0, (%eax)
+ movntdq (%eax), %xmm0
.* Assembler messages:
.*:4: Error: operand size mismatch for `pushp'
.*:5: Error: operand size mismatch for `popp'
-.*:6: Error: operand size mismatch for `pushp'
-.*:7: Error: operand size mismatch for `popp'
+.*:6: Error: operand type mismatch for `pushp'
+.*:7: Error: operand type mismatch for `popp'
.*:8: Error: invalid instruction suffix for `lkgs'
.*:11: Error: invalid instruction suffix for `lkgs'
.*:12: Error: invalid instruction suffix for `lkgs'
-.*:13: Error: invalid instruction suffix for `lkgs'
-.*:14: Error: invalid instruction suffix for `lkgs'
+.*:13: Error: .* for `lkgs'
+.*:14: Error: .* for `lkgs'