1 @ This test has a partner (ltorg.s) that contains matching
2 @ tests for the .ltorg on linux 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-apple-darwin %s | FileCheck %s
8 @RUN: llvm-mc -triple thumbv5-apple-darwin %s | FileCheck %s
9 @RUN: llvm-mc -triple thumbv7-apple-darwin %s | FileCheck %s
11 @ check that ltorg dumps the constant pool at the current location
12 .section __TEXT,a,regular,pure_instructions
16 @ CHECK: ldr r0, Ltmp0
26 @ CHECK: .end_data_region
33 @ check that ltorg clears the constant pool after dumping it
34 .section __TEXT,b,regular,pure_instructions
38 @ CHECK: ldr r0, Ltmp1
48 @ CHECK: .end_data_region
55 @ CHECK: ldr r0, Ltmp2
64 @ CHECK: .end_data_region
71 @ check that ltorg does not issue an error if there is no constant pool
72 .section __TEXT,c,regular,pure_instructions
81 @ check that ltorg works for labels
82 .section __TEXT,d,regular,pure_instructions
88 @ CHECK: ldr r0, Ltmp3
99 @ CHECK: .end_data_region
106 @ check that use of ltorg does not prevent dumping non-empty constant pools at end of section
107 .section __TEXT,e,regular,pure_instructions
113 @ CHECK: ldr r0, Ltmp4
117 @ CHECK: .data_region
119 @ CHECK-LABEL: Ltmp4:
121 @ CHECK: .end_data_region
127 @ CHECK: ldr r0, Ltmp5
129 .section __TEXT,f,regular,pure_instructions
135 @ should not have a constant pool at end of section with empty constant pools
136 @ CHECK-NOT: .section __TEXT,a,regular,pure_instructions
137 @ CHECK-NOT: .section __TEXT,b,regular,pure_instructions
138 @ CHECK-NOT: .section __TEXT,c,regular,pure_instructions
139 @ CHECK-NOT: .section __TEXT,d,regular,pure_instructions
141 @ should have a non-empty constant pool at end of this section
142 @ CHECK: .section __TEXT,e,regular,pure_instructions
144 @ CHECK: .data_region
146 @ CHECK-LABEL: Ltmp5:
148 @ CHECK: .end_data_region
150 @ should not have a constant pool at end of section with empty constant pools
151 @ CHECK-NOT: .section __TEXT,f,regular,pure_instructions