bsd-_setjmp.S 1011 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * libc/sysdeps/linux/nios2/bsd-_setjmp.S
  3. *
  4. * Copyright (C) 2004,05,06 Microtronix Datacom Ltd
  5. *
  6. * This file is subject to the terms and conditions of the GNU Lesser
  7. * General Public License. See the file COPYING.LIB in the main
  8. * directory of this archive for more details.
  9. *
  10. * Written by Wentao Xu <wentao@microtronix.com>
  11. *
  12. */
  13. #define _ASM
  14. #define _SETJMP_H
  15. #include <bits/setjmp.h>
  16. .globl _setjmp
  17. .type _setjmp,@function
  18. .balign 4
  19. _setjmp:
  20. stw r16, (JB_REGS+ 0)(r4)
  21. stw r17, (JB_REGS+ 4)(r4)
  22. stw r18, (JB_REGS+ 8)(r4)
  23. stw r19, (JB_REGS+12)(r4)
  24. stw r20, (JB_REGS+16)(r4)
  25. stw r21, (JB_REGS+20)(r4)
  26. stw r22, (JB_REGS+24)(r4)
  27. stw r23, (JB_REGS+28)(r4)
  28. stw ra, JB_PC(r4)
  29. stw sp, JB_SP(r4)
  30. stw fp, JB_FP(r4)
  31. stw gp, JB_GP(r4)
  32. #if defined(__HAVE_FPU__)
  33. SAVE_FPU r4 JB_FPREGS
  34. #endif
  35. stw r0, JB_SIZE(r4) /* signal mask is not saved */
  36. mov r2, zero
  37. ret