summary refs log tree commit diff
path: root/arch/sh/kernel/cpu/sh2/ex.S
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2008-07-10 01:20:03 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-07-28 18:10:34 +0900
commit6e80f5e8c4c685eb7bc34c3916e3d986b03f9981 (patch)
tree3c8768bdb748ba6b1bc923d798b1a8e3b91df4eb /arch/sh/kernel/cpu/sh2/ex.S
parentcafd63b0076b78bc8f114abbeb724c7e5f5bfe5d (diff)
downloadlinux-6e80f5e8c4c685eb7bc34c3916e3d986b03f9981.tar.gz
sh2(A) exception handler update
This patch is

By sh2
- Remove duplicate code
- Reduce stack usage
- Cleanup and little optimize

By sh2a
- Add missing handler(256 to 511)
- Use sh2a instructions handler

Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh2/ex.S')
-rw-r--r--arch/sh/kernel/cpu/sh2/ex.S15
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/sh/kernel/cpu/sh2/ex.S b/arch/sh/kernel/cpu/sh2/ex.S
index 6d285af7846c..85b0bf81fc1d 100644
--- a/arch/sh/kernel/cpu/sh2/ex.S
+++ b/arch/sh/kernel/cpu/sh2/ex.S
@@ -18,16 +18,17 @@
 exception_entry:	
 no	=	0
 	.rept	256
-	mov.l	r0,@-sp
-	mov	#no,r0
+	mov.l	r1,@-sp
 	bra	exception_trampoline
-	and	#0xff,r0
+	mov	#no,r1
 no	=	no + 1
 	.endr
 exception_trampoline:
-	mov.l	r1,@-sp
-	mov.l	$exception_handler,r1
-	jmp	@r1
+	mov.l	r0,@-sp
+	mov.l	$exception_handler,r0
+	extu.b	r1,r1
+	jmp	@r0
+	  extu.w	r1,r1
 
 	.align	2
 $exception_entry:
@@ -41,6 +42,6 @@ $exception_handler:
 ENTRY(vbr_base)
 vector	=	0
 	.rept	256
-	.long	exception_entry + vector * 8
+	.long	exception_entry + vector * 6
 vector	=	vector + 1
 	.endr