2012-03-27 01:37:20 +08:00
|
|
|
// Check handling -mhard-float / -msoft-float / -mfloat-abi options
|
|
|
|
// when build for MIPS platforms.
|
|
|
|
//
|
|
|
|
// Default
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: -target mips-linux-gnu \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEF %s
|
|
|
|
// CHECK-DEF: "-mfloat-abi" "hard"
|
|
|
|
//
|
|
|
|
// -mhard-float
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: -target mips-linux-gnu -mhard-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-HARD %s
|
|
|
|
// CHECK-HARD: "-mfloat-abi" "hard"
|
|
|
|
//
|
|
|
|
// -msoft-float
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: -target mips-linux-gnu -msoft-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SOFT %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-SOFT: "-target-feature" "+soft-float"
|
2012-03-27 01:37:20 +08:00
|
|
|
// CHECK-SOFT: "-msoft-float"
|
|
|
|
// CHECK-SOFT: "-mfloat-abi" "soft"
|
|
|
|
//
|
|
|
|
// -mfloat-abi=hard
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: -target mips-linux-gnu -mfloat-abi=hard \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-HARD %s
|
|
|
|
// CHECK-ABI-HARD: "-mfloat-abi" "hard"
|
|
|
|
//
|
|
|
|
// -mfloat-abi=soft
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: -target mips-linux-gnu -mfloat-abi=soft \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-ABI-SOFT: "-target-feature" "+soft-float"
|
2012-03-27 01:37:20 +08:00
|
|
|
// CHECK-ABI-SOFT: "-msoft-float"
|
|
|
|
// CHECK-ABI-SOFT: "-mfloat-abi" "soft"
|
|
|
|
//
|
2013-04-14 16:37:15 +08:00
|
|
|
// -mdouble-float
|
2012-10-10 04:46:28 +08:00
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
2013-04-14 16:37:15 +08:00
|
|
|
// RUN: -target mips-linux-gnu -msingle-float -mdouble-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-DOUBLE %s
|
|
|
|
// CHECK-ABI-DOUBLE: "-mfloat-abi" "hard"
|
|
|
|
// CHECK-ABI-DOUBLE-NOT: "+single-float"
|
|
|
|
//
|
|
|
|
// -msingle-float
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -mdouble-float -msingle-float \
|
2012-03-27 01:37:20 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-SINGLE %s
|
|
|
|
// CHECK-ABI-SINGLE: "-target-feature" "+single-float"
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-ABI-SINGLE: "-mfloat-abi" "hard"
|
2013-01-10 20:36:19 +08:00
|
|
|
//
|
2013-04-14 16:37:15 +08:00
|
|
|
// -msoft-float -msingle-float
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -msoft-float -msingle-float \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-SINGLE %s
|
|
|
|
// CHECK-ABI-SOFT-SINGLE: "-target-feature" "+single-float"
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-ABI-SOFT-SINGLE: "-mfloat-abi" "soft"
|
2013-04-14 16:37:15 +08:00
|
|
|
//
|
2013-01-10 20:36:19 +08:00
|
|
|
// Default -mips16
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -mips16 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEF-MIPS16 %s
|
|
|
|
// CHECK-DEF-MIPS16: "-mfloat-abi" "soft"
|
|
|
|
// CHECK-DEF-MIPS16: "-mllvm" "-mips16-hard-float"
|
|
|
|
//
|
|
|
|
// -mhard-float -mips16
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -mhard-float -mips16 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-HARD-MIPS16 %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-HARD-MIPS16: "-target-feature" "+soft-float"
|
2013-01-10 20:36:19 +08:00
|
|
|
// CHECK-HARD-MIPS16: "-msoft-float"
|
|
|
|
// CHECK-HARD-MIPS16: "-mfloat-abi" "soft"
|
|
|
|
// CHECK-HARD-MIPS16: "-mllvm" "-mips16-hard-float"
|
|
|
|
//
|
|
|
|
// -msoft-float -mips16
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -msoft-float -mips16 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SOFT-MIPS16 %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-SOFT-MIPS16: "-target-feature" "+soft-float"
|
2013-01-10 20:36:19 +08:00
|
|
|
// CHECK-SOFT-MIPS16: "-msoft-float"
|
|
|
|
// CHECK-SOFT-MIPS16: "-mfloat-abi" "soft"
|
|
|
|
//
|
|
|
|
// -mfloat-abi=hard -mips16
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -mfloat-abi=hard -mips16 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-HARD-MIPS16 %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-ABI-HARD-MIPS16: "-target-feature" "+soft-float"
|
2013-01-10 20:36:19 +08:00
|
|
|
// CHECK-ABI-HARD-MIPS16: "-msoft-float"
|
|
|
|
// CHECK-ABI-HARD-MIPS16: "-mfloat-abi" "soft"
|
|
|
|
// CHECK-ABI-HARD-MIPS16: "-mllvm" "-mips16-hard-float"
|
|
|
|
//
|
|
|
|
// -mfloat-abi=soft -mips16
|
|
|
|
// RUN: %clang -c %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target mips-linux-gnu -mfloat-abi=soft -mips16 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-MIPS16 %s
|
2013-08-22 00:39:20 +08:00
|
|
|
// CHECK-ABI-SOFT-MIPS16: "-target-feature" "+soft-float"
|
2013-01-10 20:36:19 +08:00
|
|
|
// CHECK-ABI-SOFT-MIPS16: "-msoft-float"
|
|
|
|
// CHECK-ABI-SOFT-MIPS16: "-mfloat-abi" "soft"
|