diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-15 15:52:54 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-08-15 15:52:54 +0000 |
commit | 63212628543e4f7e6b2e7a30c8c815231d1d3140 (patch) | |
tree | a4faf3ae046d56019332ffad4fb22a8b5d1c4f74 /firmware/target/mips/ingenic_jz47xx/crt0.S | |
parent | 57c0b6a4740d7a900dff7ff0230da1c7942a46b0 (diff) |
Jz4740: get exception handling working
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18287 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/crt0.S')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/crt0.S | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/crt0.S b/firmware/target/mips/ingenic_jz47xx/crt0.S index 3d2308a578..b9ffde3b65 100644 --- a/firmware/target/mips/ingenic_jz47xx/crt0.S +++ b/firmware/target/mips/ingenic_jz47xx/crt0.S @@ -135,15 +135,14 @@ except_common_entry: nop nop nop - + .fill 0x20 + .extern _int .extern _exception .global real_exception_handler .type real_exception_handler,@function .set noreorder real_exception_handler: - - addiu sp, -0x80 sw ra, 0(sp) sw fp, 4(sp) @@ -196,8 +195,7 @@ real_exception_handler: and k0, k1 beq zero, k0, _int nop - la k0, _exception - jr k0 + j _exception nop .global _int @@ -261,9 +259,17 @@ _int: .global _exception .type _exception,@function _exception: - move a0, sp + add a0, sp, $0 mfc0 a1, C0_CAUSE # C0_CAUSE of last exception + sll zero, 1 + sll zero, 1 + sll zero, 1 + sll zero, 1 mfc0 a2, C0_EPC # Exception Program Counter + sll zero, 1 + sll zero, 1 + sll zero, 1 + sll zero, 1 la k0, exception_handler jr k0 nop |