ex.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * arch/sh/kernel/cpu/sh2a/ex.S
  3. *
  4. * The SH-2A exception vector table
  5. *
  6. * Copyright (C) 2008 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 no 0 to 255
  17. exception_entry0:
  18. no = 0
  19. .rept 256
  20. mov.l r1,@-sp
  21. bra exception_trampoline0
  22. mov #no,r1
  23. no = no + 1
  24. .endr
  25. exception_trampoline0:
  26. mov.l r0,@-sp
  27. mov.l 1f,r0
  28. extu.b r1,r1
  29. jmp @r0
  30. extu.w r1,r1
  31. .align 2
  32. 1: .long exception_handler
  33. ! exception no 256 to 511
  34. exception_entry1:
  35. no = 0
  36. .rept 256
  37. mov.l r1,@-sp
  38. bra exception_trampoline1
  39. mov #no,r1
  40. no = no + 1
  41. .endr
  42. exception_trampoline1:
  43. mov.l r0,@-sp
  44. extu.b r1,r1
  45. movi20 #0x100,r0
  46. add r0,r1
  47. mov.l 1f,r0
  48. jmp @r0
  49. extu.w r1,r1
  50. .align 2
  51. 1: .long exception_handler
  52. !
  53. ! Exception Vector Base
  54. !
  55. .align 2
  56. ENTRY(vbr_base)
  57. vector = 0
  58. .rept 256
  59. .long exception_entry0 + vector * 6
  60. vector = vector + 1
  61. .endr
  62. vector = 0
  63. .rept 256
  64. .long exception_entry1 + vector * 6
  65. vector = vector + 1
  66. .endr