=================================================================== RCS file: /cvs/funnyos/arch/testarm/boot/loader.S,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- funnyos/arch/testarm/boot/loader.S 2007/11/04 22:39:27 1.3 +++ funnyos/arch/testarm/boot/loader.S 2007/11/05 18:54:35 1.4 @@ -1,5 +1,5 @@ /* - * $Id: loader.S,v 1.3 2007/11/04 22:39:27 init Exp $ + * $Id: loader.S,v 1.4 2007/11/05 18:54:35 init Exp $ */ /* * FunnyOS loader @@ -61,13 +61,17 @@ nop _vector_irq: + /* decrement pc by one insn */ + sub lr, lr, #4 + /* store all system mode registers */ + stmdb sp!, {r0-r12, lr} + bl irq_trampoline - mrs r0, spsr - msr cpsr, r0 - - subs pc, r14, #4 + /* load r0-r12 and pc from the stack */ + /* note ^ that copies SPSR into CPSR */ + ldmia sp!, {r0-r12, pc}^ _vector_fiq: nop