setjump.inc 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by the Free Pascal development team.
  5. SetJmp and LongJmp implementation for exception handling
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program 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.
  11. **********************************************************************}
  12. function setjmp(var S : jmp_buf) : longint;assembler;[Public, alias : 'FPC_SETJMP'];
  13. asm
  14. stmia r0,{v1-v6, sl, fp, sp, lr}
  15. (*!!!! fix me ?*)
  16. end;
  17. procedure longjmp(var S : jmp_buf;value : longint);assembler;[Public, alias : 'FPC_LONGJMP'];
  18. asm
  19. mov ip, r0
  20. movs r0, r1
  21. moveq r0, #1
  22. ldmia ip,{v1-v6, sl, fp, sp, pc}
  23. end;
  24. {
  25. $Log$
  26. Revision 1.2 2003-09-03 14:09:37 florian
  27. * arm fixes to the common rtl code
  28. * some generic math code fixed
  29. * ...
  30. Revision 1.1 2003/08/21 16:41:54 florian
  31. * empty dummy files
  32. + [long|set]jmp implemented
  33. }