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