Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v2.6.12 29 lines 525 B view raw
1/* 2 * Copyright (C) 1996 Paul Mackerras. 3 * 4 * NB this file must be compiled with -O2. 5 */ 6 7int 8xmon_setjmp(long *buf) 9{ 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; 17} 18 19void 20xmon_longjmp(long *buf, int val) 21{ 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)); 29}