mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 06:10:12 +00:00
[RISCV] Support -mno-implicit-float.
This can be used to disable vectorization and memcpy/memset expansion for things like OS kernels. It also disables implicit uses of scalar FP, but I don't know if we have any of those for RISC-V. NOTE: Without this patch you can still do -Xclang -no-implicit-float Reviewed By: rui.zhang Differential Revision: https://reviews.llvm.org/D134077
This commit is contained in:
parent
a0c53524a5
commit
549231d38e
@ -2194,6 +2194,10 @@ void Clang::AddRISCVTargetArgs(const ArgList &Args,
|
|||||||
|
|
||||||
SetRISCVSmallDataLimit(getToolChain(), Args, CmdArgs);
|
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)) {
|
if (const Arg *A = Args.getLastArg(options::OPT_mtune_EQ)) {
|
||||||
CmdArgs.push_back("-tune-cpu");
|
CmdArgs.push_back("-tune-cpu");
|
||||||
CmdArgs.push_back(A->getValue());
|
CmdArgs.push_back(A->getValue());
|
||||||
|
@ -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
|
// 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"
|
// 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"
|
||||||
|
Loading…
Reference in New Issue
Block a user