brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.5 KiB · 543575f Raw
204 lines · plain
1// RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2> %t.err2// RUN: FileCheck --check-prefix=X64 < %t.err %s3 4// RUN: not llvm-mc -triple i386-unknown-unknown %s 2> %t.err5// RUN: FileCheck --check-prefix=X86 < %t.err %s6// rdar://82045887 8// X64: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')9cmp $0, 0(%eax)10 11// X86: error: register %rax is only available in 64-bit mode12addl $0, 0(%rax)13 14// X86: test.s:8:2: error: invalid instruction mnemonic 'movi'15 16# 8 "test.s"17 movi $8,%eax18 19movl 0(%rax), 0(%edx)  // error: invalid operand for instruction20 21// X86: error: instruction requires: 64-bit mode22sysexitq23 24// rdar://1071016725// X64: error: expected scale expression26lea (%rsp, %rbp, $4), %rax27 28// rdar://1042377729// X64: error: base register is 64-bit, but index register is not30movq (%rsi,%ecx),%xmm031 32// X64: error: invalid 16-bit base register33movl %eax,(%bp,%si)34 35// X86: error: scale factor in 16-bit address must be 136movl %eax,(%bp,%si,2)37 38// X86: error: invalid 16-bit base register39movl %eax,(%cx)40 41// X86: error: invalid 16-bit base/index register combination42movl %eax,(%bp,%bx)43 44// X86: error: 16-bit memory operand may not include only index register45movl %eax,(,%bx)46 47// X86: error: invalid operand for instruction48outb al, 449 50// X86: error: invalid segment register51// X64: error: invalid segment register52movl %eax:0x00, %ebx53 54// X86: error: invalid operand for instruction55// X64: error: invalid operand for instruction56cmpps $-129, %xmm0, %xmm057 58// X86: error: invalid operand for instruction59// X64: error: invalid operand for instruction60cmppd $256, %xmm0, %xmm061 62// X86: error: instruction requires: 64-bit mode63jrcxz 164 65// X64: error: instruction requires: Not 64-bit mode66jcxz 167 68// X86: error: register %cr8 is only available in 64-bit mode69movl %edx, %cr870 71// X86: error: register %dr8 is only available in 64-bit mode72movl %edx, %dr873 74// X86: error: register %rip is only available in 64-bit mode75// X64: error: %rip can only be used as a base register76mov %rip, %rax77 78// X86: error: register %rax is only available in 64-bit mode79// X64: error: %rip is not allowed as an index register80mov (%rax,%rip), %rbx81 82// X86: error: instruction requires: 64-bit mode83ljmpq *(%eax)84 85// X86: error: register %rax is only available in 64-bit mode86// X64: error: invalid base+index expression87leaq (%rax,%rsp), %rax88 89// X86: error: invalid base+index expression90// X64: error: invalid base+index expression91leaq (%eax,%esp), %eax92 93// X86: error: invalid 16-bit base/index register combination94// X64: error: invalid 16-bit base register95lea (%si,%bp), %ax96// X86: error: invalid 16-bit base/index register combination97// X64: error: invalid 16-bit base register98lea (%di,%bp), %ax99// X86: error: invalid 16-bit base/index register combination100// X64: error: invalid 16-bit base register101lea (%si,%bx), %ax102// X86: error: invalid 16-bit base/index register combination103// X64: error: invalid 16-bit base register104lea (%di,%bx), %ax105 106// X86: error: invalid base+index expression107// X64: error: invalid base+index expression108mov (,%eip), %rbx109 110// X86: error: invalid base+index expression111// X64: error: invalid base+index expression112mov (%eip,%eax), %rbx113 114// X86: error: register %rax is only available in 64-bit mode115// X64: error: base register is 64-bit, but index register is not116mov (%rax,%eiz), %ebx117 118// X86: error: register %riz is only available in 64-bit mode119// X64: error: base register is 32-bit, but index register is not120mov (%eax,%riz), %ebx121 122 123// Parse errors from assembler parsing. 124 125v_ecx = %ecx126v_eax = %eax127v_gs  = %gs128v_imm = 4129$test = %ebx130 131// X86: 7: error: expected register here132// X64: 7: error: expected register here133mov 4(4), %eax	134 135// X86: 7: error: expected register here136// X64: 7: error: expected register here137mov 5(v_imm), %eax		138	139// X86: 7: error: invalid register name140// X64: 7: error: invalid register name141mov 6(%v_imm), %eax		142	143// X86: 8: warning: scale factor without index register is ignored144// X64: 8: warning: scale factor without index register is ignored145mov 7(,v_imm), %eax		146 147// X64: 6: error: expected immediate expression148mov $%eax, %ecx149 150// X86: 6: error: expected immediate expression151// X64: 6: error: expected immediate expression152mov $v_eax, %ecx153 154// X86: error: unexpected token in argument list155// X64: error: unexpected token in argument list156mov v_ecx(%eax), %ecx	157 158// X86: 7: error: invalid operand for instruction159// X64: 7: error: invalid operand for instruction160addb (%dx), %al161 162// X86: error: instruction requires: 64-bit mode163cqto164 165// X86: error: instruction requires: 64-bit mode166cltq167 168// X86: error: instruction requires: 64-bit mode169cmpxchg16b (%eax)170 171// X86: error: unsupported instruction172// X64: error: unsupported instruction173{rex} vmovdqu32 %xmm0, %xmm0174 175// X86: error: unsupported instruction176// X64: error: unsupported instruction177{rex2} vmovdqu32 %xmm0, %xmm0178 179// X86: error: unsupported instruction180// X64: error: unsupported instruction181{vex} vmovdqu32 %xmm0, %xmm0182 183// X86: error: unsupported instruction184// X64: error: unsupported instruction185{vex2} vmovdqu32 %xmm0, %xmm0186 187// X86: error: unsupported instruction188// X64: error: unsupported instruction189{vex3} vmovdqu32 %xmm0, %xmm0190 191// X86: error: unsupported instruction192// X64: error: unsupported instruction193{evex} vmovdqu %xmm0, %xmm0194 195// X86: 12: error: immediate must be an integer in range [0, 15]196// X64: 12: error: immediate must be an integer in range [0, 15]197vpermil2pd $16, %xmm3, %xmm5, %xmm1, %xmm2198 199// X86: error: instruction requires: 64-bit mode200pbndkb201 202// X86: error: register %r16d is only available in 64-bit mode203movl %eax, %r16d204