blob: 054331ad81ba008e3ac1df792989c5952a57ca87 [file] [log] [blame]
Daniel Dunbar7d7b4d12010-08-12 00:55:42 +00001// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t.err
Evan Chengeda1d4f2011-07-27 23:22:03 +00002// RUN: FileCheck --check-prefix=64 < %t.err %s
Daniel Dunbar7d7b4d12010-08-12 00:55:42 +00003
Evan Chengeda1d4f2011-07-27 23:22:03 +00004// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t.err
5// RUN: FileCheck --check-prefix=32 < %t.err %s
6// rdar://8204588
7
8// 64: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
Daniel Dunbar7d7b4d12010-08-12 00:55:42 +00009cmp $0, 0(%eax)
Evan Chengeda1d4f2011-07-27 23:22:03 +000010
11// 32: error: register %rax is only available in 64-bit mode
12addl $0, 0(%rax)
Kevin Enderbye7c0c492011-10-12 21:38:39 +000013
14// 32: test.s:8:2: error: invalid instruction mnemonic 'movi'
15
16# 8 "test.s"
17 movi $8,%eax
Chris Lattnera3a06812011-10-16 04:47:35 +000018
19movl 0(%rax), 0(%edx) // error: invalid operand for instruction
20