Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / arm-attributes.s
blob4249dac26f46506da3efae6f7c209db3e54dc5ff
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %S/Inputs/arm-attributes1.s -o %t1.o
3 // RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t2.o
5 // RUN: ld.lld %t1.o %t2.o -o %t
6 // RUN: llvm-readobj --arch-specific %t | FileCheck %s
7 // RUN: ld.lld %t1.o %t2.o -shared -o %t2
8 // RUN: llvm-readobj --arch-specific %t2 | FileCheck %s
9 // RUN: ld.lld %t1.o %t2.o -r -o %t3
10 // RUN: llvm-readobj --arch-specific %t3 | FileCheck %s
12 // Check that we retain only 1 SHT_ARM_ATTRIBUTES section. At present we do not
13 // try and merge or use the contents of SHT_ARM_ATTRIBUTES sections. We just
14 // pass the first one through.
15 .text
16 .syntax unified
17 .eabi_attribute 67, "2.09" @ Tag_conformance
18 .cpu cortex-a8
19 .eabi_attribute 6, 10 @ Tag_CPU_arch
20 .eabi_attribute 7, 65 @ Tag_CPU_arch_profile
21 .eabi_attribute 8, 1 @ Tag_ARM_ISA_use
22 .eabi_attribute 9, 2 @ Tag_THUMB_ISA_use
23 .fpu neon
24 .eabi_attribute 15, 1 @ Tag_ABI_PCS_RW_data
25 .eabi_attribute 16, 1 @ Tag_ABI_PCS_RO_data
26 .eabi_attribute 17, 2 @ Tag_ABI_PCS_GOT_use
27 .eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
28 .eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
29 .eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
30 .eabi_attribute 34, 1 @ Tag_CPU_unaligned_access
31 .eabi_attribute 24, 1 @ Tag_ABI_align_needed
32 .eabi_attribute 25, 1 @ Tag_ABI_align_preserved
33 .eabi_attribute 38, 1 @ Tag_ABI_FP_16bit_format
34 .eabi_attribute 18, 4 @ Tag_ABI_PCS_wchar_t
35 .eabi_attribute 26, 2 @ Tag_ABI_enum_size
36 .eabi_attribute 14, 0 @ Tag_ABI_PCS_R9_use
37 .eabi_attribute 68, 1 @ Tag_Virtualization_use
38 .globl _start
39 .p2align 2
40 .type _start,%function
41 _start:
42 .globl func
43 bl func
44 bx lr
46 // CHECK: BuildAttributes {
47 // CHECK-NEXT: FormatVersion: 0x41
48 // CHECK-NEXT: Section 1 {
49 // CHECK-NEXT: SectionLength: 72
50 // CHECK-NEXT: Vendor: aeabi
51 // CHECK-NEXT: Tag: Tag_File (0x1)
52 // CHECK-NEXT: Size: 62
53 // CHECK-NEXT: FileAttributes {
54 // CHECK-NEXT: Attribute {
55 // CHECK-NEXT: Tag: 67
56 // CHECK-NEXT: TagName: conformance
57 // CHECK-NEXT: Value: 2.09
58 // CHECK-NEXT: }
59 // CHECK-NEXT: Attribute {
60 // CHECK-NEXT: Tag: 5
61 // CHECK-NEXT: TagName: CPU_name
62 // CHECK-NEXT: Value: cortex-a8
63 // CHECK-NEXT: }
64 // CHECK-NEXT: Attribute {
65 // CHECK-NEXT: Tag: 6
66 // CHECK-NEXT: Value: 10
67 // CHECK-NEXT: TagName: CPU_arch
68 // CHECK-NEXT: Description: ARM v7
69 // CHECK-NEXT: }
70 // CHECK-NEXT: Attribute {
71 // CHECK-NEXT: Tag: 7
72 // CHECK-NEXT: Value: 65
73 // CHECK-NEXT: TagName: CPU_arch_profile
74 // CHECK-NEXT: Description: Application
75 // CHECK-NEXT: }
76 // CHECK-NEXT: Attribute {
77 // CHECK-NEXT: Tag: 8
78 // CHECK-NEXT: Value: 1
79 // CHECK-NEXT: TagName: ARM_ISA_use
80 // CHECK-NEXT: Description: Permitted
81 // CHECK-NEXT: }
82 // CHECK-NEXT: Attribute {
83 // CHECK-NEXT: Tag: 9
84 // CHECK-NEXT: Value: 2
85 // CHECK-NEXT: TagName: THUMB_ISA_use
86 // CHECK-NEXT: Description: Thumb-2
87 // CHECK-NEXT: }
88 // CHECK-NEXT: Attribute {
89 // CHECK-NEXT: Tag: 10
90 // CHECK-NEXT: Value: 3
91 // CHECK-NEXT: TagName: FP_arch
92 // CHECK-NEXT: Description: VFPv3
93 // CHECK-NEXT: }
94 // CHECK-NEXT: Attribute {
95 // CHECK-NEXT: Tag: 12
96 // CHECK-NEXT: Value: 1
97 // CHECK-NEXT: TagName: Advanced_SIMD_arch
98 // CHECK-NEXT: Description: NEONv1
99 // CHECK-NEXT: }
100 // CHECK-NEXT: Attribute {
101 // CHECK-NEXT: Tag: 14
102 // CHECK-NEXT: Value: 0
103 // CHECK-NEXT: TagName: ABI_PCS_R9_use
104 // CHECK-NEXT: Description: v6
105 // CHECK-NEXT: }
106 // CHECK-NEXT: Attribute {
107 // CHECK-NEXT: Tag: 15
108 // CHECK-NEXT: Value: 1
109 // CHECK-NEXT: TagName: ABI_PCS_RW_data
110 // CHECK-NEXT: Description: PC-relative
111 // CHECK-NEXT: }
112 // CHECK-NEXT: Attribute {
113 // CHECK-NEXT: Tag: 16
114 // CHECK-NEXT: Value: 1
115 // CHECK-NEXT: TagName: ABI_PCS_RO_data
116 // CHECK-NEXT: Description: PC-relative
117 // CHECK-NEXT: }
118 // CHECK-NEXT: Attribute {
119 // CHECK-NEXT: Tag: 17
120 // CHECK-NEXT: Value: 2
121 // CHECK-NEXT: TagName: ABI_PCS_GOT_use
122 // CHECK-NEXT: Description: GOT-Indirect
123 // CHECK-NEXT: }
124 // CHECK-NEXT: Attribute {
125 // CHECK-NEXT: Tag: 18
126 // CHECK-NEXT: Value: 4
127 // CHECK-NEXT: TagName: ABI_PCS_wchar_t
128 // CHECK-NEXT: Description: 4-byte
129 // CHECK-NEXT: }
130 // CHECK-NEXT: Attribute {
131 // CHECK-NEXT: Tag: 20
132 // CHECK-NEXT: Value: 1
133 // CHECK-NEXT: TagName: ABI_FP_denormal
134 // CHECK-NEXT: Description: IEEE-754
135 // CHECK-NEXT: }
136 // CHECK-NEXT: Attribute {
137 // CHECK-NEXT: Tag: 21
138 // CHECK-NEXT: Value: 1
139 // CHECK-NEXT: TagName: ABI_FP_exceptions
140 // CHECK-NEXT: Description: IEEE-754
141 // CHECK-NEXT: }
142 // CHECK-NEXT: Attribute {
143 // CHECK-NEXT: Tag: 23
144 // CHECK-NEXT: Value: 3
145 // CHECK-NEXT: TagName: ABI_FP_number_model
146 // CHECK-NEXT: Description: IEEE-754
147 // CHECK-NEXT: }
148 // CHECK-NEXT: Attribute {
149 // CHECK-NEXT: Tag: 24
150 // CHECK-NEXT: Value: 1
151 // CHECK-NEXT: TagName: ABI_align_needed
152 // CHECK-NEXT: Description: 8-byte alignment
153 // CHECK-NEXT: }
154 // CHECK-NEXT: Attribute {
155 // CHECK-NEXT: Tag: 25
156 // CHECK-NEXT: Value: 1
157 // CHECK-NEXT: TagName: ABI_align_preserved
158 // CHECK-NEXT: Description: 8-byte data alignment
159 // CHECK-NEXT: }
160 // CHECK-NEXT: Attribute {
161 // CHECK-NEXT: Tag: 26
162 // CHECK-NEXT: Value: 2
163 // CHECK-NEXT: TagName: ABI_enum_size
164 // CHECK-NEXT: Description: Int32
165 // CHECK-NEXT: }
166 // CHECK-NEXT: Attribute {
167 // CHECK-NEXT: Tag: 34
168 // CHECK-NEXT: Value: 1
169 // CHECK-NEXT: TagName: CPU_unaligned_access
170 // CHECK-NEXT: Description: v6-style
171 // CHECK-NEXT: }
172 // CHECK-NEXT: Attribute {
173 // CHECK-NEXT: Tag: 38
174 // CHECK-NEXT: Value: 1
175 // CHECK-NEXT: TagName: ABI_FP_16bit_format
176 // CHECK-NEXT: Description: IEEE-754
177 // CHECK-NEXT: }
178 // CHECK-NEXT: Attribute {
179 // CHECK-NEXT: Tag: 68
180 // CHECK-NEXT: Value: 1
181 // CHECK-NEXT: TagName: Virtualization_use
182 // CHECK-NEXT: Description: TrustZone
183 // CHECK-NEXT: }