port-work; won't compile or even work
[ppcskel.git] / exception_2200.S
1 /*
2         BootMii - a Free Software replacement for the Nintendo/BroadOn bootloader.
3         Requires mini.
4         
5 Copyright (C) 2008              Segher Boessenkool <segher@kernel.crashing.org>
6
7 # This code is licensed to you under the terms of the GNU GPL, version 2;
8 # see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 */
10
11 .globl exception_2200_start, exception_2200_end
12
13 exception_2200_start:
14         # store all interesting regs
15         mfcr 0 ;  stw 0,0x2080(0)
16         mfxer 0 ; stw 0,0x2084(0)
17         mflr 0 ;  stw 0,0x2088(0)
18         mfctr 0 ; stw 0,0x208c(0)
19         mfsrr0 0 ;  stw 0,0x2090(0)
20         mfsrr1 0 ;  stw 0,0x2094(0)
21         mfdar 0 ;   stw 0,0x2098(0)
22         mfdsisr 0 ; stw 0,0x209c(0)
23
24         # switch on FP, DR, IR
25         mfmsr 0 ; ori 0,0,0x2030 ; mtsrr1 0
26
27         # go to C handler
28         lis 0,exception_handler@h ; ori 0,0,exception_handler@l ; mtsrr0 0
29         rfi
30 exception_2200_end:
31