File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## This contrived .space example previously triggered "invalid number of bytes" error.
2
+ ## https://github.com/llvm/llvm-project/issues/123402
3
+ # RUN: not llvm-mc -filetype=obj -triple=x86_64 %s -o /dev/null 2>&1 | FileCheck %s
4
+
5
+ # CHECK: error: invalid number of bytes
6
+
7
+ .section .p,"ax"
8
+ p_1st:
9
+ 0: pause
10
+ lfence
11
+ jmp 0b
12
+
13
+ .section .q,"ax"
14
+ q_1st:
15
+ addl 11 ,%eax
16
+ addl 22 ,%eax
17
+
18
+ q_cli:
19
+ cli
20
+ 0: pause
21
+ lfence
22
+ jmp 0b
23
+
24
+ .section .p
25
+ .space (q_cli - q_1st) - (. - p_1st), 0xcc
26
+ cli
27
+
28
+ .section .q
29
+ q_sti:
30
+ sti
31
+
32
+ .section .p
33
+ .space (q_sti - q_1st) - (. - p_1st), 0xcc
34
+ sti
35
+ addl 33 ,%eax
36
+ addl 44 ,%eax
37
+ p_nop:
38
+ nop
39
+
40
+ .section .q
41
+ 0: pause
42
+ lfence
43
+ jmp 0b
44
+ .space (p_nop - p_1st) - (. - q_1st), 0xcc
45
+ nop
You can’t perform that action at this time.
0 commit comments