blob: 4d560a533940603c6955c753b0ba34daec45f905 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_BUG_H
2#define __ASM_BUG_H
3
Ralf Baechle63dc68a2006-10-16 01:38:50 +01004#include <asm/sgidefs.h>
Ralf Baechlefdb551a2005-05-19 12:08:04 +00005
6#ifdef CONFIG_BUG
7
Linus Torvalds1da177e2005-04-16 15:20:36 -07008#include <asm/break.h>
9
10#define BUG() \
11do { \
12 __asm__ __volatile__("break %0" : : "i" (BRK_BUG)); \
13} while (0)
Ralf Baechle8592d4c2005-10-29 19:32:38 +010014
15#define HAVE_ARCH_BUG
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Ralf Baechle63dc68a2006-10-16 01:38:50 +010017#if (_MIPS_ISA > _MIPS_ISA_MIPS1)
18
19#define BUG_ON(condition) \
20do { \
21 __asm__ __volatile__("tne $0, %0" : : "r" (condition)); \
22} while (0)
23
24#define HAVE_ARCH_BUG_ON
25
26#endif /* _MIPS_ISA > _MIPS_ISA_MIPS1 */
27
Linus Torvalds1da177e2005-04-16 15:20:36 -070028#endif
Ralf Baechlefdb551a2005-05-19 12:08:04 +000029
Ralf Baechleffd099b2005-05-19 17:05:09 +000030#include <asm-generic/bug.h>
31
Ralf Baechlefdb551a2005-05-19 12:08:04 +000032#endif /* __ASM_BUG_H */