setjmp.S 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* setjmp for CRIS.
  2. Copyright (C) 1995, 1996, 1997 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. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA. */
  16. #include <sysdep.h>
  17. #define _ASM
  18. #define _SETJMP_H
  19. #include <bits/setjmp.h>
  20. .syntax no_register_prefix
  21. ENTRY (__sigsetjmp)
  22. .Local__sigsetjmp:
  23. moveq 1,r9
  24. movem sp,[r10+1*4]
  25. #ifdef __PIC__
  26. move.d pc,r9
  27. addq 0f-.,r9
  28. #else
  29. move.d 0f,r9
  30. #endif
  31. move.d r9,[r10]
  32. move srp,[r10+16*4]
  33. PLTJUMP (__sigjmp_save)
  34. 0: /* This is where longjmp returns. (Don't use "ret" - it's a macro. */
  35. Ret
  36. move.d r9,r10
  37. END (__sigsetjmp)
  38. /* Binary compatibility entry points. Having these in separate files
  39. is not meaningful and just adds library overhead. */
  40. ENTRY (__setjmp)
  41. ba .Local__sigsetjmp
  42. moveq 0,r11
  43. END (__setjmp)
  44. ENTRY (_setjmp)
  45. ba .Local__sigsetjmp
  46. moveq 0,r11
  47. END (_setjmp)
  48. ENTRY (setjmp)
  49. ba .Local__sigsetjmp
  50. moveq 1,r11
  51. END (setjmp)
  52. /*
  53. weak_extern (__setjmp)
  54. weak_extern (_setjmp)
  55. weak_extern (setjmp)
  56. */