mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 07:09:50 +03:00
gen/target: make real 128bit on RISC-V targets
RISC-V ILP32/LP64 ABI defines `long double` as 128bit. Reference: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#cc-type-details Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
6a56267699
commit
3b175db8af
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ llvm::Type *getRealType(const llvm::Triple &triple) {
|
||||||
// AArch64 targets except Darwin (64-bit) use 128-bit quadruple precision.
|
// AArch64 targets except Darwin (64-bit) use 128-bit quadruple precision.
|
||||||
// FIXME: PowerPC, SystemZ, ...
|
// FIXME: PowerPC, SystemZ, ...
|
||||||
if ((anyAarch64 && !triple.isOSDarwin()) ||
|
if ((anyAarch64 && !triple.isOSDarwin()) ||
|
||||||
(isAndroid && a == llvm::Triple::x86_64)) {
|
(isAndroid && a == llvm::Triple::x86_64) ||
|
||||||
|
triple.isRISCV()) {
|
||||||
return llvm::Type::getFP128Ty(ctx);
|
return llvm::Type::getFP128Ty(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue