Extend the workaround for LLVM bug 11663 to MIPS N32.

This fixes infinite recursion in /sbin/init for MIPS N32.

Submitted by:	Robert M. Kovacsics <rmk35@cam.ac.uk>
MFC after:	1 week
Sponsored by:	DARPA / AFRL
This commit is contained in:
John Baldwin 2017-08-26 00:17:57 +00:00
parent 7cb574039b
commit a9f6545f43

View File

@ -92,12 +92,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);