• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef __ASM_SH_BUG_H
13 #define __ASM_SH_BUG_H
14 
15 #define TRAPA_BUG_OPCODE 0xc33e
16 
17 #define HAVE_ARCH_BUG
18 #define HAVE_ARCH_WARN_ON
19 
20 #define _EMIT_BUG_ENTRY   "\t.pushsection __bug_table,\"a\"\n"   "2:\t.long 1b\n"   "\t.short %O3\n"   "\t.org 2b+%O4\n"   "\t.popsection\n"
21 
22 #define BUG()  do {   __asm__ __volatile__ (   "1:\t.short %O0\n"   _EMIT_BUG_ENTRY   :   : "n" (TRAPA_BUG_OPCODE),   "i" (__FILE__),   "i" (__LINE__), "i" (0),   "i" (sizeof(struct bug_entry)));  } while (0)
23 
24 #define __WARN()  do {   __asm__ __volatile__ (   "1:\t.short %O0\n"   _EMIT_BUG_ENTRY   :   : "n" (TRAPA_BUG_OPCODE),   "i" (__FILE__),   "i" (__LINE__),   "i" (BUGFLAG_WARNING),   "i" (sizeof(struct bug_entry)));  } while (0)
25 
26 #define WARN_ON(x) ({   int __ret_warn_on = !!(x);   if (__builtin_constant_p(__ret_warn_on)) {   if (__ret_warn_on)   __WARN();   } else {   if (unlikely(__ret_warn_on))   __WARN();   }   unlikely(__ret_warn_on);  })
27 
28 #include <asm-generic/bug.h>
29 
30 #endif
31