tgcpu.pas 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. {
  2. $Id$
  3. Copyright (C) 1998-2000 by Florian Klaempfl
  4. This unit handles the temporary variables stuff for i386
  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 tgcpu;
  19. interface
  20. uses
  21. cobjects,globals,tree,hcodegen,verbose,files,
  22. aasm,cpubase,cpuasm,tgobj;
  23. const
  24. countusablereg : byte = 4;
  25. { this value is used in tsaved, if the register isn't saved }
  26. reg_not_saved = $7fffffff;
  27. usableregmmx : byte = 8;
  28. type
  29. ttgobji386 = object(ttgobj)
  30. procedure ungetregister(r : tregister);virtual;
  31. function istemp(const ref : treference) : boolean;virtual;
  32. procedure del_reference(const ref : treference);virtual;
  33. procedure pushusedregisters(var pushed : tpushed;b : byte);virtual;
  34. procedure popusedregisters(const pushed : tpushed);virtual;
  35. procedure saveusedregisters(var saved : tsaved;b : byte);virtual;
  36. procedure restoreusedregisters(const saved : tsaved);virtual;
  37. procedure clearregistercount;virtual;
  38. procedure resetusableregisters;virtual;
  39. end;
  40. var
  41. tg : ttgobji386;
  42. implementation
  43. { !!!!!!!! the following procedures need to be implemented !!!!!!!!!! }
  44. procedure ttgobji386.ungetregister(r : tregister);
  45. begin
  46. end;
  47. function ttgobji386.istemp(const ref : treference) : boolean;
  48. begin
  49. end;
  50. procedure ttgobji386.del_reference(const ref : treference);
  51. begin
  52. end;
  53. procedure ttgobji386.pushusedregisters(var pushed : tpushed;b : byte);
  54. begin
  55. end;
  56. procedure ttgobji386.popusedregisters(const pushed : tpushed);
  57. begin
  58. end;
  59. procedure ttgobji386.saveusedregisters(var saved : tsaved;b : byte);
  60. begin
  61. end;
  62. procedure ttgobji386.restoreusedregisters(const saved : tsaved);
  63. begin
  64. end;
  65. procedure ttgobji386.clearregistercount;
  66. begin
  67. end;
  68. procedure ttgobji386.resetusableregisters;
  69. begin
  70. end;
  71. begin
  72. tg.init;
  73. end.
  74. {
  75. $Log$
  76. Revision 1.1 2000-07-13 06:30:11 michael
  77. + Initial import
  78. Revision 1.7 2000/03/01 15:36:13 florian
  79. * some new stuff for the new cg
  80. Revision 1.6 2000/01/07 01:14:57 peter
  81. * updated copyright to 2000
  82. Revision 1.5 1999/09/15 20:35:47 florian
  83. * small fix to operator overloading when in MMX mode
  84. + the compiler uses now fldz and fld1 if possible
  85. + some fixes to floating point registers
  86. + some math. functions (arctan, ln, sin, cos, sqrt, sqr, pi) are now inlined
  87. * .... ???
  88. Revision 1.4 1999/09/10 18:48:11 florian
  89. * some bug fixes (e.g. must_be_valid and procinfo.funcret_is_valid)
  90. * most things for stored properties fixed
  91. Revision 1.3 1999/08/03 17:09:50 florian
  92. * the alpha compiler can be compiled now
  93. Revision 1.2 1999/08/02 23:13:24 florian
  94. * more changes to compile for the Alpha
  95. Revision 1.1 1999/08/02 17:14:14 florian
  96. + changed the temp. generator to an object
  97. }