linux/arch/sh/kernel/cpu/sh2a/ex.S
<<
>>
Prefs
   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
  13#include <linux/linkage.h>
  14
  15!
  16! convert Exception Vector to Exception Number
  17!
  18
  19! exception no 0 to 255
  20exception_entry0:
  21no      =       0
  22        .rept   256
  23        mov.l   r1,@-sp
  24        bra     exception_trampoline0
  25        mov     #no,r1
  26no      =       no + 1
  27        .endr
  28exception_trampoline0:
  29        mov.l   r0,@-sp
  30        mov.l   1f,r0
  31        extu.b  r1,r1
  32        jmp     @r0
  33          extu.w        r1,r1
  34         
  35        .align  2
  361:      .long   exception_handler
  37
  38! exception no 256 to 511
  39exception_entry1:
  40no      =       0
  41        .rept   256
  42        mov.l   r1,@-sp
  43        bra     exception_trampoline1
  44        mov     #no,r1
  45no      =       no + 1
  46        .endr
  47exception_trampoline1:
  48        mov.l   r0,@-sp
  49        extu.b  r1,r1
  50        movi20  #0x100,r0
  51        add     r0,r1
  52        mov.l   1f,r0
  53        jmp     @r0
  54          extu.w        r1,r1
  55        
  56        .align  2
  571:      .long   exception_handler
  58
  59        !
  60! Exception Vector Base
  61!
  62        .align  2
  63ENTRY(vbr_base)
  64vector  =       0
  65        .rept   256
  66        .long   exception_entry0 + vector * 6
  67vector  =       vector + 1
  68        .endr
  69        .rept   256
  70        .long   exception_entry1 + vector * 6
  71vector  =       vector + 1
  72        .endr
  73