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