2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
10 # $Id: handler.S 595 2004-09-21 13:35:48Z pixel $
14 #include "as_reg_compat.h"
16 #define GENERAL_ATSAVE 0x400
17 #define GENERAL_SRSAVE
19 .global def_exc_handler
72 #lw $a0, 0x404($0) # saved EPC
77 #lw $a0, 0x408($0) # saved SR
82 mfc0 $a0
, $
8 # BadVaddr
89 #lw $a0, 0x40c($0) # saved Cause
146 mtc0 $k1
, $
12 /* restore SR */
149 lw $k0
, 0x410($
0) /* k0 saved here by exception prologue (at 0x80) */
155 .global bp_exc_handler
204 #lw $a0, 0x424($0) # saved EPC
209 #lw $a0, 0x42c($0) # saved SR
214 mfc0 $a0
, $
8 # BadVaddr
218 lw $a0
, 0x430($
0) # saved DCIC
223 #lw $a0, 0x428($0) # saved Cause
285 mtc0 $k1
, $
12 /* restore SR */
288 lw $k0
, 0x420($
0) /* k0 saved here by debug exception prologue (at 0x40) */