setjmp.S 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * libc/sysdeps/linux/microblaze/setjmp.S -- `setjmp' for microblaze
  3. *
  4. * Copyright (C) 2003 John Williams <jwilliams@itee.uq.edu.au>
  5. * Copyright (C) 2001,2002 NEC Corporation
  6. * Copyright (C) 2001,2002 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. * PIC code based on glibc 2.3.6 */
  15. /*
  16. The GNU C Library is free software; you can redistribute it and/or
  17. modify it under the terms of the GNU Lesser General Public
  18. License as published by the Free Software Foundation; either
  19. version 2.1 of the License, or (at your option) any later version.
  20. The GNU C Library is distributed in the hope that it will be useful,
  21. but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  23. Lesser General Public License for more details.
  24. You should have received a copy of the GNU Lesser General Public
  25. License along with the GNU C Library; if not, see
  26. <http://www.gnu.org/licenses/>. */
  27. #include <sysdep.h>
  28. ENTRY(_setjmp)
  29. addik r6, r0, 0
  30. END(_setjmp)
  31. libc_hidden_def(_setjmp)
  32. ENTRY(setjmp)
  33. brid 1f
  34. addik r6, r0, 1
  35. END(setjmp)
  36. libc_hidden_def(setjmp)
  37. ENTRY(__sigsetjmp)
  38. 1:
  39. swi r1, r5, 0 /* stack pointer */
  40. swi r15, r5, 4 /* link register */
  41. swi r2, r5, 8 /* SDA and SDA2 ptrs */
  42. swi r13, r5, 12
  43. swi r18, r5, 16 /* assembler temp */
  44. swi r19, r5, 20 /* now call-preserved regs */
  45. swi r20, r5, 24
  46. swi r21, r5, 28
  47. swi r22, r5, 32
  48. swi r23, r5, 36
  49. swi r24, r5, 40
  50. swi r25, r5, 44
  51. swi r26, r5, 48
  52. swi r27, r5, 52
  53. swi r28, r5, 56
  54. swi r29, r5, 60
  55. swi r30, r5, 64
  56. swi r31, r5, 68
  57. bri __sigjmp_save
  58. END(__sigsetjmp)
  59. libc_hidden_def(__sigsetjmp)