[llvm-dev] For mingw64 target, crash on cast int128 to double

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 24 17:18:36 PST 2020


Apparently I applied a fix for a similar issue back in 2014:
http://github.com/llvm/llvm-project/commit/4a406d32e97b1748c4eed6674a2c1819b9cf98ea
Of course, I had no memory of doing this until I started digging again. :)
It would be nice to come up with a more general solution to this problem.


On Thu, Oct 29, 2020 at 12:36 AM Алексей Полушин via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Code:
>
> __int128 v = 12345;
> int main() {
>     printf("%g", (double)v);
> }
>
> Compile: clang --target=x86_64-w64-mingw32 ...
>
> Segfault in libgcc function __floattidf
>
> gcc pass to __floattidf address of value in rdx, and clang pass value
> itself in rdx:r8
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201124/cf734459/attachment.html>


More information about the llvm-dev mailing list