rgcpu.pas 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {
  2. Copyright (c) 1998-2008 by Florian Klaempfl
  3. This unit implements the avr specific class for the register
  4. allocator
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  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. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit rgcpu;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. aasmbase,aasmtai,aasmdata,aasmcpu,
  23. cgbase,cgutils,
  24. cpubase,
  25. rgobj;
  26. type
  27. trgcpu = class(trgobj)
  28. procedure do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  29. procedure do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);override;
  30. end;
  31. trgintcpu = class(trgcpu)
  32. procedure add_cpu_interferences(p : tai);override;
  33. end;
  34. implementation
  35. uses
  36. verbose, cutils,
  37. cgobj,
  38. procinfo;
  39. procedure trgcpu.do_spill_read(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  40. begin
  41. inherited do_spill_read(list,pos,spilltemp,tempreg);
  42. end;
  43. procedure trgcpu.do_spill_written(list:TAsmList;pos:tai;const spilltemp:treference;tempreg:tregister);
  44. begin
  45. inherited do_spill_written(list,pos,spilltemp,tempreg);
  46. end;
  47. procedure trgintcpu.add_cpu_interferences(p : tai);
  48. var
  49. r : tregister;
  50. begin
  51. if p.typ=ait_instruction then
  52. begin
  53. case taicpu(p).opcode of
  54. A_LD:
  55. ;
  56. end;
  57. end;
  58. end;
  59. end.