setjmp.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * libc/sysdeps/linux/v850/setjmp.S -- `setjmp' for v850
  3. *
  4. * Copyright (C) 2001,2002 NEC Corporation
  5. * Copyright (C) 2001,2002 Miles Bader <miles@gnu.org>
  6. *
  7. * This file is subject to the terms and conditions of the GNU Lesser
  8. * General Public License. See the file COPYING.LIB in the main
  9. * directory of this archive for more details.
  10. *
  11. * Written by Miles Bader <miles@gnu.org>
  12. */
  13. #define _SETJMP_H
  14. #define _ASM
  15. #include <bits/setjmp.h>
  16. #include <clinkage.h>
  17. .text
  18. C_ENTRY(setjmp):
  19. mov 1, r7 /* Save the signal mask. */
  20. br C_SYMBOL_NAME(__sigsetjmp)
  21. .globl C_SYMBOL_NAME(_setjmp)
  22. C_SYMBOL_NAME(_setjmp):
  23. mov 0, r7 /* Don't save the signal mask. */
  24. .globl C_SYMBOL_NAME(__sigsetjmp)
  25. C_SYMBOL_NAME(__sigsetjmp):
  26. /* Save registers */
  27. mov r6, ep
  28. sst.w sp, 0[ep]
  29. sst.w lp, 4[ep]
  30. sst.w r2, 8[ep]
  31. sst.w r20, 12[ep]
  32. sst.w r21, 16[ep]
  33. sst.w r22, 20[ep]
  34. sst.w r23, 24[ep]
  35. sst.w r24, 28[ep]
  36. sst.w r25, 32[ep]
  37. sst.w r26, 36[ep]
  38. sst.w r27, 40[ep]
  39. sst.w r28, 44[ep]
  40. sst.w r29, 48[ep]
  41. /* Make a tail call to __sigjmp_save; it takes the same args. */
  42. jr C_SYMBOL_NAME(__sigjmp_save)
  43. C_END(setjmp)