[TG3]: Set minimal hw interrupt mitigation.
[linux-2.6/verdex.git] / arch / ppc / xmon / setjmp.c
blob28352bac2ae66207cf766e54aa13d1e4808a5eca
1 /*
2 * Copyright (C) 1996 Paul Mackerras.
4 * NB this file must be compiled with -O2.
5 */
7 int
8 xmon_setjmp(long *buf)
10 asm ("mflr 0; stw 0,0(%0);"
11 "stw 1,4(%0); stw 2,8(%0);"
12 "mfcr 0; stw 0,12(%0);"
13 "stmw 13,16(%0)"
14 : : "r" (buf));
15 /* XXX should save fp regs as well */
16 return 0;
19 void
20 xmon_longjmp(long *buf, int val)
22 if (val == 0)
23 val = 1;
24 asm ("lmw 13,16(%0);"
25 "lwz 0,12(%0); mtcrf 0x38,0;"
26 "lwz 0,0(%0); lwz 1,4(%0); lwz 2,8(%0);"
27 "mtlr 0; mr 3,%1"
28 : : "r" (buf), "r" (val));