__longjmp.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 <libc-symbols.h>
  18. .text
  19. .globl C_SYMBOL_NAME(__longjmp)
  20. .align 4
  21. C_SYMBOL_NAME(__longjmp):
  22. /* load registers from memory to r5 (arg0) */
  23. lwi r1, r5, 0
  24. lwi r15, r5, 4
  25. lwi r2, r5, 8
  26. lwi r13, r5, 12
  27. lwi r18, r5, 16
  28. lwi r19, r5, 20
  29. lwi r20, r5, 24
  30. lwi r21, r5, 28
  31. lwi r22, r5, 32
  32. lwi r23, r5, 36
  33. lwi r24, r5, 40
  34. lwi r25, r5, 44
  35. lwi r26, r5, 48
  36. lwi r27, r5, 52
  37. lwi r28, r5, 56
  38. lwi r29, r5, 60
  39. lwi r30, r5, 64
  40. lwi r31, r5, 68
  41. addi r3, r0, 1 /* return val */
  42. rtsd r15, 8 /* normal return */
  43. nop
  44. libc_hidden_def(__longjmp)