longjmp.S 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * libc/sysdeps/linux/microblaze/longjmp.S -- `longjmp' for microblaze
  3. *
  4. * Copyright (C) 2003 John Williams <jwilliams@itee.uq.edu.au>
  5. * Copyright (C) 2001 NEC Corporation
  6. * Copyright (C) 2001 Miles Bader <miles@gnu.org>
  7. *
  8. * This file is subject to the terms and conditions of the GNU Lesser
  9. * General Public License. See the file COPYING.LIB in the main
  10. * directory of this archive for more details.
  11. *
  12. * Written by Miles Bader <miles@gnu.org>
  13. */
  14. #define _SETJMP_H
  15. #define _ASM
  16. #include <bits/setjmp.h>
  17. #include <clinkage.h>
  18. .text
  19. C_ENTRY(__longjmp):
  20. /* load registers from memory to r5 (arg0)*/
  21. lwi r1, r5, 0
  22. lwi r15, r5, 4
  23. lwi r18, r5, 8
  24. lwi r19, r5, 12
  25. lwi r20, r5, 16
  26. lwi r21, r5, 20
  27. lwi r22, r5, 24
  28. lwi r23, r5, 28
  29. lwi r24, r5, 32
  30. lwi r25, r5, 36
  31. lwi r26, r5, 40
  32. lwi r27, r5, 44
  33. lwi r28, r5, 48
  34. lwi r29, r5, 52
  35. lwi r30, r5, 56
  36. addi r3, r0, 1 // return val
  37. rtsd r15, 8 // normal return
  38. nop
  39. C_END(__longjmp)
  40. .weak C_SYMBOL_NAME(longjmp)
  41. C_SYMBOL_NAME(longjmp) = C_SYMBOL_NAME(__longjmp)
  42. .weak C_SYMBOL_NAME(siglongjmp)
  43. C_SYMBOL_NAME(siglongjmp) = C_SYMBOL_NAME(__longjmp)
  44. .weak C_SYMBOL_NAME(__sigprocmask)
  45. C_SYMBOL_NAME(__sigprocmask) = C_SYMBOL_NAME(sigprocmask)