61 lines · plain
1// RUN: not llvm-mc -triple i686-unknown-unknown %s -o /dev/null 2>&1 | FileCheck %s2 3.intel_syntax4 5// Basic case of ambiguity for inc.6 7inc [eax]8// CHECK: error: ambiguous operand size for instruction 'inc'9inc dword ptr [eax]10inc word ptr [eax]11inc byte ptr [eax]12// CHECK-NOT: error:13 14// Other ambiguous instructions. Anything that doesn't take a register,15// basically.16 17dec [eax]18// CHECK: error: ambiguous operand size for instruction 'dec'19mov [eax], 120// CHECK: error: ambiguous operand size for instruction 'mov'21and [eax], 022// CHECK: error: ambiguous operand size for instruction 'and'23or [eax], 124// CHECK: error: ambiguous operand size for instruction 'or'25add [eax], 126// CHECK: error: ambiguous operand size for instruction 'add'27sub [eax], 128// CHECK: error: ambiguous operand size for instruction 'sub'29 30// gas assumes these instructions are pointer-sized by default, and we follow31// suit.32push [eax]33pop [eax]34call [eax]35jmp [eax]36// CHECK-NOT: error:37 38add byte ptr [eax], eax39// CHECK: error: invalid operand for instruction40 41add byte ptr [eax], eax42// CHECK: error: invalid operand for instruction43 44add rax, 345// CHECK: error: register %rax is only available in 64-bit mode46 47fadd "?half@?0??bar@@YAXXZ@4NA"48// CHECK: error: ambiguous operand size for instruction 'fadd'49 50// Instruction line with PTR inside check that they don't accept register as memory.51 52// CHECK: error: expected memory operand after 'ptr', found register operand instead53// CHECK: andps xmm1, xmmword ptr xmm154andps xmm1, xmmword ptr xmm155// CHECK: error: expected memory operand after 'ptr', found register operand instead56// CHECK: andps xmmword ptr xmm1, xmm157andps xmmword ptr xmm1, xmm158// CHECK: error: expected memory operand after 'ptr', found register operand instead59// CHECK: mov dword ptr eax, ebx60mov dword ptr eax, ebx61