diff options
author | 2019-01-29 22:35:43 +0000 | |
---|---|---|
committer | 2019-01-29 22:35:43 +0000 | |
commit | 64bb0428c690670660f6397e66ca194e512556ae (patch) | |
tree | 9897a6785a6c40cf0bb4f0b680a49cb4ea433f49 /lib/libcompiler_rt/clzdi2.c | |
parent | replace some archaic quotes with plain variations. (diff) | |
download | wireguard-openbsd-64bb0428c690670660f6397e66ca194e512556ae.tar.xz wireguard-openbsd-64bb0428c690670660f6397e66ca194e512556ae.zip |
Update compiler-rt to 7.0.1. This is mostly a cosmetic update since
most changes are guarded behind WIN32 or GCC ifdefs. The functional
change is in emutls and AMD model checking.
ok kettenis@
Diffstat (limited to 'lib/libcompiler_rt/clzdi2.c')
-rw-r--r-- | lib/libcompiler_rt/clzdi2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libcompiler_rt/clzdi2.c b/lib/libcompiler_rt/clzdi2.c index b9e64da492b..b56d98f5c01 100644 --- a/lib/libcompiler_rt/clzdi2.c +++ b/lib/libcompiler_rt/clzdi2.c @@ -16,6 +16,12 @@ /* Returns: the number of leading 0-bits */ +#if !defined(__clang__) && (defined(__sparc64__) || defined(__mips64) || defined(__riscv__)) +/* gcc resolves __builtin_clz -> __clzdi2 leading to infinite recursion */ +#define __builtin_clz(a) __clzsi2(a) +extern si_int __clzsi2(si_int); +#endif + /* Precondition: a != 0 */ COMPILER_RT_ABI si_int |