summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2017-09-20 20:59:28 +0000
committerjhb <jhb@FreeBSD.org>2017-09-20 20:59:28 +0000
commit2c9b154d3969efc7124851fbe4167b4f43f4ddc1 (patch)
tree3a05691c0cc2e9a76cd51d8c955b6db26388c327
parent253f5e9111f6a9fbc1f5b7baac73eea84438ff4d (diff)
downloadFreeBSD-src-2c9b154d3969efc7124851fbe4167b4f43f4ddc1.zip
FreeBSD-src-2c9b154d3969efc7124851fbe4167b4f43f4ddc1.tar.gz
MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32.
This fixes infinite recursion in /sbin/init for MIPS N32. Sponsored by: DARPA / AFRL
-rw-r--r--contrib/compiler-rt/lib/builtins/int_lib.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/compiler-rt/lib/builtins/int_lib.h b/contrib/compiler-rt/lib/builtins/int_lib.h
index 09f27f8..a449d11 100644
--- a/contrib/compiler-rt/lib/builtins/int_lib.h
+++ b/contrib/compiler-rt/lib/builtins/int_lib.h
@@ -95,12 +95,13 @@
* does not have dedicated bit counting instructions.
*/
#if defined(__FreeBSD__) && (defined(__sparc64__) || \
- defined(__mips_n64) || defined(__mips_o64) || defined(__riscv__))
+ defined(__mips_n32) || defined(__mips_n64) || defined(__mips_o64) || \
+ defined(__riscv__))
si_int __clzsi2(si_int);
si_int __ctzsi2(si_int);
#define __builtin_clz __clzsi2
#define __builtin_ctz __ctzsi2
-#endif /* FreeBSD && (sparc64 || mips_n64 || mips_o64) */
+#endif /* FreeBSD && (sparc64 || mips_n32 || mips_n64 || mips_o64 || riscv) */
COMPILER_RT_ABI si_int __paritysi2(si_int a);
COMPILER_RT_ABI si_int __paritydi2(di_int a);
OpenPOWER on IntegriCloud