[llvm-dev] [compiler-rt] Support 128 bits soft-floating point without int128_t support

Kito Cheng via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 30 06:12:37 PST 2018


Hi all:

I'm porting RISC-V[1] for compiler-rt recently, and I've got a problem
when adding soft float routine for rv32, RISC-V ABI required 128 bits
bits for long double, but it's implemented by int128_t, however rv32
don't support __int128_t.

Of cause, it not hard thing to support __int128_t by overriding
TargetInfo::hasInt128Type for LLVM, but its will cause some ABI
incompatible with GCC, because GCC don't support __int128_t for 32
bits target.

So I guess I've few option here:

1. Implement 128 bits soft-float with int64_t.
2. Add an option to force enable int128_t support during building
compiler-rt for rv32.

Any other suggestion?


[1] https://riscv.org/


More information about the llvm-dev mailing list