2
0

setjumph.inc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {******************************************************************************
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2000-2002 by Jonas Maebe and other members of the
  5. Free Pascal development team
  6. SetJmp/Longjmp declarations
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This file was adapted from
  10. Guardian:/usr/local/src/glibc-2.2.3/sysdeps/sparc/sparc32# more setjmp.S
  11. Guardian:/usr/local/src/glibc-2.2.3/sysdeps/sparc/sparc32# more __longjmp.S
  12. Copyright (C) 1991, 93, 94, 96, 97, 98 Free Software Foundation, Inc.
  13. This file is part of the GNU C Library.
  14. The GNU C Library is free software; you can redistribute it and/or
  15. modify it under the terms of the GNU Library General Public License as
  16. published by the Free Software Foundation; either version 2 of the
  17. License, or (at your option) any later version.
  18. The GNU C Library is distributed in the hope that it will be useful,
  19. but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  21. Library General Public License for more details.
  22. You should have received a copy of the GNU Library General Public
  23. License along with the GNU C Library; see the file COPYING.LIB. If not,
  24. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  25. Boston, MA 02111-1307, USA.
  26. This program is distributed in the hope that it will be useful,
  27. but WITHOUT ANY WARRANTY; without even the implied warranty of
  28. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  29. ******************************************************************************}
  30. {@Define the machine-dependent type `jmp_buf'. SPARC version.}
  31. const
  32. jmpbufsigmaskwords = 128 div 32;
  33. type
  34. tjmpsigset=array[0..jmpbufsigmaskwords-1] of longint;
  35. pjmpsigset=^tjmpsigset;
  36. jmp_buf=packed record
  37. {stack pointer}
  38. JB_SP,
  39. {frame pointer}
  40. JB_FP,
  41. {program counter}
  42. JB_PV:Pointer;
  43. sigmask : tjmpsigset;
  44. end;
  45. Pjmp_buf=^jmp_buf;
  46. function setjmp(var S:jmp_buf):longint;
  47. procedure longjmp(var S:jmp_buf;value:longint);
  48. {
  49. $Log$
  50. Revision 1.5 2004-09-12 12:04:23 peter
  51. * restore traps when returning with longjmp
  52. Revision 1.4 2003/01/05 21:32:35 mazen
  53. * fixing several bugs compiling the RTL
  54. Revision 1.3 2003/01/01 18:24:41 mazen
  55. * just put register pointers
  56. Revision 1.2 2002/11/24 18:19:44 mazen
  57. + setjmp and longjmp
  58. Revision 1.1 2002/11/16 20:10:31 florian
  59. + sparc specific rtl skeleton added
  60. }