rgcpu.pas 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. This unit implements the SPARC specific class for the register
  5. allocator
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************}
  18. unit rgcpu;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. cgbase,rgobj;
  23. type
  24. trgcpu=class(trgobj)
  25. procedure add_constraints(reg:tregister);override;
  26. end;
  27. implementation
  28. uses
  29. cpubase;
  30. procedure trgcpu.add_constraints(reg:tregister);
  31. var
  32. supreg,i: Tsuperregister;
  33. r: Tregister;
  34. begin
  35. { Let 64bit floats conflict with all odd float regs }
  36. if getsubreg(reg)=R_SUBFD then
  37. begin
  38. supreg:=getsupreg(reg);
  39. i:=RS_F1;
  40. while (i<=RS_F31) do
  41. begin
  42. add_edge(supreg,i);
  43. inc(i,2);
  44. end;
  45. end;
  46. end;
  47. end.
  48. {
  49. $Log$
  50. Revision 1.20 2003-10-24 15:20:37 peter
  51. * added more register functions
  52. Revision 1.19 2003/10/01 20:34:50 peter
  53. * procinfo unit contains tprocinfo
  54. * cginfo renamed to cgbase
  55. * moved cgmessage to verbose
  56. * fixed ppc and sparc compiles
  57. Revision 1.18 2003/09/14 19:19:05 peter
  58. * updates for new ra
  59. Revision 1.17 2003/09/03 15:55:01 peter
  60. * NEWRA branch merged
  61. Revision 1.16.2.2 2003/09/02 17:49:17 peter
  62. * newra updates
  63. Revision 1.16.2.1 2003/09/01 21:02:55 peter
  64. * sparc updates for new tregister
  65. Revision 1.16 2003/08/11 21:18:20 peter
  66. * start of sparc support for newra
  67. Revision 1.15 2003/07/02 22:18:04 peter
  68. * paraloc splitted in callerparaloc,calleeparaloc
  69. * sparc calling convention updates
  70. Revision 1.14 2003/06/17 16:36:11 peter
  71. * freeintparaloc added
  72. Revision 1.13 2003/06/12 22:47:52 mazen
  73. - unused temp var r removed in GetExplicitRegisterInt function
  74. * some case added for var and fauncions naming
  75. Revision 1.12 2003/06/12 21:11:44 peter
  76. * updates like the powerpc
  77. Revision 1.11 2003/06/01 21:38:07 peter
  78. * getregisterfpu size parameter added
  79. * op_const_reg size parameter added
  80. * sparc updates
  81. Revision 1.10 2003/05/31 01:00:51 peter
  82. * register fixes
  83. Revision 1.9 2003/04/22 10:09:35 daniel
  84. + Implemented the actual register allocator
  85. + Scratch registers unavailable when new register allocator used
  86. + maybe_save/maybe_restore unavailable when new register allocator used
  87. Revision 1.8 2003/03/15 22:51:58 mazen
  88. * remaking sparc rtl compile
  89. Revision 1.7 2003/03/10 21:59:54 mazen
  90. * fixing index overflow in handling new registers arrays.
  91. Revision 1.6 2003/02/19 22:00:17 daniel
  92. * Code generator converted to new register notation
  93. - Horribily outdated todo.txt removed
  94. Revision 1.5 2003/01/08 18:43:58 daniel
  95. * Tregister changed into a record
  96. Revision 1.4 2002/10/13 21:46:07 mazen
  97. * assembler output format fixed
  98. Revision 1.3 2002/10/12 19:03:23 mazen
  99. * Get/Unget expilit registers to be re-examined
  100. }