blob: 4b0289b73b93ad6b1cd8eb8f5ee283f72946ed47 [file] [log] [blame]
Evgeniy Stepanova7451552012-01-11 12:36:39 +00001// Test that different values of -mfpu pick correct ARM FPU target-feature(s).
2
Sebastian Pop422377c2012-01-20 22:01:23 +00003// RUN: %clang -target arm-linux-eabi %s -### -o %t.o 2>&1 \
Evgeniy Stepanova7451552012-01-11 12:36:39 +00004// RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
Keith Walker167961f2018-02-19 12:40:26 +00005// CHECK-DEFAULT-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +00006// CHECK-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
Evgeniy Stepanova7451552012-01-11 12:36:39 +00007// CHECK-DEFAULT-NOT: "-target-feature" "+vfp2"
8// CHECK-DEFAULT-NOT: "-target-feature" "+vfp3"
Evgeniy Stepanova7451552012-01-11 12:36:39 +00009// CHECK-DEFAULT-NOT: "-target-feature" "+neon"
10
Sebastian Pop422377c2012-01-20 22:01:23 +000011// RUN: %clang -target arm-linux-eabi -mfpu=fpa %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000012// RUN: | FileCheck --check-prefix=CHECK-FPA %s
Sebastian Pop422377c2012-01-20 22:01:23 +000013// RUN: %clang -target arm-linux-eabi -mfpu=fpe2 %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000014// RUN: | FileCheck --check-prefix=CHECK-FPA %s
Sebastian Pop422377c2012-01-20 22:01:23 +000015// RUN: %clang -target arm-linux-eabi -mfpu=fpe3 %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000016// RUN: | FileCheck --check-prefix=CHECK-FPA %s
Sebastian Pop422377c2012-01-20 22:01:23 +000017// RUN: %clang -target arm-linux-eabi -mfpu=maverick %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000018// RUN: | FileCheck --check-prefix=CHECK-FPA %s
John Brawn5a589ad2015-06-05 13:34:11 +000019// CHECK-FPA: error: {{.*}} does not support '-mfpu={{fpa|fpe|fpe2|fpe3|maverick}}'
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000020
Sebastian Pop422377c2012-01-20 22:01:23 +000021// RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000022// RUN: | FileCheck --check-prefix=CHECK-VFP %s
Keith Walker167961f2018-02-19 12:40:26 +000023// RUN: %clang -target arm-linux-eabi -mfpu=vfp %s -mfloat-abi=soft -### -o %t.o 2>&1 \
24// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-2 %s
25// CHECK-VFP-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000026// CHECK-VFP-DAG: "-target-feature" "+soft-float-abi"
27// CHECK-VFP-DAG: "-target-feature" "+vfp2"
28// CHECK-VFP-DAG: "-target-feature" "-vfp3d16sp"
29// CHECK-VFP-DAG: "-target-feature" "-vfp4d16sp"
30// CHECK-VFP-DAG: "-target-feature" "-fp-armv8d16sp"
31// CHECK-VFP-DAG: "-target-feature" "-neon"
32// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "+soft-float-abi"
33// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp3d16sp"
34// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp4d16sp"
35// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-fp-armv8d16sp"
36// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-neon"
37// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-crypto"
38// CHECK-SOFT-ABI-FP-2-DAG: "-target-feature" "-vfp2d16sp"
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000039
Sebastian Pop422377c2012-01-20 22:01:23 +000040// RUN: %clang -target arm-linux-eabi -mfpu=vfp3 %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000041// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
Sebastian Pop422377c2012-01-20 22:01:23 +000042// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000043// RUN: | FileCheck --check-prefix=CHECK-VFP3 %s
Keith Walker167961f2018-02-19 12:40:26 +000044// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
45// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
46// CHECK-VFP3-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000047// CHECK-VFP3-DAG: "-target-feature" "+soft-float-abi"
48// CHECK-VFP3-DAG: "-target-feature" "+vfp3"
49// CHECK-VFP3-DAG: "-target-feature" "-vfp4d16sp"
50// CHECK-VFP3-DAG: "-target-feature" "-fp-armv8d16sp"
51// CHECK-VFP3-DAG: "-target-feature" "-neon"
52// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "+soft-float-abi"
53// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp2d16sp"
54// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp4d16sp"
55// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-fp-armv8d16sp"
56// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-neon"
57// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-crypto"
58// CHECK-SOFT-ABI-FP-3-DAG: "-target-feature" "-vfp3d16sp"
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +000059
Javed Absar8f161752015-06-29 09:30:19 +000060// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 %s -### -o %t.o 2>&1 \
61// RUN: | FileCheck --check-prefix=CHECK-VFP3-FP16 %s
Keith Walker167961f2018-02-19 12:40:26 +000062// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
63// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
64// CHECK-VFP3-FP16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000065// CHECK-VFP3-FP16-DAG: "-target-feature" "+soft-float-abi"
66// CHECK-VFP3-FP16-DAG: "-target-feature" "+vfp3"
67// CHECK-VFP3-FP16-DAG: "-target-feature" "+fp16"
68// CHECK-VFP3-FP16-DAG: "-target-feature" "-vfp4d16sp"
69// CHECK-VFP3-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
70// CHECK-VFP3-FP16-DAG: "-target-feature" "+fp64"
71// CHECK-VFP3-FP16-DAG: "-target-feature" "+d32"
72// CHECK-VFP3-FP16-DAG: "-target-feature" "-neon"
73// CHECK-VFP3-FP16-DAG: "-target-feature" "-crypto"
Javed Absar8f161752015-06-29 09:30:19 +000074
Richard Barton09b60b22014-11-28 20:39:54 +000075// RUN: %clang -target arm-linux-eabi -mfpu=vfp3-d16 %s -### -o %t.o 2>&1 \
76// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
77// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 %s -### -o %t.o 2>&1 \
78// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16 %s
Keith Walker167961f2018-02-19 12:40:26 +000079// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
80// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
81// CHECK-VFP3-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000082// CHECK-VFP3-D16-DAG: "-target-feature" "+soft-float-abi"
83// CHECK-VFP3-D16-DAG: "-target-feature" "+vfp3d16"
84// CHECK-VFP3-D16-DAG: "-target-feature" "-vfp4d16sp"
85// CHECK-VFP3-D16-DAG: "-target-feature" "-fp-armv8d16sp"
86// CHECK-VFP3-D16-DAG: "-target-feature" "+fp64"
Simon Tatham760df472019-05-28 16:13:20 +000087// CHECK-VFP3-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000088// CHECK-VFP3-D16-DAG: "-target-feature" "-neon"
Richard Barton09b60b22014-11-28 20:39:54 +000089
Javed Absar8f161752015-06-29 09:30:19 +000090// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 %s -### -o %t.o 2>&1 \
91// RUN: | FileCheck --check-prefix=CHECK-VFP3-D16-FP16 %s
Keith Walker167961f2018-02-19 12:40:26 +000092// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3-d16-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
93// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
94// CHECK-VFP3-D16-FP16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +000095// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+soft-float-abi"
96// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+vfp3d16"
97// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+fp16"
98// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-vfp4d16sp"
99// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
100// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "+fp64"
Simon Tatham760df472019-05-28 16:13:20 +0000101// CHECK-VFP3-D16-FP16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000102// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-neon"
103// CHECK-VFP3-D16-FP16-DAG: "-target-feature" "-crypto"
Javed Absar8f161752015-06-29 09:30:19 +0000104
105// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd %s -### -o %t.o 2>&1 \
106// RUN: | FileCheck --check-prefix=CHECK-VFP3XD %s
Keith Walker167961f2018-02-19 12:40:26 +0000107// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd -mfloat-abi=soft %s -### -o %t.o 2>&1 \
108// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
109// CHECK-VFP3XD-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000110// CHECK-VFP3XD-DAG: "-target-feature" "+soft-float-abi"
Simon Tatham760df472019-05-28 16:13:20 +0000111// CHECK-VFP3XD-NOT: "-target-feature" "+fp64"
112// CHECK-VFP3XD-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000113// CHECK-VFP3XD-DAG: "-target-feature" "+vfp3d16sp"
114// CHECK-VFP3XD-DAG: "-target-feature" "-fp16"
115// CHECK-VFP3XD-DAG: "-target-feature" "-vfp4d16sp"
116// CHECK-VFP3XD-DAG: "-target-feature" "-fp-armv8d16sp"
117// CHECK-VFP3XD-DAG: "-target-feature" "-neon"
118// CHECK-VFP3XD-DAG: "-target-feature" "-crypto"
Javed Absar8f161752015-06-29 09:30:19 +0000119
120// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 %s -### -o %t.o 2>&1 \
121// RUN: | FileCheck --check-prefix=CHECK-VFP3XD-FP16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000122// RUN: %clang -target arm-linux-eabi -mfpu=vfpv3xd-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
123// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-3 %s
124// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000125// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+soft-float-abi"
126// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+vfp3d16sp"
127// CHECK-VFP3XD-FP16-DAG: "-target-feature" "+fp16"
128// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-vfp4d16sp"
129// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
Simon Tatham760df472019-05-28 16:13:20 +0000130// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+fp64"
131// CHECK-VFP3XD-FP16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000132// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-neon"
133// CHECK-VFP3XD-FP16-DAG: "-target-feature" "-crypto"
Javed Absar8f161752015-06-29 09:30:19 +0000134
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000135// RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \
136// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
137// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \
138// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
Keith Walker167961f2018-02-19 12:40:26 +0000139// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
140// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
141// CHECK-VFP4-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000142// CHECK-VFP4-DAG: "-target-feature" "+soft-float-abi"
143// CHECK-VFP4-DAG: "-target-feature" "+vfp4"
144// CHECK-VFP4-DAG: "-target-feature" "-fp-armv8d16sp"
145// CHECK-VFP4-DAG: "-target-feature" "-neon"
146// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "+soft-float-abi"
147// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp2d16sp"
148// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp3d16sp"
149// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-fp-armv8d16sp"
150// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-neon"
151// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-crypto"
152// CHECK-SOFT-ABI-FP-4-DAG: "-target-feature" "-vfp4d16sp"
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000153
154// RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \
155// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
156// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \
157// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000158// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
159// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
160// CHECK-VFP4-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000161// CHECK-VFP4-D16-DAG: "-target-feature" "+soft-float-abi"
162// CHECK-VFP4-D16-DAG: "-target-feature" "+vfp4d16"
163// CHECK-VFP4-D16-DAG: "-target-feature" "-fp-armv8d16sp"
164// CHECK-VFP4-D16-DAG: "-target-feature" "+fp64"
Simon Tatham760df472019-05-28 16:13:20 +0000165// CHECK-VFP4-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000166// CHECK-VFP4-D16-DAG: "-target-feature" "-neon"
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000167
Oliver Stannard96601ca2014-02-21 10:39:15 +0000168// RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \
169// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
170// RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 %s -### -o %t.o 2>&1 \
171// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000172// RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
173// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-4 %s
174// CHECK-FP4-SP-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000175// CHECK-FP4-SP-D16-DAG: "-target-feature" "+soft-float-abi"
176// CHECK-FP4-SP-D16-DAG: "-target-feature" "+vfp4d16sp"
177// CHECK-FP4-SP-D16-DAG: "-target-feature" "-fp-armv8d16sp"
Simon Tatham760df472019-05-28 16:13:20 +0000178// CHECK-FP4-SP-D16-NOT: "-target-feature" "+fp64"
179// CHECK-FP4-SP-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000180// CHECK-FP4-SP-D16-DAG: "-target-feature" "-neon"
Artyom Skrobov53b000a82013-11-21 14:04:38 +0000181
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000182// RUN: %clang -target arm-linux-eabi -mfpu=fp5-sp-d16 %s -### -o %t.o 2>&1 \
183// RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s
184// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-sp-d16 %s -### -o %t.o 2>&1 \
185// RUN: | FileCheck --check-prefix=CHECK-FP5-SP-D16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000186// RUN: %clang -target arm-linux-eabi -mfpu=fp-armv8-sp-d16 -mfloat-abi=soft %s -### -o %t.o \
187// RUN: 2>&1 | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
188// CHECK-FP5-SP-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000189// CHECK-FP5-SP-D16-DAG: "-target-feature" "+soft-float-abi"
190// CHECK-FP5-SP-D16-DAG: "-target-feature" "+fp-armv8d16sp"
191// CHECK-FP5-SP-D16-DAG: "-target-feature" "-neon"
Simon Tatham760df472019-05-28 16:13:20 +0000192// CHECK-FP5-SP-D16-NOT: "-target-feature" "+fp64"
193// CHECK-FP5-SP-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000194// CHECK-FP5-SP-D16-DAG: "-target-feature" "-crypto"
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000195
196// RUN: %clang -target arm-linux-eabi -mfpu=fp5-dp-d16 %s -### -o %t.o 2>&1 \
197// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
198// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -### -o %t.o 2>&1 \
199// RUN: | FileCheck --check-prefix=CHECK-FP5-DP-D16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000200// RUN: %clang -target arm-linux-eabi -mfpu=fpv5-dp-d16 %s -mfloat-abi=soft -### -o %t.o 2>&1 \
201// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-5 %s
202// CHECK-FP5-DP-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000203// CHECK-FP5-DP-D16-DAG: "-target-feature" "+soft-float-abi"
204// CHECK-FP5-DP-D16-DAG: "-target-feature" "+fp-armv8d16"
205// CHECK-FP5-DP-D16-DAG: "-target-feature" "+fp64"
Simon Tatham760df472019-05-28 16:13:20 +0000206// CHECK-FP5-DP-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000207// CHECK-FP5-DP-D16-DAG: "-target-feature" "-neon"
208// CHECK-FP5-DP-D16-DAG: "-target-feature" "-crypto"
209// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "+soft-float"
210// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "+soft-float-abi"
211// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp2d16sp"
212// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp3d16sp"
213// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-vfp4d16sp"
214// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-neon"
215// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-crypto"
216// CHECK-SOFT-ABI-FP-5-DAG: "-target-feature" "-fp-armv8d16sp"
Oliver Stannardbfd3ea32014-10-01 09:03:02 +0000217
Sebastian Pop422377c2012-01-20 22:01:23 +0000218// RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +0000219// RUN: | FileCheck --check-prefix=CHECK-NEON %s
Keith Walker167961f2018-02-19 12:40:26 +0000220// RUN: %clang -target arm-linux-eabi -mfpu=neon -mfloat-abi=soft %s -### -o %t.o 2>&1 \
221// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
222// CHECK-NEON-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000223// CHECK-NEON-DAG: "-target-feature" "+neon"
224// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "+soft-float-abi"
225// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp2d16sp"
226// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp4d16sp"
227// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-fp-armv8d16sp"
228// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-crypto"
229// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-vfp3d16sp"
230// CHECK-SOFT-ABI-FP-6-DAG: "-target-feature" "-neon"
Evgeniy Stepanov48af2a92012-01-11 11:21:31 +0000231
Javed Absar8f161752015-06-29 09:30:19 +0000232// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 %s -### -o %t.o 2>&1 \
233// RUN: | FileCheck --check-prefix=CHECK-NEON-FP16 %s
Keith Walker167961f2018-02-19 12:40:26 +0000234// RUN: %clang -target arm-linux-eabi -mfpu=neon-fp16 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
235// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
236// CHECK-NEON-FP16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000237// CHECK-NEON-FP16-DAG: "-target-feature" "+soft-float-abi"
238// CHECK-NEON-FP16-DAG: "-target-feature" "+vfp3"
239// CHECK-NEON-FP16-DAG: "-target-feature" "+fp16"
240// CHECK-NEON-FP16-DAG: "-target-feature" "-vfp4d16sp"
241// CHECK-NEON-FP16-DAG: "-target-feature" "-fp-armv8d16sp"
242// CHECK-NEON-FP16-DAG: "-target-feature" "+fp64"
243// CHECK-NEON-FP16-DAG: "-target-feature" "+d32"
244// CHECK-NEON-FP16-DAG: "-target-feature" "+neon"
245// CHECK-NEON-FP16-DAG: "-target-feature" "-crypto"
Javed Absar8f161752015-06-29 09:30:19 +0000246
Richard Barton3b0dcc12014-11-28 20:39:59 +0000247// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 %s -### -o %t.o 2>&1 \
248// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV3 %s
Keith Walker167961f2018-02-19 12:40:26 +0000249// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv3 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
250// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-6 %s
251// CHECK-NEON-VFPV3-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000252// CHECK-NEON-VFPV3-DAG: "-target-feature" "+soft-float-abi"
253// CHECK-NEON-VFPV3-DAG: "-target-feature" "+vfp3"
254// CHECK-NEON-VFPV3-DAG: "-target-feature" "+neon"
Richard Barton3b0dcc12014-11-28 20:39:59 +0000255
Richard Barton09b60b22014-11-28 20:39:54 +0000256// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 %s -### -o %t.o 2>&1 \
257// RUN: | FileCheck --check-prefix=CHECK-NEON-VFPV4 %s
Keith Walker167961f2018-02-19 12:40:26 +0000258// RUN: %clang -target arm-linux-eabi -mfpu=neon-vfpv4 -mfloat-abi=soft %s -### -o %t.o 2>&1 \
259// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-7 %s
260// CHECK-NEON-VFPV4-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000261// CHECK-NEON-VFPV4-DAG: "-target-feature" "+soft-float-abi"
262// CHECK-NEON-VFPV4-DAG: "-target-feature" "+vfp4"
263// CHECK-NEON-VFPV4-DAG: "-target-feature" "+neon"
264// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "+soft-float-abi"
265// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp2d16sp"
266// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp3d16sp"
267// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-fp-armv8d16sp"
268// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-crypto"
269// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-vfp4d16sp"
270// CHECK-SOFT-ABI-FP-7-DAG: "-target-feature" "-neon"
Richard Barton09b60b22014-11-28 20:39:54 +0000271
Sebastian Pop422377c2012-01-20 22:01:23 +0000272// RUN: %clang -target arm-linux-eabi -msoft-float %s -### -o %t.o 2>&1 \
Keith Walker167961f2018-02-19 12:40:26 +0000273// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
Amara Emersonecbe18e2014-02-12 10:22:35 +0000274// RUN: %clang -target armv8 %s -### 2>&1 \
Keith Walker167961f2018-02-19 12:40:26 +0000275// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
276// RUN: %clang -target armv8a -mfpu=neon %s -### -c 2>&1 \
277// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP-8 %s
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000278// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "+soft-float-abi"
279// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp2d16sp"
280// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp4d16sp"
281// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-fp-armv8d16sp"
282// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-crypto"
283// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-vfp3d16sp"
284// CHECK-SOFT-ABI-FP-8-DAG: "-target-feature" "-neon"
Amara Emersonecbe18e2014-02-12 10:22:35 +0000285
Bernard Ogdenda13af32013-10-24 18:32:51 +0000286// RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \
287// RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000288// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "+soft-float"
289// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "+soft-float-abi"
Keith Walker167961f2018-02-19 12:40:26 +0000290// NOT-CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000291// CHECK-ARMV9-SOFT-FLOAT-DAG: "-target-feature" "-neon"
292// CHECK-ARMV8-SOFT-FLOAT-DAG: "-target-feature" "-crypto"
Bernard Ogdenda13af32013-10-24 18:32:51 +0000293
Joey Gouly7db275b2013-06-27 13:19:54 +0000294// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
295// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
Keith Walker167961f2018-02-19 12:40:26 +0000296// CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float"
297// CHECK-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000298// CHECK-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
299// CHECK-FP-ARMV8-DAG: "-target-feature" "-neon"
300// CHECK-FP-ARMV8-DAG: "-target-feature" "-crypto"
Joey Gouly7db275b2013-06-27 13:19:54 +0000301
302// RUN: %clang -target armv8-linux-gnueabihf -mfpu=neon-fp-armv8 %s -### 2>&1 \
303// RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s
Keith Walker167961f2018-02-19 12:40:26 +0000304// CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float"
305// CHECK-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000306// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
307// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "+neon"
308// CHECK-NEON-FP-ARMV8-DAG: "-target-feature" "-crypto"
Tim Northover244950d2013-08-20 13:19:43 +0000309
Amara Emersonfc362c62013-09-19 13:54:03 +0000310// RUN: %clang -target armv8-linux-gnueabihf -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
311// RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
Keith Walker167961f2018-02-19 12:40:26 +0000312// CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float"
313// CHECK-CRYPTO-NEON-FP-ARMV8-NOT: "-target-feature" "+soft-float-abi"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000314// CHECK-CRYPTO-NEON-FP-ARMV8-DAG: "-target-feature" "+fp-armv8"
315// CHECK-CRYPTO-NEON-FP-ARMV8-DAG: "-target-feature" "+crypto"
Amara Emersonfc362c62013-09-19 13:54:03 +0000316
Amara Emerson4cdb87b2013-10-01 10:20:54 +0000317// RUN: %clang -target armv8-linux-gnueabi -mfpu=none %s -### 2>&1 \
318// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
Keith Walker167961f2018-02-19 12:40:26 +0000319// CHECK-NO-FP-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000320// CHECK-NO-FP-DAG: "-target-feature" "+soft-float-abi"
321// CHECK-NO-FP-DAG: "-target-feature" "-fpregs"
322// CHECK-NO-FP-DAG: "-target-feature" "-vfp2d16sp"
323// CHECK-NO-FP-DAG: "-target-feature" "-vfp3d16sp"
324// CHECK-NO-FP-DAG: "-target-feature" "-vfp4d16sp"
325// CHECK-NO-FP-DAG: "-target-feature" "-fp-armv8d16sp"
Simon Tatham760df472019-05-28 16:13:20 +0000326// CHECK-NO-FP-NOT: "-target-feature" "+fp64"
327// CHECK-NO-FP-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000328// CHECK-NO-FP-DAG: "-target-feature" "-neon"
329// CHECK-NO-FP-DAG: "-target-feature" "-crypto"
Amara Emerson4cdb87b2013-10-01 10:20:54 +0000330
Tim Northover244950d2013-08-20 13:19:43 +0000331// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
332// RUN: | FileCheck --check-prefix=CHECK-HF %s
Rafael Espindola0fa66802016-06-24 21:35:06 +0000333// RUN: %clang -target arm-linux-musleabihf %s -### 2>&1 \
334// RUN: | FileCheck --check-prefix=CHECK-HF %s
Keith Walker167961f2018-02-19 12:40:26 +0000335// CHECK-HF-NOT: "-target-feature" "+soft-float"
336// CHECK-HF-NOT: "-target-feature" "+soft-float-abi"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000337// CHECK-HF-DAG: "-target-cpu" "arm1176jzf-s"
Rafael Espindola9c6fb0f2013-11-23 14:36:40 +0000338
339// RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \
340// RUN: | FileCheck --check-prefix=ASM %s
341// ASM-NOT: -target-feature
Keith Walker167961f2018-02-19 12:40:26 +0000342
343// RUN: %clang -target armv8-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \
344// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
345// RUN: %clang -target armv7-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \
346// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
347// RUN: %clang -target armv6-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \
348// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
349// RUN: %clang -target armv5-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \
350// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
351// RUN: %clang -target armv4-linux-gnueabi -mfloat-abi=soft -mfpu=none %s -### -c 2>&1 \
352// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
353// RUN: %clang -target armv8-linux-gnueabi -msoft-float -mfpu=none %s -### -c 2>&1 \
354// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
355// RUN: %clang -target armv8-linux-gnueabi -mfloat-abi=soft %s -### -c 2>&1 \
356// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
357// RUN: %clang -target armv8-linux-gnueabi -msoft-float %s -### -c 2>&1 \
358// RUN: | FileCheck --check-prefix=CHECK-SOFT-ABI-FP %s
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000359// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "+soft-float"
360// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "+soft-float-abi"
361// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp2d16sp"
362// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp3d16sp"
363// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-vfp4d16sp"
364// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-fp-armv8d16sp"
365// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-neon"
366// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-crypto"
367// CHECK-SOFT-ABI-FP-DAG: "-target-feature" "-fpregs"
Dan Albertd0fbef9c2018-10-12 17:06:31 +0000368
369// RUN: %clang -target arm-linux-androideabi21 %s -### -c 2>&1 \
370// RUN: | FileCheck --check-prefix=CHECK-ARM5-ANDROID-FP-DEFAULT %s
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000371// CHECK-ARM5-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float"
372// CHECK-ARM5-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
Simon Tatham760df472019-05-28 16:13:20 +0000373// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+d32"
Dan Albertd0fbef9c2018-10-12 17:06:31 +0000374// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp3"
375// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4"
376// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8"
377// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+neon"
378// CHECK-ARM5-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto"
379
Dan Albertd0fbef9c2018-10-12 17:06:31 +0000380// RUN: %clang -target armv7-linux-androideabi21 %s -### -c 2>&1 \
Dan Albertdf89c6f2019-02-15 20:31:54 +0000381// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-DEFAULT %s
382// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000383// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+soft-float-abi"
384// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+vfp3"
Dan Albertdf89c6f2019-02-15 20:31:54 +0000385// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+vfp4"
386// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+fp-armv8"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000387// CHECK-ARM7-ANDROID-FP-DEFAULT-DAG: "-target-feature" "+neon"
Dan Albertdf89c6f2019-02-15 20:31:54 +0000388// CHECK-ARM7-ANDROID-FP-DEFAULT-NOT: "-target-feature" "+crypto"
Dan Albertd0fbef9c2018-10-12 17:06:31 +0000389
Dan Albertdf89c6f2019-02-15 20:31:54 +0000390// RUN: %clang -target armv7-linux-androideabi21 %s -mfpu=vfp3-d16 -### -c 2>&1 \
391// RUN: | FileCheck --check-prefix=CHECK-ARM7-ANDROID-FP-D16 %s
392// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+soft-float"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000393// CHECK-ARM7-ANDROID-FP-D16-DAG: "-target-feature" "+soft-float-abi"
Simon Tatham760df472019-05-28 16:13:20 +0000394// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+d32"
Simon Tatham5d66f2b2019-06-07 12:42:54 +0000395// CHECK-ARM7-ANDROID-FP-D16-DAG: "-target-feature" "+vfp3d16"
Dan Albertdf89c6f2019-02-15 20:31:54 +0000396// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+vfp4"
397// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+fp-armv8"
398// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+neon"
399// CHECK-ARM7-ANDROID-FP-D16-NOT: "-target-feature" "+crypto"