setjmp.S 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #include <clinkage.h>
  14. .text
  15. C_ENTRY(setjmp):
  16. mov 1, r7 /* Save the signal mask. */
  17. br C_SYMBOL_NAME(__sigsetjmp)
  18. .globl C_SYMBOL_NAME(_setjmp)
  19. C_SYMBOL_NAME(_setjmp):
  20. mov 0, r7 /* Don't save the signal mask. */
  21. .globl C_SYMBOL_NAME(__sigsetjmp)
  22. C_SYMBOL_NAME(__sigsetjmp):
  23. /* Save registers */
  24. mov r6, ep
  25. sst.w sp, 0[ep]
  26. sst.w lp, 4[ep]
  27. sst.w r2, 8[ep]
  28. sst.w r20, 12[ep]
  29. sst.w r21, 16[ep]
  30. sst.w r22, 20[ep]
  31. sst.w r23, 24[ep]
  32. sst.w r24, 28[ep]
  33. sst.w r25, 32[ep]
  34. sst.w r26, 36[ep]
  35. sst.w r27, 40[ep]
  36. sst.w r28, 44[ep]
  37. sst.w r29, 48[ep]
  38. /* Make a tail call to __sigjmp_save; it takes the same args. */
  39. jr C_SYMBOL_NAME(__sigjmp_save)
  40. C_END(setjmp)