setjmp.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * libc/sysdeps/linux/nios2/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. #include <features.h>
  14. #include <jmpbuf-offsets.h>
  15. .globl __sigsetjmp
  16. .type __sigsetjmp,@function
  17. .balign 4
  18. __sigsetjmp:
  19. stw r16, (JB_REGS+ 0)(r4)
  20. stw r17, (JB_REGS+ 4)(r4)
  21. stw r18, (JB_REGS+ 8)(r4)
  22. stw r19, (JB_REGS+12)(r4)
  23. stw r20, (JB_REGS+16)(r4)
  24. stw r21, (JB_REGS+20)(r4)
  25. stw r22, (JB_REGS+24)(r4)
  26. stw r23, (JB_REGS+28)(r4)
  27. stw ra, JB_PC(r4)
  28. stw sp, JB_SP(r4)
  29. stw fp, JB_FP(r4)
  30. stw gp, JB_GP(r4)
  31. #ifdef __UCLIBC_HAS_FPU__
  32. SAVE_FPU r4 JB_FPREGS
  33. #endif
  34. #ifdef __PIC__
  35. /* just pray 16 bit offset is enough */
  36. br __sigjmp_save
  37. #else
  38. movhi r8, %hi(__sigjmp_save)
  39. ori r8, r8, %lo(__sigjmp_save)
  40. jmp r8
  41. #endif
  42. .size __sigsetjmp,.-__sigsetjmp