1 // REQUIRES: mips-registered-target
2 // Check handling -mhard-float / -msoft-float / -mfloat-abi options
3 // when build for MIPS platforms.
4 //
5 // Default
6 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
7 // RUN:     -target mips-linux-gnu \
8 // RUN:   | FileCheck --check-prefix=CHECK-DEF %s
9 // CHECK-DEF: "-mfloat-abi" "hard"
10 //
11 // -mhard-float
12 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
13 // RUN:     -target mips-linux-gnu -mhard-float \
14 // RUN:   | FileCheck --check-prefix=CHECK-HARD %s
15 // CHECK-HARD: "-mfloat-abi" "hard"
16 //
17 // -msoft-float
18 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
19 // RUN:     -target mips-linux-gnu -msoft-float \
20 // RUN:   | FileCheck --check-prefix=CHECK-SOFT %s
21 // CHECK-SOFT: "-msoft-float"
22 // CHECK-SOFT: "-mfloat-abi" "soft"
23 // CHECK-SOFT: "-target-feature" "+soft-float"
24 //
25 // -mfloat-abi=hard
26 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
27 // RUN:     -target mips-linux-gnu -mfloat-abi=hard \
28 // RUN:   | FileCheck --check-prefix=CHECK-ABI-HARD %s
29 // CHECK-ABI-HARD: "-mfloat-abi" "hard"
30 //
31 // -mfloat-abi=soft
32 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
33 // RUN:     -target mips-linux-gnu -mfloat-abi=soft \
34 // RUN:   | FileCheck --check-prefix=CHECK-ABI-SOFT %s
35 // CHECK-ABI-SOFT: "-msoft-float"
36 // CHECK-ABI-SOFT: "-mfloat-abi" "soft"
37 // CHECK-ABI-SOFT: "-target-feature" "+soft-float"
38 //
39 // -mfloat-abi=single
40 // RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
41 // RUN:     -target mips-linux-gnu -mfloat-abi=single \
42 // RUN:   | FileCheck --check-prefix=CHECK-ABI-SINGLE %s
43 // CHECK-ABI-SINGLE: "-target-feature" "+single-float"
44