[PATCH] D134077: [RISCV] Support -mno-implicit-float.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 13:33:02 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG549231d38e10: [RISCV] Support -mno-implicit-float. (authored by craig.topper).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134077/new/

https://reviews.llvm.org/D134077

Files:
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/flags.c


Index: clang/test/Driver/flags.c
===================================================================
--- clang/test/Driver/flags.c
+++ clang/test/Driver/flags.c
@@ -27,3 +27,9 @@
 
 // RUN: %clang -target x86_64-linux-gnu -### -c -fclang-abi-compat=3.2 %s 2>&1 | FileCheck -check-prefix=TEST9 %s
 // TEST9: "-fclang-abi-compat=3.2"
+//
+// RUN: %clang -target riscv32 -### -S -mno-implicit-float %s 2>&1 | FileCheck -check-prefix=TEST10 %s
+// TEST10: "-no-implicit-float"
+//
+// RUN: %clang -target riscv64 -### -S -mno-implicit-float %s 2>&1 | FileCheck -check-prefix=TEST11 %s
+// TEST11: "-no-implicit-float"
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -2194,6 +2194,10 @@
 
   SetRISCVSmallDataLimit(getToolChain(), Args, CmdArgs);
 
+  if (!Args.hasFlag(options::OPT_mimplicit_float,
+                    options::OPT_mno_implicit_float, true))
+    CmdArgs.push_back("-no-implicit-float");
+
   if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) {
     CmdArgs.push_back("-tune-cpu");
     CmdArgs.push_back(A->getValue());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134077.461682.patch
Type: text/x-patch
Size: 1196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220920/fc8d9979/attachment.bin>


More information about the llvm-commits mailing list