setjmp.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* setjmp for or1k
  2. Based on:
  3. setjmp for PowerPC.
  4. Copyright (C) 2014 Free Software Foundation, Inc.
  5. This file is part of the GNU C Library.
  6. The GNU C Library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2.1 of the License, or (at your option) any later version.
  10. The GNU C Library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with the GNU C Library; see the file COPYING.LIB. If
  16. not, see <http://www.gnu.org/licenses/>.  */
  17. #include "spr_defs.h"
  18. #include <jmpbuf-offsets.h>
  19. #ifdef __UCLIBC_HAS_FLOATS__
  20. #define FP(x...) x
  21. #else
  22. #define FP(x...)
  23. #endif
  24. .globl _setjmp
  25. .type _setjmp, @function
  26. .align 2
  27. _setjmp:
  28. l.addi r4,r0,0 /* Set second argument to 0. */
  29. l.j .Local_sigsetjmp
  30. l.nop
  31. .size _setjmp,.-_setjmp
  32. .globl __setjmp
  33. .type __setjmp, @function
  34. .align 2
  35. __setjmp:
  36. l.addi r4,r0,1 /* Set second argument to 1. */
  37. l.j .Local_sigsetjmp
  38. l.nop
  39. .size __setjmp,.-__setjmp
  40. .globl setjmp
  41. .set setjmp,__setjmp
  42. .globl __sigsetjmp
  43. .type __sigsetjmp, @function
  44. .align 2
  45. __sigsetjmp:
  46. .Local_sigsetjmp:
  47. l.sw 0(r3),r1
  48. l.sw 4(r3),r2
  49. l.sw 8(r3),r9
  50. l.sw 12(r3),r10
  51. l.sw 16(r3),r14
  52. l.sw 20(r3),r16
  53. l.sw 24(r3),r18
  54. l.sw 28(r3),r20
  55. l.sw 32(r3),r22
  56. l.sw 36(r3),r24
  57. l.sw 40(r3),r26
  58. l.sw 44(r3),r28
  59. l.sw 48(r3),r30
  60. l.j __sigjmp_save
  61. l.nop
  62. .size __sigsetjmp,.-__sigsetjmp