longjmp.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * libc/sysdeps/linux/v850/longjmp.S -- `longjmp' for v850
  3. *
  4. * Copyright (C) 2001 NEC Corporation
  5. * Copyright (C) 2001 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(__longjmp):
  19. /* Save registers */
  20. mov r6, ep
  21. sld.w 0[ep], sp
  22. sld.w 4[ep], lp
  23. sld.w 8[ep], r2
  24. sld.w 12[ep], r20
  25. sld.w 16[ep], r21
  26. sld.w 20[ep], r22
  27. sld.w 24[ep], r23
  28. sld.w 28[ep], r24
  29. sld.w 32[ep], r25
  30. sld.w 36[ep], r26
  31. sld.w 40[ep], r27
  32. sld.w 44[ep], r28
  33. sld.w 48[ep], r29
  34. mov 1, r10 // return val
  35. jmp [lp]
  36. C_END(__longjmp)
  37. .weak C_SYMBOL_NAME(longjmp)
  38. C_SYMBOL_NAME(longjmp) = C_SYMBOL_NAME(__longjmp)
  39. .weak C_SYMBOL_NAME(siglongjmp)
  40. C_SYMBOL_NAME(siglongjmp) = C_SYMBOL_NAME(__longjmp)
  41. .weak C_SYMBOL_NAME(__sigprocmask)
  42. C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask)