[PATCH] D136146: [Clang][LoongArch] Handle -march/-m{single,double,soft}-float/-mfpu options
Xi Ruoyao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 1 21:40:49 PDT 2022
xry111 added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/LoongArch.cpp:44
+ // Select abi based on -mfpu=xx.
+ if (const Arg *A = Args.getLastArg(options::OPT_mfpu_EQ)) {
----------------
MaskRay wrote:
> It's better to stick with just one canonical spelling. Is there time to remove support for one set of options? When `-mfpu=64 -msoft-float` is specified, is a -Wunused-command-line-argument warning expected?
According to the doc, the semantics of -mfpu=64 and -mdouble-float are not exactly same. `-mfpu=64 -mabi=lp64s` will allow the compiler to generate 64-bit floating-point instructions but keep LP64S calling convention. `-mdouble-float -mabi=lp64s` will be same as `-mdouble-float -mabi=lp64d` (with a warning emitted, maybe).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136146/new/
https://reviews.llvm.org/D136146
More information about the cfe-commits
mailing list