sparc.inc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2002-2004 by the Free Pascal development team.
  5. Processor dependent implementation for the system unit for
  6. Sparc
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. {****************************************************************************
  14. PowerPC specific stuff
  15. ****************************************************************************}
  16. procedure fpc_cpuinit;
  17. begin
  18. end;
  19. {$define FPC_SYSTEM_HAS_GET_FRAME}
  20. function get_frame:pointer;assembler;nostackframe;
  21. asm
  22. mov %sp,%o0
  23. end;
  24. {$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
  25. function get_caller_addr(framebp:pointer):pointer;assembler;nostackframe;
  26. asm
  27. { framebp = %o0 }
  28. { flush register windows, so they are stored in the stack }
  29. ta 3
  30. ld [%o0+60],%o0
  31. { add 8 to skip jmpl and delay slot }
  32. add %o0,8,%o0
  33. end;
  34. {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
  35. function get_caller_frame(framebp:pointer):pointer;assembler;nostackframe;
  36. asm
  37. { flush register windows, so they are stored in the stack }
  38. ta 3
  39. { framebp = %o0 }
  40. ld [%o0+56],%o0
  41. end;
  42. {$define FPC_SYSTEM_HAS_SPTR}
  43. function Sptr:Pointer;assembler;nostackframe;
  44. asm
  45. mov %sp,%o0
  46. end;
  47. {
  48. $Log$
  49. Revision 1.7 2004-05-30 20:03:05 florian
  50. * ?
  51. Revision 1.6 2004/05/27 23:34:37 peter
  52. * backtrace support
  53. Revision 1.5 2004/01/02 17:22:14 jonas
  54. + fpc_cpuinit procedure to allow cpu/fpu initialisation before any unit
  55. initialises
  56. + fpu exceptions for invalid operations and division by zero enabled for
  57. ppc
  58. Revision 1.4 2003/12/04 21:42:07 peter
  59. * register calling updates
  60. Revision 1.3 2003/03/17 14:30:11 peter
  61. * changed address parameter/return values to pointer instead
  62. of longint
  63. Revision 1.2 2003/02/05 21:48:34 mazen
  64. * fixing run time errors related to unimplemented abstract methods in CG
  65. + giving empty emplementations for some RTL functions
  66. Revision 1.1 2002/11/16 20:10:31 florian
  67. + sparc specific rtl skeleton added
  68. }