cpupi.pas 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {
  2. Copyright (c) 2002 by Florian Klaempfl
  3. This unit contains the CPU specific part of tprocinfo
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  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. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. { This unit contains the CPU specific part of tprocinfo. }
  18. unit cpupi;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. psub;
  23. type
  24. tcpuprocinfo = class(tcgprocinfo)
  25. procedure init_framepointer;override;
  26. end;
  27. implementation
  28. uses
  29. procinfo,
  30. cpubase,
  31. systems;
  32. { tcpuprocinfo }
  33. procedure tcpuprocinfo.init_framepointer;
  34. begin
  35. if not (target_info.system in [system_m68k_amiga]) then
  36. begin
  37. RS_FRAME_POINTER_REG:=RS_A6;
  38. NR_FRAME_POINTER_REG:=NR_A6;
  39. RS_PIC_OFFSET_REG:=RS_A5;
  40. NR_PIC_OFFSET_REG:=NR_A5;
  41. end
  42. else
  43. begin
  44. NR_FRAME_POINTER_REG:=NR_A5;
  45. RS_FRAME_POINTER_REG:=RS_A5;
  46. RS_PIC_OFFSET_REG:=RS_A4;
  47. NR_PIC_OFFSET_REG:=NR_A4;
  48. end;
  49. end;
  50. begin
  51. cprocinfo:=tcpuprocinfo;
  52. end.