OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [machine/] [or32/] [setjmp.S] - Diff between revs 207 and 399

Show entire file | Details | Blame | View Log

Rev 207 Rev 399
Line 23... Line 23...
   with Doxygen.                                                              */
   with Doxygen.                                                              */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
 
 
 
 
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/*!_setjmp
/*!setjmp
 
 
   All processor state is saved in the buffer provided. We need not save r0
   All processor state is saved in the buffer provided. We need not save r0
   (it will always be zero) and we need not save r11 (it will always be
   (it will always be zero) and we need not save r11 (it will always be
   overridden here, and in _longjmp).
   overridden here, and in longjmp).
 
 
   @todo We should prefer to save and restore the status register, but this is
   @todo We should prefer to save and restore the status register, but this is
         not directly possible in user code. There is some merit in code to
         not directly possible in user code. There is some merit in code to
         set the flag, since in compiled C code, that might be expected to hold
         set the flag, since in compiled C code, that might be expected to hold
         a value. We leave a space for this information for future enhancement.
         a value. We leave a space for this information for future enhancement.
Line 39... Line 39...
   @param[out] env(r3)  A buffer to save all the current processor state.
   @param[out] env(r3)  A buffer to save all the current processor state.
 
 
   @return  zero.
   @return  zero.
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
        .align  4
        .align  4
        .global _setjmp
        .global setjmp
        .type   _setjmp,@function
        .type   setjmp,@function
_setjmp:
setjmp:
        l.sw    4(r3),r1                /* Slot 0 saved for flag in future */
        l.sw    4(r3),r1                /* Slot 0 saved for flag in future */
        l.sw    8(r3),r2
        l.sw    8(r3),r2
        l.sw    12(r3),r3
        l.sw    12(r3),r3
        l.sw    16(r3),r4
        l.sw    16(r3),r4
        l.sw    20(r3),r5
        l.sw    20(r3),r5
Line 76... Line 76...
        l.sw    120(r3),r31
        l.sw    120(r3),r31
 
 
        l.jr    r9
        l.jr    r9
        l.addi  r11,r0,0                /* Zero result */
        l.addi  r11,r0,0                /* Zero result */
 
 
        .size   _setjmp, .-_setjmp
        .size   setjmp, .-setjmp
        .size   setjmp, .-setjmp
        .size   setjmp, .-setjmp

powered by: WebSVN 2.1.0

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