diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-i386.c | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intelbad.l | 24 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intelbad.s | 36 |
3 files changed, 65 insertions, 9 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index f54e7fd..5a88d25 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -2192,7 +2192,7 @@ operand_type_match (i386_operand_type overlap, /* If given types g0 and g1 are registers they must be of the same type unless the expected operand type register overlap is null. - Some Intel syntax memory operand size checking also happens here. */ + Intel syntax sized memory operands are also checked here. */ static INLINE int operand_type_register_match (i386_operand_type g0, @@ -2202,18 +2202,14 @@ operand_type_register_match (i386_operand_type g0, { if (g0.bitfield.class != Reg && g0.bitfield.class != RegSIMD - && (!operand_type_check (g0, anymem) - || g0.bitfield.unspecified - || (t0.bitfield.class != Reg - && t0.bitfield.class != RegSIMD))) + && (g0.bitfield.unspecified + || !operand_type_check (g0, anymem))) return 1; if (g1.bitfield.class != Reg && g1.bitfield.class != RegSIMD - && (!operand_type_check (g1, anymem) - || g1.bitfield.unspecified - || (t1.bitfield.class != Reg - && t1.bitfield.class != RegSIMD))) + && (g1.bitfield.unspecified + || !operand_type_check (g1, anymem))) return 1; if (g0.bitfield.byte == g1.bitfield.byte diff --git a/gas/testsuite/gas/i386/intelbad.l b/gas/testsuite/gas/i386/intelbad.l index c81d283..8f6341d 100644 --- a/gas/testsuite/gas/i386/intelbad.l +++ b/gas/testsuite/gas/i386/intelbad.l @@ -169,3 +169,27 @@ .*:192: Error: .* .*:193: Error: .* .*:194: Error: .* +.*:196: Error: .* +.*:197: Error: .* +.*:199: Error: .* +.*:200: Error: .* +.*:202: Error: .* +.*:203: Error: .* +.*:205: Error: .* +.*:206: Error: .* +.*:208: Error: .* +.*:209: Error: .* +.*:211: Error: .* +.*:212: Error: .* +.*:214: Error: .* +.*:215: Error: .* +.*:217: Error: .* +.*:218: Error: .* +.*:220: Error: .* +.*:221: Error: .* +.*:223: Error: .* +.*:224: Error: .* +.*:226: Error: .* +.*:227: Error: .* +.*:229: Error: .* +.*:230: Error: .* diff --git a/gas/testsuite/gas/i386/intelbad.s b/gas/testsuite/gas/i386/intelbad.s index fd8c9ca..7737557 100644 --- a/gas/testsuite/gas/i386/intelbad.s +++ b/gas/testsuite/gas/i386/intelbad.s @@ -192,3 +192,39 @@ start: lsl ax, eax lsl eax, dword ptr [eax] lsl ax, dword ptr [eax] + + mov eax, word ptr [eax] + mov eax, qword ptr [eax] + + mov eax, word ptr [0x12345678] + mov eax, qword ptr [0x12345678] + + xchg eax, word ptr [eax] + xchg eax, qword ptr [eax] + + add eax, word ptr [eax] + add eax, qword ptr [eax] + + test eax, word ptr [eax] + test eax, qword ptr [eax] + + test word ptr [eax], eax + test qword ptr [eax], eax + + movnti word ptr [eax], eax + movnti qword ptr [eax], eax + + movbe eax, word ptr [eax] + movbe eax, qword ptr [eax] + + vmovntdq xmmword ptr [eax], ymm0 + vmovntdq zmmword ptr [eax], ymm0 + + vmovntdqa ymm0, xmmword ptr [eax] + vmovntdqa ymm0, zmmword ptr [eax] + + movdiri word ptr [eax], eax + movdiri qword ptr [eax], eax + + aadd word ptr [eax], eax + aadd qword ptr [eax], eax |