[PATCH] D65634: [RISCV] Default to ilp32d/lp64d in RISC-V Linux
Luís Marques via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 15 08:52:38 PDT 2019
luismarques added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:386
+ else
+ return Triple.getArch() == llvm::Triple::riscv32 ? "ilp32" : "lp64";
}
----------------
luismarques wrote:
> When I compile a bare metal GNU toolchain (using <https://github.com/riscv/riscv-gnu-toolchain>, reports GCC 8.3.0) I seem to get lp64d by default. Should we not match that behaviour?
>
> ```
>
> $ cat test.c
> float foo() { return 42.0; }
> $ riscv64-unknown-elf-gcc -O2 -S test.c
> $ cat test.s
> (...)
> foo:
> lui a5,%hi(.LC0)
> flw fa0,%lo(.LC0)(a5)
> (...)
> ```
To clarify, that's a toolchain configured with `--enable-multilib`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65634/new/
https://reviews.llvm.org/D65634
More information about the cfe-commits
mailing list