bug.h 862 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __ASM_CRISv32_ARCH_BUG_H
  2. #define __ASM_CRISv32_ARCH_BUG_H
  3. #include <linux/stringify.h>
  4. #ifdef CONFIG_BUG
  5. #ifdef CONFIG_DEBUG_BUGVERBOSE
  6. /*
  7. * The penalty for the in-band code path will be the size of break 14.
  8. * All other stuff is done out-of-band with exception handlers.
  9. */
  10. #define BUG() \
  11. __asm__ __volatile__ ("0: break 14\n\t" \
  12. ".section .fixup,\"ax\"\n" \
  13. "1:\n\t" \
  14. "move.d %0, $r10\n\t" \
  15. "move.d %1, $r11\n\t" \
  16. "jump do_BUG\n\t" \
  17. "nop\n\t" \
  18. ".previous\n\t" \
  19. ".section __ex_table,\"a\"\n\t" \
  20. ".dword 0b, 1b\n\t" \
  21. ".previous\n\t" \
  22. : : "ri" (__FILE__), "i" (__LINE__))
  23. #else
  24. #define BUG() __asm__ __volatile__ ("break 14\n\t")
  25. #endif
  26. #define HAVE_ARCH_BUG
  27. #endif
  28. #include <asm-generic/bug.h>
  29. #endif