File tree Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Expand file tree Collapse file tree 2 files changed +44
-4
lines changed Original file line number Diff line number Diff line change 1
- # RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2>&1 | FileCheck %s --check-prefix=ASM-ERR
1
+ # RUN: not llvm-mc -triple x86_64-unknown-unknown %s 2>&1 | FileCheck %s --check-prefix=ASM-ERR --implicit-check-not=error:
2
2
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s | llvm-objdump -j .data -s - | FileCheck %s --check-prefix=OBJDATA
3
3
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s | llvm-objdump -j .text -s - | FileCheck %s --check-prefix=OBJTEXT
4
4
.data
5
5
6
6
# OBJDATA: Contents of section .data
7
- # OBJDATA-NEXT: 0000 aa0506ff
7
+ # OBJDATA-NEXT: 0000 aa01aa05 06ff
8
+
9
+ foo1:
10
+ # ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression
11
+ .if . - foo1 == 0
12
+ .byte 0xaa
13
+ .else
14
+ .byte 0x00
15
+ .endif
8
16
9
17
foo2:
10
- # ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression
11
- .if . - foo2 == 0
18
+ .byte 1
19
+ # ASM-ERR: :[[#@LINE+1]]:5: error: expected absolute expression
20
+ .if foo2 - . == -1
12
21
.byte 0xaa
13
22
.else
14
23
.byte 0x00
Original file line number Diff line number Diff line change
1
+ # RUN: not llvm-mc -filetype=obj -triple=riscv64 -mattr=-relax %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:
2
+ # RUN: not llvm-mc -filetype=obj -triple=riscv64 -mattr=+relax %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR --implicit-check-not=error:
3
+
4
+ a:
5
+ nop
6
+ b:
7
+ call foo@plt
8
+ c:
9
+ nop
10
+ d:
11
+
12
+ .data
13
+ ## Positive subsection numbers
14
+ .subsection c-b
15
+ .subsection d-b
16
+ .subsection c-a
17
+
18
+ .subsection b-a
19
+ .subsection d-c
20
+
21
+ ## Negative subsection numbers
22
+ # ERR: :[[#@LINE+1]]:14: error: subsection number -8 is not within [0,2147483647]
23
+ .subsection b-c
24
+ # ERR: :[[#@LINE+1]]:14: error: subsection number -12 is not within [0,2147483647]
25
+ .subsection b-d
26
+ # ERR: :[[#@LINE+1]]:14: error: subsection number -12 is not within [0,2147483647]
27
+ .subsection a-c
28
+ # ERR: :[[#@LINE+1]]:14: error: subsection number -4 is not within [0,2147483647]
29
+ .subsection a-b
30
+ # ERR: :[[#@LINE+1]]:14: error: subsection number -4 is not within [0,2147483647]
31
+ .subsection c-d
You can’t perform that action at this time.
0 commit comments