blob: 95eb0025cc096d18ebf5b1c2c0611763667c17e8 [file] [log] [blame]
Jim Grosbachf7947052012-07-09 18:34:21 +00001// REQUIRES: mips-registered-target
Akira Hatanaka54edd472012-03-26 17:37:20 +00002// Check handling -mhard-float / -msoft-float / -mfloat-abi options
3// when build for MIPS platforms.
4//
5// Default
Daniel Dunbarae7e9392012-04-09 20:40:11 +00006// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +00007// RUN: -target mips-linux-gnu \
8// RUN: | FileCheck --check-prefix=CHECK-DEF %s
9// CHECK-DEF: "-mfloat-abi" "hard"
10//
11// -mhard-float
Daniel Dunbarae7e9392012-04-09 20:40:11 +000012// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +000013// 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
Daniel Dunbarae7e9392012-04-09 20:40:11 +000018// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +000019// 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
Daniel Dunbarae7e9392012-04-09 20:40:11 +000026// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +000027// 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
Daniel Dunbarae7e9392012-04-09 20:40:11 +000032// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +000033// 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
Daniel Dunbarae7e9392012-04-09 20:40:11 +000040// RUN: %clang -ccc-clang-archs mips -c %s -### -o %t.o 2>&1 \
Akira Hatanaka54edd472012-03-26 17:37:20 +000041// 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"