File tree Expand file tree Collapse file tree 4 files changed +53
-29
lines changed Expand file tree Collapse file tree 4 files changed +53
-29
lines changed Original file line number Diff line number Diff line change 1- // RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
1+ # RUN: rm -rf %t && split-file %s %t && cd %t
2+ # RUN: llvm-mc -triple=x86_64 a.s | FileCheck %s
23
3- .irp reg,%eax ,%ebx
4- pushl \reg
4+ #--- a.s
5+ # CHECK: pushq %rax
6+ # CHECK-NEXT: pushq %rbx
7+ # CHECK-NEXT: pushq %rcx
8+ .irp reg,%rax ,%rbx
9+ pushq \reg
510.endr
6- pushl %ecx
7-
8- // CHECK: pushl %eax
9- // CHECK: pushl %ebx
10- // CHECK-NEXT: pushl %ecx
11+ pushq %rcx
1112
13+ # CHECK: addl %eax, 4
14+ # CHECK-NEXT: addl %eax, 3
15+ # CHECK-NEXT: addl %eax, 5
16+ # CHECK-NEXT: addl %ebx, 4
17+ # CHECK-NEXT: addl %ebx, 3
18+ # CHECK-NEXT: addl %ebx, 5
19+ # CHECK-EMPTY:
20+ # CHECK-NEXT: nop
1221.irp reg,%eax ,%ebx
1322.irp imm,4 ,3 ,5
1423 addl \reg, \imm
24+ .endr # comment after .endr
25+ .endr ;
26+ nop
27+
28+ # CHECK: xorl %eax, %eax
29+ # CHECK-EMPTY:
30+ # CHECK-NEXT: nop
31+ .irp reg,%eax
32+ xor \reg,\reg
1533.endr
16- .endr
34+ # 99 "a.s"
35+ nop
1736
18- // CHECK: addl %eax, 4
19- // CHECK: addl %eax, 3
20- // CHECK: addl %eax, 5
21- // CHECK: addl %ebx, 4
22- // CHECK: addl %ebx, 3
23- // CHECK: addl %ebx, 5
37+ # RUN: not llvm-mc -triple=x86_64 err1.s 2>&1 | FileCheck %s --check-prefix=ERR1
38+ # ERR1: .s:1:1: error: no matching '.endr' in definition
39+ #--- err1.s
40+ .irp reg,%eax
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- # RUN: llvm-mc -triple x86_64 %s | FileCheck %s
1+ # RUN: rm -rf %t && split-file %s %t && cd %t
2+ # RUN: llvm-mc -triple=x86_64 a.s | FileCheck %s
23
4+ #--- a.s
35.rept 2
46 .long 1
57.endr
2325# CHECK-NEXT: .long 0
2426# CHECK-NEXT: .long 0
2527# CHECK-NEXT: .long 42
28+
29+ # RUN: not llvm-mc -triple=x86_64 err1.s 2>&1 | FileCheck %s --check-prefix=ERR1
30+ # ERR1: .s:1:6: error: unmatched '.endr' directive
31+ #--- err1.s
32+ .endr
33+
34+ # RUN: not llvm-mc -triple=x86_64 err2.s 2>&1 | FileCheck %s --check-prefix=ERR2
35+ # ERR2: .s:1:1: error: no matching '.endr' in definition
36+ #--- err2.s
37+ .rept 3
38+ .long
39+
40+ # RUN: not llvm-mc -triple=x86_64 err3.s 2>&1 | FileCheck %s --check-prefix=ERR3
41+ # ERR3: .s:3:7: error: expected newline
42+ #--- err3.s
43+ .rept 1
44+ .long 0
45+ .endr ab
You can’t perform that action at this time.
0 commit comments