1 @ This test has a partner (ltorg-darwin.s) that contains matching
2 @ tests for the .ltorg on darwin targets. We need separate files
3 @ because the syntax for switching sections and temporary labels differs
4 @ between darwin and linux. Any tests added here should have a matching
7 @RUN: llvm-mc -triple armv7-unknown-linux-gnueabi %s | FileCheck %s
8 @RUN: llvm-mc -triple thumbv5-unknown-linux-gnueabi %s | FileCheck %s
9 @RUN: llvm-mc -triple thumbv7-unknown-linux-gnueabi %s | FileCheck %s
11 @ check that ltorg dumps the constant pool at the current location
12 .section a,"ax",%progbits
16 @ CHECK: ldr r0, .Ltmp[[TMP0:[0-9+]]]
23 @ CHECK: .Ltmp[[TMP0]]
31 @ check that ltorg clears the constant pool after dumping it
32 .section b,"ax",%progbits
36 @ CHECK: ldr r0, .Ltmp[[TMP1:[0-9+]]]
43 @ CHECK: .Ltmp[[TMP1]]
51 @ CHECK: ldr r0, .Ltmp[[TMP2:[0-9+]]]
57 @ CHECK: .Ltmp[[TMP2]]
65 @ check that ltorg does not issue an error if there is no constant pool
66 .section c,"ax",%progbits
75 @ check that ltorg works for labels
76 .section d,"ax",%progbits
82 @ CHECK: ldr r0, .Ltmp[[TMP3:[0-9+]]]
90 @ CHECK: .Ltmp[[TMP3]]
98 @ check that use of ltorg does not prevent dumping non-empty constant pools at end of section
99 .section e,"ax",%progbits
105 @ CHECK: ldr r0, .Ltmp[[TMP4:[0-9+]]]
110 @ CHECK: .Ltmp[[TMP4]]
116 @ CHECK: ldr r0, .Ltmp[[TMP5:[0-9+]]]
118 .section f,"ax",%progbits
124 @ should not have a constant pool at end of section with empty constant pools
125 @ CHECK-NOT: .section a,"ax",%progbits
126 @ CHECK-NOT: .section b,"ax",%progbits
127 @ CHECK-NOT: .section c,"ax",%progbits
128 @ CHECK-NOT: .section d,"ax",%progbits
130 @ should have a non-empty constant pool at end of this section
131 @ CHECK: .section e,"ax",%progbits
134 @ CHECK: .Ltmp[[TMP5]]
137 @ should not have a constant pool at end of section with empty constant pools
138 @ CHECK-NOT: .section f,"ax",%progbits