2010-08-12 00:55:42 +00:00
|
|
|
// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t.err
|
2011-07-27 23:22:03 +00:00
|
|
|
// RUN: FileCheck --check-prefix=64 < %t.err %s
|
2010-08-12 00:55:42 +00:00
|
|
|
|
2011-07-27 23:22:03 +00:00
|
|
|
// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t.err
|
|
|
|
// RUN: FileCheck --check-prefix=32 < %t.err %s
|
|
|
|
// rdar://8204588
|
|
|
|
|
|
|
|
// 64: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
|
2010-08-12 00:55:42 +00:00
|
|
|
cmp $0, 0(%eax)
|
2011-07-27 23:22:03 +00:00
|
|
|
|
|
|
|
// 32: error: register %rax is only available in 64-bit mode
|
|
|
|
addl $0, 0(%rax)
|
2011-10-12 21:38:39 +00:00
|
|
|
|
|
|
|
// 32: test.s:8:2: error: invalid instruction mnemonic 'movi'
|
|
|
|
|
|
|
|
# 8 "test.s"
|
|
|
|
movi $8,%eax
|
2011-10-16 04:47:35 +00:00
|
|
|
|
|
|
|
movl 0(%rax), 0(%edx) // error: invalid operand for instruction
|
|
|
|
|
2012-11-14 18:04:47 +00:00
|
|
|
// 32: error: instruction requires: 64-bit mode
|
2011-10-27 17:40:41 +00:00
|
|
|
sysexitq
|
2012-03-09 22:24:10 +00:00
|
|
|
|
|
|
|
// rdar://10710167
|
|
|
|
// 64: error: expected scale expression
|
|
|
|
lea (%rsp, %rbp, $4), %rax
|
2012-03-12 21:32:09 +00:00
|
|
|
|
|
|
|
// rdar://10423777
|
2014-01-08 12:58:28 +00:00
|
|
|
// 64: error: base register is 64-bit, but index register is not
|
2012-03-12 21:32:09 +00:00
|
|
|
movq (%rsi,%ecx),%xmm0
|
2013-05-10 18:24:17 +00:00
|
|
|
|
2014-01-08 12:58:28 +00:00
|
|
|
// 64: error: invalid 16-bit base register
|
|
|
|
movl %eax,(%bp,%si)
|
|
|
|
|
|
|
|
// 32: error: scale factor in 16-bit address must be 1
|
|
|
|
movl %eax,(%bp,%si,2)
|
|
|
|
|
|
|
|
// 32: error: invalid 16-bit base register
|
|
|
|
movl %eax,(%cx)
|
|
|
|
|
|
|
|
// 32: error: invalid 16-bit base/index register combination
|
|
|
|
movl %eax,(%bp,%bx)
|
|
|
|
|
|
|
|
// 32: error: 16-bit memory operand may not include only index register
|
|
|
|
movl %eax,(,%bx)
|
|
|
|
|
2013-05-10 18:24:17 +00:00
|
|
|
// 32: error: invalid operand for instruction
|
|
|
|
outb al, 4
|
2014-07-31 23:03:22 +00:00
|
|
|
|
|
|
|
// 32: error: invalid segment register
|
|
|
|
// 64: error: invalid segment register
|
|
|
|
movl %eax:0x00, %ebx
|
2015-01-21 06:07:53 +00:00
|
|
|
|
|
|
|
// 32: error: invalid operand for instruction
|
|
|
|
// 64: error: invalid operand for instruction
|
|
|
|
cmpps $-129, %xmm0, %xmm0
|
|
|
|
|
|
|
|
// 32: error: invalid operand for instruction
|
|
|
|
// 64: error: invalid operand for instruction
|
|
|
|
cmppd $256, %xmm0, %xmm0
|