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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [or32/] [setjmp.S] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 194 jeremybenn
/* setjmp.S. Implementation of setjmp.
2 148 jeremybenn
 
3 183 jeremybenn
   Copyright (C) 2010, Embecosm Limited 
4 148 jeremybenn
 
5 183 jeremybenn
   Contributor Jeremy Bennett 
6
 
7
   This file is part of Newlib.
8
 
9
   This program is free software; you can redistribute it and/or modify it
10
   under the terms of the GNU General Public License as published by the Free
11
   Software Foundation; either version 3 of the License, or (at your option)
12
   any later version.
13
 
14
   This program is distributed in the hope that it will be useful, but WITHOUT
15
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
17
   more details.
18
 
19
   You should have received a copy of the GNU General Public License along
20
   with this program.  If not, see .            */
21
/* -------------------------------------------------------------------------- */
22
/* This program is commented throughout in a fashion suitable for processing
23
   with Doxygen.                                                              */
24
/* -------------------------------------------------------------------------- */
25
 
26
 
27
/* -------------------------------------------------------------------------- */
28
/*!_setjmp
29
 
30
   All processor state is saved in the buffer provided. We need not save r0
31
   (it will always be zero) and we need not save r11 (it will always be
32
   overridden here, and in _longjmp).
33
 
34
   @todo We should prefer to save and restore the status register, but this is
35
         not directly possible in user code. There is some merit in code to
36
         set the flag, since in compiled C code, that might be expected to hold
37
         a value. We leave a space for this information for future enhancement.
38
 
39
   @param[out] env(r3)  A buffer to save all the current processor state.
40
 
41
   @return  zero.
42
/* -------------------------------------------------------------------------- */
43 148 jeremybenn
        .align  4
44 183 jeremybenn
        .global _setjmp
45
        .type   _setjmp,@function
46
_setjmp:
47
        l.sw    4(r3),r1                /* Slot 0 saved for flag in future */
48
        l.sw    8(r3),r2
49
        l.sw    12(r3),r3
50
        l.sw    16(r3),r4
51
        l.sw    20(r3),r5
52
        l.sw    24(r3),r6
53
        l.sw    28(r3),r7
54
        l.sw    32(r3),r8
55
        l.sw    36(r3),r9
56
        l.sw    40(r3),r10              /* Skip r11 */
57 148 jeremybenn
        l.sw    44(r3),r12
58
        l.sw    48(r3),r13
59
        l.sw    52(r3),r14
60
        l.sw    56(r3),r15
61
        l.sw    60(r3),r16
62
        l.sw    64(r3),r17
63
        l.sw    68(r3),r18
64
        l.sw    72(r3),r19
65
        l.sw    76(r3),r20
66
        l.sw    80(r3),r21
67
        l.sw    84(r3),r22
68
        l.sw    88(r3),r23
69
        l.sw    92(r3),r24
70
        l.sw    96(r3),r25
71
        l.sw    100(r3),r26
72
        l.sw    104(r3),r27
73
        l.sw    108(r3),r28
74
        l.sw    112(r3),r29
75
        l.sw    116(r3),r30
76
        l.sw    120(r3),r31
77
 
78 183 jeremybenn
        l.jr    r9
79
        l.addi  r11,r0,0                /* Zero result */
80
 
81
        .size   _setjmp, .-_setjmp

powered by: WebSVN 2.1.0

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