77 lines · c
1// Check handling -mhard-float / -msoft-float options2// when build for SPARC platforms.3//4// Default sparc5// RUN: %clang -c %s -### -o %t.o 2>&1 \6// RUN: -target sparc-linux-gnu \7// RUN: | FileCheck --check-prefix=CHECK-DEF %s8// CHECK-DEF-NOT: "-target-feature" "+soft-float"9// CHECK-DEF-NOT: "-msoft-float"10//11// -mhard-float12// RUN: %clang -c %s -### -o %t.o 2>&1 \13// RUN: -target sparc-linux-gnu -mhard-float \14// RUN: | FileCheck --check-prefix=CHECK-HARD %s15// CHECK-HARD-NOT: "-msoft-float"16//17// -msoft-float18// RUN: %clang -c %s -### -o %t.o 2>&1 \19// RUN: -target sparc-linux-gnu -msoft-float \20// RUN: | FileCheck --check-prefix=CHECK-SOFT %s21// CHECK-SOFT: "-target-feature" "+soft-float"22//23// -mfloat-abi=soft24// RUN: %clang -c %s -### -o %t.o 2>&1 \25// RUN: -target sparc-linux-gnu -mfloat-abi=soft \26// RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT %s27// CHECK-FLOATABISOFT: "-target-feature" "+soft-float"28//29// -mfloat-abi=hard30// RUN: %clang -c %s -### -o %t.o 2>&1 \31// RUN: -target sparc-linux-gnu -mfloat-abi=hard \32// RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD %s33// CHECK-FLOATABIHARD-NOT: "-target-feature" "+soft-float"34//35// check invalid -mfloat-abi36// RUN: not %clang -c %s -### -o %t.o 2>&1 \37// RUN: -target sparc-linux-gnu -mfloat-abi=x \38// RUN: | FileCheck --check-prefix=CHECK-ERRMSG %s39// CHECK-ERRMSG: error: invalid float ABI '-mfloat-abi=x'40//41// Default sparc6442// RUN: %clang -c %s -### -o %t.o 2>&1 \43// RUN: -target sparc64-linux-gnu \44// RUN: | FileCheck --check-prefix=CHECK-DEF-SPARC64 %s45// CHECK-DEF-SPARC64-NOT: "-target-feature" "+soft-float"46// CHECK-DEF-SPARC64-NOT: "-msoft-float"47//48// -mhard-float49// RUN: %clang -c %s -### -o %t.o 2>&1 \50// RUN: -target sparc64-linux-gnu -mhard-float \51// RUN: | FileCheck --check-prefix=CHECK-HARD-SPARC64 %s52// CHECK-HARD-SPARC64-NOT: "-msoft-float"53//54// -msoft-float55// RUN: %clang -c %s -### -o %t.o 2>&1 \56// RUN: -target sparc64-linux-gnu -msoft-float \57// RUN: | FileCheck --check-prefix=CHECK-SOFT-SPARC64 %s58// CHECK-SOFT-SPARC64: "-target-feature" "+soft-float"59//60// -mfloat-abi=soft61// RUN: %clang -c %s -### -o %t.o 2>&1 \62// RUN: -target sparc64-linux-gnu -mfloat-abi=soft \63// RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT64 %s64// CHECK-FLOATABISOFT64: "-target-feature" "+soft-float"65//66// -mfloat-abi=hard67// RUN: %clang -c %s -### -o %t.o 2>&1 \68// RUN: -target sparc64-linux-gnu -mfloat-abi=hard \69// RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD64 %s70// CHECK-FLOATABIHARD64-NOT: "-target-feature" "+soft-float"71//72// check invalid -mfloat-abi73// RUN: not %clang -c %s -### -o %t.o 2>&1 \74// RUN: -target sparc64-linux-gnu -mfloat-abi=x \75// RUN: | FileCheck --check-prefix=CHECK-ERRMSG64 %s76// CHECK-ERRMSG64: error: invalid float ABI '-mfloat-abi=x'77