scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

setjmp.s (849B)


      1 	.file	"setjmp.s"
      2 	.text
      3 	.global	setjmp
      4 
      5 setjmp:
      6 	/* 0) store IP int 0, then into the jmpbuf pointed to by r3 (first arg) */
      7 	mflr 0
      8 	stw 0,0(3)
      9 	/* 1) store reg1 (SP) */
     10 	stw 1, 4(3)
     11 	/* 2) store cr */
     12 	mfcr 0
     13 	stw 0,8(3)
     14 	/* 3) store r14-31 */
     15 	stw 14,12(3)
     16 	stw 15,16(3)
     17 	stw 16,20(3)
     18 	stw 17,24(3)
     19 	stw 18,28(3)
     20 	stw 19,32(3)
     21 	stw 20,36(3)
     22 	stw 21,40(3)
     23 	stw 22,44(3)
     24 	stw 23,48(3)
     25 	stw 24,52(3)
     26 	stw 25,56(3)
     27 	stw 26,60(3)
     28 	stw 27,64(3)
     29 	stw 28,68(3)
     30 	stw 29,72(3)
     31 	stw 30,76(3)
     32 	stw 31,80(3)
     33 	stfd 14,88(3)
     34 	stfd 15,96(3)
     35 	stfd 16,104(3)
     36 	stfd 17,112(3)
     37 	stfd 18,120(3)
     38 	stfd 19,128(3)
     39 	stfd 20,136(3)
     40 	stfd 21,144(3)
     41 	stfd 22,152(3)
     42 	stfd 23,160(3)
     43 	stfd 24,168(3)
     44 	stfd 25,176(3)
     45 	stfd 26,184(3)
     46 	stfd 27,192(3)
     47 	stfd 28,200(3)
     48 	stfd 29,208(3)
     49 	stfd 30,216(3)
     50 	stfd 31,224(3)
     51 
     52 	/* 4) set return value to 0 */
     53 	li 3,0
     54 
     55 	/* 5) return */
     56 	blr