rgcpu.pas 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {
  2. Copyright (c) 1998-2008 by Florian Klaempfl
  3. This unit implements the MOS Technology 6502 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,aasmsym,
  23. cgbase,cgutils,
  24. cpubase,
  25. rgobj;
  26. type
  27. trgcpu = class(trgobj)
  28. end;
  29. trgintcpu = class(trgcpu)
  30. procedure add_cpu_interferences(p : tai);override;
  31. end;
  32. implementation
  33. uses
  34. verbose, cutils,
  35. cgobj,
  36. procinfo;
  37. procedure trgintcpu.add_cpu_interferences(p : tai);
  38. var
  39. r : tsuperregister;
  40. begin
  41. inherited;
  42. //if p.typ=ait_instruction then
  43. // begin
  44. // case taicpu(p).opcode of
  45. // A_CPI,
  46. // A_ANDI,
  47. // A_ORI,
  48. // A_SUBI,
  49. // A_SBCI,
  50. // A_LDI:
  51. // for r:=RS_R0 to RS_R15 do
  52. // add_edge(r,GetSupReg(taicpu(p).oper[0]^.reg));
  53. // A_MULS:
  54. // begin
  55. // for r:=RS_R0 to RS_R15 do
  56. // add_edge(r,GetSupReg(taicpu(p).oper[0]^.reg));
  57. // for r:=RS_R0 to RS_R15 do
  58. // add_edge(r,GetSupReg(taicpu(p).oper[1]^.reg));
  59. // end;
  60. // end;
  61. // end;
  62. end;
  63. end.