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/] [m88k/] [setjmp.S] - Blame information for rev 407

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.
2
 
3
   Ian Lance Taylor, Cygnus Support, 15 July 1993.  */
4
 
5
/* We need to save the address of the return instruction, which is in
6
   r1, as well as general register r14 through r25.  If we are
7
   compiling for the 88110 with the extended register file, we also
8
   need to save registers x22 through x29.  The jmp_buf should be 52
9
   bytes long in the one case, 84 bytes in the other.  */
10
 
11
/* int setjmp (jmp_buf);  */
12
        globl   _setjmp
13
_setjmp:
14
        st      r1,r2,0
15
        st.d    r14,r2,4
16
        st.d    r16,r2,12
17
        st.d    r18,r2,20
18
        st.d    r20,r2,28
19
        st.d    r22,r2,36
20
        st.d    r24,r2,44
21
#ifdef __m88110__
22
        /* These instructions are just a guess, and gas doesn't
23
           support them anyhow.  */
24
        st.d    x22,r2,52
25
        st.d    x24,r2,60
26
        st.d    x26,r2,68
27
        st.d    x28,r2,76
28
#endif
29
        jmp     r1
30
 
31
        global  _longjmp
32
_longjmp:
33
        ld      r1,r2,0
34
        ld.d    r14,r2,4
35
        ld.d    r16,r2,12
36
        ld.d    r18,r2,20
37
        ld.d    r20,r2,28
38
        ld.d    r22,r2,36
39
        ld.d    r24,r2,44
40
#ifdef __m88110__
41
        /* These instructions are just a guess, and gas doesn't
42
           support them anyhow.  */
43
        ld.d    x22,r2,52
44
        ld.d    x24,r2,60
45
        ld.d    x26,r2,68
46
        ld.d    x28,r2,76
47
#endif
48
        jmp     r1

powered by: WebSVN 2.1.0

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