fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / iq2000 / setjmp.S
blobcb094630d8a31403f03492d5c732792d11febe2b
1 /* This is a simple version of setjmp and longjmp for iq2000. */
4 /* int setjmp (jmp_buf);  */
5         .globl  setjmp
6         .ent    setjmp
7 setjmp:
8         sw      r16,0(r4)       /* rs0 */
9         sw      r17,4(r4)       /* rs1 */
10         sw      r18,8(r4)       /* rs2 */
11         sw      r19,12(r4)      /* rs3 */
12         sw      r20,16(r4)      /* rs4 */
13         sw      r21,20(r4)      /* rs5 */
14         sw      r22,24(r4)      /* rs6 */
15         sw      r23,28(r4)      /* rs7 */
16         sw      r30,32(r4)      /* rs8 */
18         sw      r29,36(r4)
19         sw      r31,40(r4)
21         move    r2,r0
23         j       r31
25         .end    setjmp
27 /* volatile void longjmp (jmp_buf, int);  */
28         .globl  longjmp
29         .ent    longjmp
30 longjmp:
31         lw      r16,0(r4)       /* rs0 */
32         lw      r17,4(r4)       /* rs1 */
33         lw      r18,8(r4)       /* rs2 */
34         lw      r19,12(r4)      /* rs3 */
35         lw      r20,16(r4)      /* rs4 */
36         lw      r21,20(r4)      /* rs5 */
37         lw      r22,24(r4)      /* rs6 */
38         lw      r23,28(r4)      /* rs7 */
39         lw      r30,32(r4)      /* rs8 */
41         lw      r29,36(r4)
42         lw      r31,40(r4)
44         bne     r5,r0,1f
45         li      r5,1
47         move    r2,r5
49         j       r31
51         .end longjmp