1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/compiler.h>
6 #include <asm/sgidefs.h>
10 #include <asm/break.h>
12 static inline void __noreturn
BUG(void)
14 __asm__
__volatile__("break %0" : : "i" (BRK_BUG
));
20 #if (_MIPS_ISA > _MIPS_ISA_MIPS1)
22 static inline void __BUG_ON(unsigned long condition
)
24 if (__builtin_constant_p(condition
)) {
30 __asm__
__volatile__("tne $0, %0, %1"
31 : : "r" (condition
), "i" (BRK_BUG
));
34 #define BUG_ON(C) __BUG_ON((unsigned long)(C))
36 #define HAVE_ARCH_BUG_ON
38 #endif /* _MIPS_ISA > _MIPS_ISA_MIPS1 */
42 #include <asm-generic/bug.h>
44 #endif /* __ASM_BUG_H */