chengzhiwei (C) via llvm-dev
2020-Mar-18 06:50 UTC
[llvm-dev] [compiler-rt] Support 128 bits soft-floating point without int128_t support
Hi, all: 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)。 So do anyone have a different solution to support long-double fp operation? zhiwei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200318/cf05a582/attachment.html>
Alexander Cherepanov via llvm-dev
2020-Mar-18 07:24 UTC
[llvm-dev] [compiler-rt] Support 128 bits soft-floating point without int128_t support
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