OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [iq2000/] [setjmp.S] - Blame information for rev 455

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/* This is a simple version of setjmp and longjmp for iq2000. */
2
 
3
 
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 */
17
 
18
        sw      r29,36(r4)
19
        sw      r31,40(r4)
20
 
21
        move    r2,r0
22
 
23
        j       r31
24
 
25
        .end    setjmp
26
 
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 */
40
 
41
        lw      r29,36(r4)
42
        lw      r31,40(r4)
43
 
44
        bne     r5,r0,1f
45
        li      r5,1
46
1:
47
        move    r2,r5
48
 
49
        j       r31
50
 
51
        .end longjmp

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.