1 // RUN
: not llvm-mc
-triple armv7-apple-darwin
-filetype
=obj
%s
2>&1 | FileCheck
%s
3 // Check that the relocation size is valid.
4 // Check lower bound of edge case.
6 // CHECK-
NOT: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
7 b _foo1_valid+
0x2000004
8 // Check outside of range of the largest accepted positive number
10 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
13 // Check Same as above
, for smallest negative value
15 // CHECK-
NOT: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
16 b _foo2_valid-
0x1FFFFF8
18 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
21 // Edge case
- subtracting positive number
23 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
26 // Edge case
- adding negative number
28 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
32 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
36 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
39 // blx instruction is aligned to
16-bits.
41 // CHECK-
NOT:[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
42 blx _foo7_blx+
0x1FFFFFE
44 // Other branch instructions require
32-bit alignment.
46 // CHECK
:[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
47 bl _foo7_blx+
0x1FFFFFE
50 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
54 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation out of range
57 // Check that the relocation alignment is valid.
58 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
60 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
62 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
64 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned
66 // CHECK
: :[[@LINE+
1]]:{{[0-9]+}}: error
: Relocation
not aligned