[llvm-dev] (Question regarding the) incomplete "builtins library" of "Compiler-RT"

Stefan Kanthak via llvm-dev llvm-dev at lists.llvm.org
Fri Nov 30 08:31:39 PST 2018


Hi @ll,

compiler-rt implements (for example) the MSVC (really Windows)
specific routines compiler-rt/lib/builtins/i386/chkstk.S and
compiler-rt/lib/builtins/x86_64/chkstk.S as __chkstk_ms()
See <http://msdn.microsoft.com/en-us/library/ms648426.aspx>

Is there any special reason why compiler-rt doesn't implement
other MSVC specific functions (alias builtins or "compiler
intrinsics") for which clang/LLVM but generates calls?
See <https://godbolt.org/z/ZsHmaf> for example

* unsigned 64-bit integer operations: _aulldiv(), _aulldvrm(),
  _aullrem(), _aullshr()?
  See <https://msdn.microsoft.com/en-us/library/mt703294.aspx>

* signed 64-bit integer operations: _alldiv(), _alldvrm(),
  _allrem(), _allshl(), _allshr(), _allmul()?
  See <https://msdn.microsoft.com/en-us/library/ms648425.aspx>

For the following I'm not sure whether LLVM/clang calls them:

* trigonometric and transcendental floating-point operations:
  _CIacos(), _CIasin(), _CIatan(), _CIatan2(), _CIcos(),
  _CIcosh(), _CIexp(), _CIfmod(), _CIlog(), _CIlog10(),
  _CIpow(), _CIsin(), _CIsinh(), _CIsqrt(), _CItan(), _CItanh()?
  See <https://msdn.microsoft.com/en-us/library/ff770582.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770581.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770589.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770600.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770591.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770580.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770578.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770583.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770597.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770588.aspx>,
  <https://msdn.microsoft.com/en-us/library/ff770595.aspx>

regards
Stefan Kanthak

PS: Howard Hinnant, (one of) the original author of the builtins
    library, is still listed in compiler-rt/CODE_OWNERS.TXT,
    despite having left this project about TEN years ago!
    To quote himself:
| I haven't worked on compiler_rt in any way for at least a decade.
| Sorry for your poor experience working on this open source project.


More information about the llvm-dev mailing list