105 lines · c
1// Check handling -mhard-float / -msoft-float / -mfloat-abi options2// when build for MIPS platforms.3//4// Default5// RUN: %clang -c %s -### -o %t.o 2>&1 \6// RUN: --target=mips-linux-gnu \7// RUN: | FileCheck --check-prefix=CHECK-DEF %s8// CHECK-DEF: "-mfloat-abi" "hard"9//10// Default on FreeBSD11// RUN: %clang -c %s -### -o %t.o 2>&1 \12// RUN: --target=mips-freebsd12 \13// RUN: | FileCheck --check-prefix=DEF-FREEBSD %s14// DEF-FREEBSD: "-target-feature" "+soft-float"15// DEF-FREEBSD: "-msoft-float"16// DEF-FREEBSD: "-mfloat-abi" "soft"17//18// -mhard-float19// RUN: %clang -c %s -### -o %t.o 2>&1 \20// RUN: --target=mips-linux-gnu -mhard-float \21// RUN: | FileCheck --check-prefix=CHECK-HARD %s22// CHECK-HARD: "-mfloat-abi" "hard"23//24// -msoft-float25// RUN: %clang -c %s -### -o %t.o 2>&1 \26// RUN: --target=mips-linux-gnu -msoft-float \27// RUN: | FileCheck --check-prefix=CHECK-SOFT %s28// CHECK-SOFT: "-target-feature" "+soft-float"29// CHECK-SOFT: "-msoft-float"30// CHECK-SOFT: "-mfloat-abi" "soft"31//32// -mfloat-abi=hard33// RUN: %clang -c %s -### -o %t.o 2>&1 \34// RUN: --target=mips-linux-gnu -mfloat-abi=hard \35// RUN: | FileCheck --check-prefix=CHECK-ABI-HARD %s36// CHECK-ABI-HARD: "-mfloat-abi" "hard"37//38// -mfloat-abi=soft39// RUN: %clang -c %s -### -o %t.o 2>&1 \40// RUN: --target=mips-linux-gnu -mfloat-abi=soft \41// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT %s42// CHECK-ABI-SOFT: "-target-feature" "+soft-float"43// CHECK-ABI-SOFT: "-msoft-float"44// CHECK-ABI-SOFT: "-mfloat-abi" "soft"45//46// -mdouble-float47// RUN: %clang -c %s -### -o %t.o 2>&1 \48// RUN: --target=mips-linux-gnu -msingle-float -mdouble-float \49// RUN: | FileCheck --check-prefix=CHECK-ABI-DOUBLE %s50// CHECK-ABI-DOUBLE: "-mfloat-abi" "hard"51// CHECK-ABI-DOUBLE-NOT: "+single-float"52//53// -msingle-float54// RUN: %clang -c %s -### -o %t.o 2>&1 \55// RUN: --target=mips-linux-gnu -mdouble-float -msingle-float \56// RUN: | FileCheck --check-prefix=CHECK-ABI-SINGLE %s57// CHECK-ABI-SINGLE: "-target-feature" "+single-float"58// CHECK-ABI-SINGLE: "-mfloat-abi" "hard"59//60// -msoft-float -msingle-float61// RUN: %clang -c %s -### -o %t.o 2>&1 \62// RUN: --target=mips-linux-gnu -msoft-float -msingle-float \63// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-SINGLE %s64// CHECK-ABI-SOFT-SINGLE: "-target-feature" "+single-float"65// CHECK-ABI-SOFT-SINGLE: "-mfloat-abi" "soft"66//67// Default -mips1668// RUN: %clang -c %s -### -o %t.o 2>&1 \69// RUN: --target=mips-linux-gnu -mips16 \70// RUN: | FileCheck --check-prefix=CHECK-DEF-MIPS16 %s71// CHECK-DEF-MIPS16: "-target-feature" "+mips16"72// CHECK-DEF-MIPS16: "-mfloat-abi" "hard"73//74// -mhard-float -mips1675// RUN: %clang -c %s -### -o %t.o 2>&1 \76// RUN: --target=mips-linux-gnu -mhard-float -mips16 \77// RUN: | FileCheck --check-prefix=CHECK-HARD-MIPS16 %s78// CHECK-HARD-MIPS16: "-target-feature" "+mips16"79// CHECK-HARD-MIPS16: "-mfloat-abi" "hard"80//81// -msoft-float -mips1682// RUN: %clang -c %s -### -o %t.o 2>&1 \83// RUN: --target=mips-linux-gnu -msoft-float -mips16 \84// RUN: | FileCheck --check-prefix=CHECK-SOFT-MIPS16 %s85// CHECK-SOFT-MIPS16: "-target-feature" "+soft-float"86// CHECK-SOFT-MIPS16: "-target-feature" "+mips16"87// CHECK-SOFT-MIPS16: "-msoft-float"88// CHECK-SOFT-MIPS16: "-mfloat-abi" "soft"89//90// -mfloat-abi=hard -mips1691// RUN: %clang -c %s -### -o %t.o 2>&1 \92// RUN: --target=mips-linux-gnu -mfloat-abi=hard -mips16 \93// RUN: | FileCheck --check-prefix=CHECK-ABI-HARD-MIPS16 %s94// CHECK-ABI-HARD-MIPS16: "-target-feature" "+mips16"95// CHECK-ABI-HARD-MIPS16: "-mfloat-abi" "hard"96//97// -mfloat-abi=soft -mips1698// RUN: %clang -c %s -### -o %t.o 2>&1 \99// RUN: --target=mips-linux-gnu -mfloat-abi=soft -mips16 \100// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-MIPS16 %s101// CHECK-ABI-SOFT-MIPS16: "-target-feature" "+soft-float"102// CHECK-ABI-SOFT-MIPS16: "-target-feature" "+mips16"103// CHECK-ABI-SOFT-MIPS16: "-msoft-float"104// CHECK-ABI-SOFT-MIPS16: "-mfloat-abi" "soft"105