[libcxx-commits] [PATCH] D134912: [libc++] Disable int128_t and ship filesystem on Windows by default

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 29 23:41:40 PDT 2022


mstorsjo added a comment.

In D134912#3826133 <https://reviews.llvm.org/D134912#3826133>, @Mordante wrote:

> Are you sure it's not available yet? I think 128 bit support has been by @CaseyCarter.
> https://github.com/microsoft/STL/blob/main/stl/inc/__msvc_int128.hpp

AFAIK that's a different thing. That's a C++ class implementation of operations on 128 integers, based on smaller integers. For libc++'s part, it just uses plain Clang's `__int128_t` raw data type, which Clang/LLVM generally can generate code for just fine. The problem is that whenever there's a division involved, Clang/LLVM doesn't generate inline code for doing the division, and expects to call the libgcc/compiler-rt builtin `__divti3` (and a couple others). For other targets, libgcc or compiler-rt provide the implementation of this function, but for MSVC based environments, it's not available.

There has been discussions of ways of making compiler-rt builtins practically usable in a MSVC environment, and/or Microsoft even shipping those relevant builtins as part of the regular vcruntime libraries that are used in MSVC environments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134912/new/

https://reviews.llvm.org/D134912



More information about the libcxx-commits mailing list