ex.S 821 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * arch/sh/kernel/cpu/sh2/ex.S
  3. *
  4. * The SH-2 exception vector table
  5. *
  6. * Copyright (C) 2005 Yoshinori Sato
  7. *
  8. * This file is subject to the terms and conditions of the GNU General Public
  9. * License. See the file "COPYING" in the main directory of this archive
  10. * for more details.
  11. */
  12. #include <linux/linkage.h>
  13. !
  14. ! convert Exception Vector to Exception Number
  15. !
  16. exception_entry:
  17. no = 0
  18. .rept 256
  19. mov.l r1,@-sp
  20. bra exception_trampoline
  21. mov #no,r1
  22. no = no + 1
  23. .endr
  24. exception_trampoline:
  25. mov.l r0,@-sp
  26. mov.l $exception_handler,r0
  27. extu.b r1,r1
  28. jmp @r0
  29. extu.w r1,r1
  30. .align 2
  31. $exception_entry:
  32. .long exception_entry
  33. $exception_handler:
  34. .long exception_handler
  35. !
  36. ! Exception Vector Base
  37. !
  38. .align 2
  39. ENTRY(vbr_base)
  40. vector = 0
  41. .rept 256
  42. .long exception_entry + vector * 6
  43. vector = vector + 1
  44. .endr