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