xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/sparc-float.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // Check handling -mhard-float / -msoft-float options
2*0a6a1f1dSLionel Sambuc // when build for SPARC platforms.
3*0a6a1f1dSLionel Sambuc //
4*0a6a1f1dSLionel Sambuc // Default sparc
5*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
6*0a6a1f1dSLionel Sambuc // RUN:     -target sparc-linux-gnu \
7*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-DEF %s
8*0a6a1f1dSLionel Sambuc // CHECK-DEF: "-target-feature" "+soft-float"
9*0a6a1f1dSLionel Sambuc // CHECK-DEF: "-msoft-float"
10*0a6a1f1dSLionel Sambuc //
11*0a6a1f1dSLionel Sambuc // -mhard-float
12*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
13*0a6a1f1dSLionel Sambuc // RUN:     -target sparc-linux-gnu -mhard-float \
14*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-HARD %s
15*0a6a1f1dSLionel Sambuc // CHECK-HARD: "-mhard-float"
16*0a6a1f1dSLionel Sambuc //
17*0a6a1f1dSLionel Sambuc // -msoft-float
18*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
19*0a6a1f1dSLionel Sambuc // RUN:     -target sparc-linux-gnu -msoft-float \
20*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-SOFT %s
21*0a6a1f1dSLionel Sambuc // CHECK-SOFT: "-target-feature" "+soft-float"
22*0a6a1f1dSLionel Sambuc // CHECK-SOFT: "-msoft-float"
23*0a6a1f1dSLionel Sambuc //
24*0a6a1f1dSLionel Sambuc // Default sparc64
25*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
26*0a6a1f1dSLionel Sambuc // RUN:     -target sparc64-linux-gnu \
27*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-DEF-SPARC64 %s
28*0a6a1f1dSLionel Sambuc // CHECK-DEF-SPARC64: "-target-feature" "+soft-float"
29*0a6a1f1dSLionel Sambuc // CHECK-DEF-SPARC64: "-msoft-float"
30*0a6a1f1dSLionel Sambuc //
31*0a6a1f1dSLionel Sambuc // -mhard-float
32*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
33*0a6a1f1dSLionel Sambuc // RUN:     -target sparc64-linux-gnu -mhard-float \
34*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-HARD-SPARC64 %s
35*0a6a1f1dSLionel Sambuc // CHECK-HARD-SPARC64: "-mhard-float"
36*0a6a1f1dSLionel Sambuc //
37*0a6a1f1dSLionel Sambuc // -msoft-float
38*0a6a1f1dSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \
39*0a6a1f1dSLionel Sambuc // RUN:     -target sparc64-linux-gnu -msoft-float \
40*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-SOFT-SPARC64 %s
41*0a6a1f1dSLionel Sambuc // CHECK-SOFT-SPARC64: "-target-feature" "+soft-float"
42*0a6a1f1dSLionel Sambuc // CHECK-SOFT-SPARC64: "-msoft-float"
43