r216029 - Handle SPARC float command line parameters for SPARCv9.

Eric Christopher echristo at gmail.com
Wed Apr 29 15:49:32 PDT 2015


Hi Brad,

Here's some commit archaeology. I don't actually see any soft float support
in the llvm sparc backend. Is this code actually used or needed?

-eric

On Tue, Aug 19, 2014 at 3:03 PM Brad Smith <brad at comstyle.com> wrote:

> Author: brad
> Date: Tue Aug 19 16:50:15 2014
> New Revision: 216029
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216029&view=rev
> Log:
> Handle SPARC float command line parameters for SPARCv9.
>
> Modified:
>     cfe/trunk/lib/Driver/Tools.cpp
>     cfe/trunk/test/Driver/sparc-float.c
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=216029&r1=216028&r2=216029&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Tue Aug 19 16:50:15 2014
> @@ -1298,7 +1298,7 @@ static std::string getR600TargetGPU(cons
>  }
>
>  static void getSparcTargetFeatures(const ArgList &Args,
> -                                   std::vector<const char *> Features) {
> +                                   std::vector<const char *> &Features) {
>    bool SoftFloatABI = true;
>    if (Arg *A =
>            Args.getLastArg(options::OPT_msoft_float,
> options::OPT_mhard_float)) {
> @@ -1801,6 +1801,7 @@ static void getTargetFeatures(const Driv
>      getPPCTargetFeatures(Args, Features);
>      break;
>    case llvm::Triple::sparc:
> +  case llvm::Triple::sparcv9:
>      getSparcTargetFeatures(Args, Features);
>      break;
>    case llvm::Triple::aarch64:
>
> Modified: cfe/trunk/test/Driver/sparc-float.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/sparc-float.c?rev=216029&r1=216028&r2=216029&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/sparc-float.c (original)
> +++ cfe/trunk/test/Driver/sparc-float.c Tue Aug 19 16:50:15 2014
> @@ -5,6 +5,7 @@
>  // RUN: %clang -c %s -### -o %t.o 2>&1 \
>  // RUN:     -target sparc-linux-gnu \
>  // RUN:   | FileCheck --check-prefix=CHECK-DEF %s
> +// CHECK-DEF: "-target-feature" "+soft-float"
>  // CHECK-DEF: "-msoft-float"
>  //
>  // -mhard-float
> @@ -17,12 +18,14 @@
>  // 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: "-target-feature" "+soft-float"
>  // CHECK-SOFT: "-msoft-float"
>  //
>  // Default sparc64
>  // RUN: %clang -c %s -### -o %t.o 2>&1 \
>  // RUN:     -target sparc64-linux-gnu \
>  // RUN:   | FileCheck --check-prefix=CHECK-DEF-SPARC64 %s
> +// CHECK-DEF-SPARC64: "-target-feature" "+soft-float"
>  // CHECK-DEF-SPARC64: "-msoft-float"
>  //
>  // -mhard-float
> @@ -35,4 +38,5 @@
>  // 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: "-target-feature" "+soft-float"
>  // CHECK-SOFT-SPARC64: "-msoft-float"
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150429/972e03c5/attachment.html>


More information about the cfe-commits mailing list