1*f4a2713aSLionel Sambuc // Check handling -mhard-float / -msoft-float / -mfloat-abi options 2*f4a2713aSLionel Sambuc // when build for MIPS platforms. 3*f4a2713aSLionel Sambuc // 4*f4a2713aSLionel Sambuc // Default 5*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 6*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu \ 7*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-DEF %s 8*f4a2713aSLionel Sambuc // CHECK-DEF: "-mfloat-abi" "hard" 9*f4a2713aSLionel Sambuc // 10*f4a2713aSLionel Sambuc // -mhard-float 11*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 12*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mhard-float \ 13*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-HARD %s 14*f4a2713aSLionel Sambuc // CHECK-HARD: "-mfloat-abi" "hard" 15*f4a2713aSLionel Sambuc // 16*f4a2713aSLionel Sambuc // -msoft-float 17*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 18*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -msoft-float \ 19*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-SOFT %s 20*f4a2713aSLionel Sambuc // CHECK-SOFT: "-target-feature" "+soft-float" 21*f4a2713aSLionel Sambuc // CHECK-SOFT: "-msoft-float" 22*f4a2713aSLionel Sambuc // CHECK-SOFT: "-mfloat-abi" "soft" 23*f4a2713aSLionel Sambuc // 24*f4a2713aSLionel Sambuc // -mfloat-abi=hard 25*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 26*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mfloat-abi=hard \ 27*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-HARD %s 28*f4a2713aSLionel Sambuc // CHECK-ABI-HARD: "-mfloat-abi" "hard" 29*f4a2713aSLionel Sambuc // 30*f4a2713aSLionel Sambuc // -mfloat-abi=soft 31*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 32*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mfloat-abi=soft \ 33*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT %s 34*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT: "-target-feature" "+soft-float" 35*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT: "-msoft-float" 36*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT: "-mfloat-abi" "soft" 37*f4a2713aSLionel Sambuc // 38*f4a2713aSLionel Sambuc // -mdouble-float 39*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 40*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -msingle-float -mdouble-float \ 41*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-DOUBLE %s 42*f4a2713aSLionel Sambuc // CHECK-ABI-DOUBLE: "-mfloat-abi" "hard" 43*f4a2713aSLionel Sambuc // CHECK-ABI-DOUBLE-NOT: "+single-float" 44*f4a2713aSLionel Sambuc // 45*f4a2713aSLionel Sambuc // -msingle-float 46*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 47*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mdouble-float -msingle-float \ 48*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-SINGLE %s 49*f4a2713aSLionel Sambuc // CHECK-ABI-SINGLE: "-target-feature" "+single-float" 50*f4a2713aSLionel Sambuc // CHECK-ABI-SINGLE: "-mfloat-abi" "hard" 51*f4a2713aSLionel Sambuc // 52*f4a2713aSLionel Sambuc // -msoft-float -msingle-float 53*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 54*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -msoft-float -msingle-float \ 55*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-SINGLE %s 56*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT-SINGLE: "-target-feature" "+single-float" 57*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT-SINGLE: "-mfloat-abi" "soft" 58*f4a2713aSLionel Sambuc // 59*f4a2713aSLionel Sambuc // Default -mips16 60*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 61*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mips16 \ 62*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-DEF-MIPS16 %s 63*f4a2713aSLionel Sambuc // CHECK-DEF-MIPS16: "-mfloat-abi" "soft" 64*f4a2713aSLionel Sambuc // CHECK-DEF-MIPS16: "-mllvm" "-mips16-hard-float" 65*f4a2713aSLionel Sambuc // 66*f4a2713aSLionel Sambuc // -mhard-float -mips16 67*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 68*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mhard-float -mips16 \ 69*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-HARD-MIPS16 %s 70*f4a2713aSLionel Sambuc // CHECK-HARD-MIPS16: "-target-feature" "+soft-float" 71*f4a2713aSLionel Sambuc // CHECK-HARD-MIPS16: "-msoft-float" 72*f4a2713aSLionel Sambuc // CHECK-HARD-MIPS16: "-mfloat-abi" "soft" 73*f4a2713aSLionel Sambuc // CHECK-HARD-MIPS16: "-mllvm" "-mips16-hard-float" 74*f4a2713aSLionel Sambuc // 75*f4a2713aSLionel Sambuc // -msoft-float -mips16 76*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 77*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -msoft-float -mips16 \ 78*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-SOFT-MIPS16 %s 79*f4a2713aSLionel Sambuc // CHECK-SOFT-MIPS16: "-target-feature" "+soft-float" 80*f4a2713aSLionel Sambuc // CHECK-SOFT-MIPS16: "-msoft-float" 81*f4a2713aSLionel Sambuc // CHECK-SOFT-MIPS16: "-mfloat-abi" "soft" 82*f4a2713aSLionel Sambuc // 83*f4a2713aSLionel Sambuc // -mfloat-abi=hard -mips16 84*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 85*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mfloat-abi=hard -mips16 \ 86*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-HARD-MIPS16 %s 87*f4a2713aSLionel Sambuc // CHECK-ABI-HARD-MIPS16: "-target-feature" "+soft-float" 88*f4a2713aSLionel Sambuc // CHECK-ABI-HARD-MIPS16: "-msoft-float" 89*f4a2713aSLionel Sambuc // CHECK-ABI-HARD-MIPS16: "-mfloat-abi" "soft" 90*f4a2713aSLionel Sambuc // CHECK-ABI-HARD-MIPS16: "-mllvm" "-mips16-hard-float" 91*f4a2713aSLionel Sambuc // 92*f4a2713aSLionel Sambuc // -mfloat-abi=soft -mips16 93*f4a2713aSLionel Sambuc // RUN: %clang -c %s -### -o %t.o 2>&1 \ 94*f4a2713aSLionel Sambuc // RUN: -target mips-linux-gnu -mfloat-abi=soft -mips16 \ 95*f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-MIPS16 %s 96*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT-MIPS16: "-target-feature" "+soft-float" 97*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT-MIPS16: "-msoft-float" 98*f4a2713aSLionel Sambuc // CHECK-ABI-SOFT-MIPS16: "-mfloat-abi" "soft" 99