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

Alexander Cherepanov via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 18 00:24:38 PDT 2020


On 18/03/2020 09.50, chengzhiwei (C) via llvm-dev wrote:
> Recently when I build compiler-rt runtime library based on riscv32 and get an unknown type error about int128 type, this has been discussed in the community:
> http://lists.llvm.org/pipermail/llvm-dev/2018-January/120887.html
> But there is no support in GCC for expressing an integer constant of type __int128 for targets with long long integer less than 128 bits wide(https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/_005f_005fint128.html#g_t_005f_005fint128)。

If you just need 128-bit integer constants you can construct them from 
64-bit parts, like this: (unsigned __int128)hi << 64 | lo .

-- 
Alexander Cherepanov


More information about the llvm-dev mailing list