[PATCH] D120327: compiler-rt: Add udivmodei5 to builtins and add bitint library
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 12:46:20 PDT 2022
MaskRay added a comment.
Is there a specification for `__udivmodei5` and `__divmodei5`? How are the names picked? These function names compete with the namespace specified by libgcc and we need to be careful to prevent collision.
================
Comment at: compiler-rt/lib/bitint/CMakeLists.txt:1
+add_compiler_rt_component(bitint)
+
----------------
If lib/bitint is specific to lib/builtins, it should probably be placed in lib/builtins/
================
Comment at: compiler-rt/lib/bitint/CMakeLists.txt:11
+ PARENT_TARGET bitint)
+
----------------
delete blank line
================
Comment at: compiler-rt/lib/builtins/udivmodei5.c:19
+#ifdef IS_BITINT_LIBRARY
+#define WEAK_IF_BITINT_LIBRARY __attribute__((weak))
+#else
----------------
Can you elaborate how `WEAK_IF_BITINT_LIBRARY` is intended to be used with libgcc, libgcc.a or libgcc_s.so.1? If libgcc_s.so.1 => STB_WEAK does not affect symbol resolution and is not different from STB_GLOBAL.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120327/new/
https://reviews.llvm.org/D120327
More information about the llvm-commits
mailing list