fixup-out-of-range.s
2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// RUN: not llvm-mc -triple aarch64--none-eabi -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
// RUN: not llvm-mc -triple aarch64-windows -filetype obj < %s -o /dev/null 2>&1 | FileCheck %s
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
adr x0, distant
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldr x0, distant
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup not sufficiently aligned
ldr x0, unaligned
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
b.eq distant
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup not sufficiently aligned
b.eq unaligned
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldr x0, [x1, distant-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup must be 8-byte aligned
ldr x0, [x1, unaligned-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldr w0, [x1, distant-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup must be 4-byte aligned
ldr w0, [x1, unaligned-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldrh w0, [x1, distant-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup must be 2-byte aligned
ldrh w0, [x1, unaligned-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldrb w0, [x1, distant-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
ldr q0, [x1, distant-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup must be 16-byte aligned
ldr q0, [x1, unaligned-.]
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
tbz x0, #1, distant
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup not sufficiently aligned
tbz x0, #1, unaligned
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
b distant
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup not sufficiently aligned
b unaligned
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
movz x0, #:abs_g0:value1
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
movz x0, #:abs_g1:value2
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
movz x0, #:abs_g0_s:value1
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: fixup value out of range
movz x0, #:abs_g1_s:value2
// CHECK: :[[@LINE+1]]:{{[0-9]+}}: error: relocation for a thread-local variable points to an absolute symbol
movz x0, #:tprel_g0:value1
.byte 0
unaligned:
.byte 0
.space 1<<27
.balign 8
distant:
.word 0
value1 = 0x12345678
value2 = 0x123456789