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

64 views
Skip to first unread message

chengzhiwei (C) via llvm-dev

unread,
Mar 18, 2020, 2:51:14 AM3/18/20
to llvm...@lists.llvm.org

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

 

Alexander Cherepanov via llvm-dev

unread,
Mar 18, 2020, 3:25:14 AM3/18/20
to chengzhiwei (C), llvm...@lists.llvm.org
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
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

Reply all
Reply to author
Forward
0 new messages