__longjmp.S 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* longjmp for SH.
  2. Copyright (C) 1999, 2000 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public
  13. License along with the GNU C Library; see the file COPYING.LIB. If not,
  14. see <http://www.gnu.org/licenses/>. */
  15. #include <features.h>
  16. /* __longjmp(jmpbuf, val) */
  17. .text
  18. .align 4
  19. .type __longjmp,@function
  20. .globl __longjmp;
  21. __longjmp:
  22. mov.l @r4+, r8
  23. mov.l @r4+, r9
  24. mov.l @r4+, r10
  25. mov.l @r4+, r11
  26. mov.l @r4+, r12
  27. mov.l @r4+, r13
  28. mov.l @r4+, r14
  29. mov.l @r4+, r15
  30. #if defined __UCLIBC_HAS_FLOATS__ && ! defined __UCLIBC_HAS_SOFT_FLOAT__
  31. lds.l @r4+, pr
  32. ldc.l @r4+, gbr
  33. lds.l @r4+, fpscr
  34. fmov.s @r4+, fr12
  35. fmov.s @r4+, fr13
  36. mov r5, r0 /* get the return value in place */
  37. tst r0, r0
  38. bf.s 1f
  39. fmov.s @r4+, fr14
  40. mov #1,r0 /* can't let setjmp() return zero! */
  41. 1:
  42. rts
  43. fmov.s @r4+, fr15
  44. #else
  45. mov r5, r0 /* get the return value in place */
  46. tst r0, r0
  47. bf.s 1f
  48. lds.l @r4+, pr
  49. mov #1,r0 /* can't let setjmp() return zero! */
  50. 1:
  51. rts
  52. ldc.l @r4+, gbr
  53. #endif
  54. .size __longjmp,.-__longjmp
  55. libc_hidden_def(__longjmp)