diff options
author | Jacob Baungard Hansen <jacob.hansen@esa.int> | 2016-05-24 08:30:08 +0000 |
---|---|---|
committer | Jacob Baungard Hansen <jacob.hansen@esa.int> | 2016-05-24 08:30:08 +0000 |
commit | 13a49374048c0d9e1600cda96f181d07ce732042 (patch) | |
tree | ecaaca4d1e0ea7a5dd7e15906638e3cd9640314b /clang/test/Driver/sparc-float.c | |
parent | 14000b3cea6b3a44a19b9c80c550d7a2c24b3d31 (diff) | |
download | bcm5719-llvm-13a49374048c0d9e1600cda96f181d07ce732042.tar.gz bcm5719-llvm-13a49374048c0d9e1600cda96f181d07ce732042.zip |
[Sparc] Add software float option -msoft-float
Summary:
Following patch D19265 which enable software floating point support in the Sparc backend, this patch enables the option to be enabled in the front-end using the -msoft-float option.
The user should ensure a library (such as the builtins from Compiler-RT) that includes the software floating point routines is provided.
Reviewers: jyknight, lero_chris
Subscribers: jyknight, cfe-commits
Differential Revision: http://reviews.llvm.org/D20419
llvm-svn: 270538
Diffstat (limited to 'clang/test/Driver/sparc-float.c')
-rw-r--r-- | clang/test/Driver/sparc-float.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/clang/test/Driver/sparc-float.c b/clang/test/Driver/sparc-float.c index 6fa47f00cc7..c205f5db17e 100644 --- a/clang/test/Driver/sparc-float.c +++ b/clang/test/Driver/sparc-float.c @@ -18,7 +18,25 @@ // RUN: %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target sparc-linux-gnu -msoft-float \ // RUN: | FileCheck --check-prefix=CHECK-SOFT %s -// CHECK-SOFT: error: unsupported option '-msoft-float' +// CHECK-SOFT: "-target-feature" "+soft-float" +// +// -mfloat-abi=soft +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc-linux-gnu -mfloat-abi=soft \ +// RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT %s +// CHECK-FLOATABISOFT: "-target-feature" "+soft-float" +// +// -mfloat-abi=hard +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc-linux-gnu -mfloat-abi=hard \ +// RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD %s +// CHECK-FLOATABIHARD-NOT: "-target-feature" "+soft-float" +// +// check invalid -mfloat-abi +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc-linux-gnu -mfloat-abi=x \ +// RUN: | FileCheck --check-prefix=CHECK-ERRMSG %s +// CHECK-ERRMSG: error: invalid float ABI '-mfloat-abi=x' // // Default sparc64 // RUN: %clang -c %s -### -o %t.o 2>&1 \ @@ -37,4 +55,22 @@ // RUN: %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target sparc64-linux-gnu -msoft-float \ // RUN: | FileCheck --check-prefix=CHECK-SOFT-SPARC64 %s -// CHECK-SOFT-SPARC64: error: unsupported option '-msoft-float' +// CHECK-SOFT-SPARC64: "-target-feature" "+soft-float" +// +// -mfloat-abi=soft +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc64-linux-gnu -mfloat-abi=soft \ +// RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT64 %s +// CHECK-FLOATABISOFT64: "-target-feature" "+soft-float" +// +// -mfloat-abi=hard +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc64-linux-gnu -mfloat-abi=hard \ +// RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD64 %s +// CHECK-FLOATABIHARD64-NOT: "-target-feature" "+soft-float" +// +// check invalid -mfloat-abi +// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: -target sparc64-linux-gnu -mfloat-abi=x \ +// RUN: | FileCheck --check-prefix=CHECK-ERRMSG64 %s +// CHECK-ERRMSG64: error: invalid float ABI '-mfloat-abi=x' |