cpuinfo.pas 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Basic Processor information
  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 cpuinfo;
  19. {$i fpcdefs.inc}
  20. Interface
  21. Type
  22. { Natural integer register type and size for the target machine }
  23. AWord = longword;
  24. PAWord = ^AWord;
  25. { This must be an ordinal type with the same size as a pointer
  26. Note: Must be unsigned! Otherwise, ugly code like
  27. pointer(-1) will result in a pointer with the value
  28. $fffffffffffffff on a 32bit machine if the compiler uses
  29. int64 constants internally (JM) }
  30. TConstPtrUInt = longword;
  31. bestreal = extended;
  32. ts32real = single;
  33. ts64real = double;
  34. ts80real = extended;
  35. ts64comp = extended;
  36. pbestreal=^bestreal;
  37. { possible supported processors for this target }
  38. tprocessors =
  39. (no_processor,
  40. Class386,
  41. ClassP5,
  42. ClassP6
  43. );
  44. Const
  45. {# Size of native extended floating point type }
  46. extended_size = 10;
  47. {# Size of a pointer }
  48. pointer_size = 4;
  49. {# Size of a multimedia register }
  50. mmreg_size = 8;
  51. { target cpu string (used by compiler options) }
  52. target_cpu_string = 'i386';
  53. { size of the buffer used for setjump/longjmp
  54. the size of this buffer is deduced from the
  55. jmp_buf structure in setjumph.inc file
  56. }
  57. jmp_buf_size = 24;
  58. Implementation
  59. end.
  60. {
  61. $Log$
  62. Revision 1.16 2002-12-05 14:18:09 florian
  63. * two comments fixed
  64. Revision 1.15 2002/09/07 20:48:43 carl
  65. * cardinal -> longword
  66. Revision 1.14 2002/09/07 15:25:10 peter
  67. * old logs removed and tabs fixed
  68. Revision 1.13 2002/08/15 15:15:55 carl
  69. * jmpbuf size allocation for exceptions is now cpu specific (as it should)
  70. * more generic nodes for maths
  71. * several fixes for better m68k support
  72. Revision 1.12 2002/08/12 15:08:41 carl
  73. + stab register indexes for powerpc (moved from gdb to cpubase)
  74. + tprocessor enumeration moved to cpuinfo
  75. + linker in target_info is now a class
  76. * many many updates for m68k (will soon start to compile)
  77. - removed some ifdef or correct them for correct cpu
  78. Revision 1.11 2002/08/10 14:47:50 carl
  79. + moved target_cpu_string to cpuinfo
  80. * renamed asmmode enum.
  81. * assembler reader has now less ifdef's
  82. * move from nppcmem.pas -> ncgmem.pas vec. node.
  83. Revision 1.10 2002/05/18 13:34:22 peter
  84. * readded missing revisions
  85. Revision 1.9 2002/05/16 19:46:50 carl
  86. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  87. + try to fix temp allocation (still in ifdef)
  88. + generic constructor calls
  89. + start of tassembler / tmodulebase class cleanup
  90. Revision 1.7 2002/04/20 21:37:07 carl
  91. + generic FPC_CHECKPOINTER
  92. + first parameter offset in stack now portable
  93. * rename some constants
  94. + move some cpu stuff to other units
  95. - remove unused constents
  96. * fix stacksize for some targets
  97. * fix generic size problems which depend now on EXTEND_SIZE constant
  98. * removing frame pointer in routines is only available for : i386,m68k and vis targets
  99. Revision 1.6 2002/04/07 13:41:50 carl
  100. - moved type constant
  101. Revision 1.5 2002/04/02 17:11:34 peter
  102. * tlocation,treference update
  103. * LOC_CONSTANT added for better constant handling
  104. * secondadd splitted in multiple routines
  105. * location_force_reg added for loading a location to a register
  106. of a specified size
  107. * secondassignment parses now first the right and then the left node
  108. (this is compatible with Kylix). This saves a lot of push/pop especially
  109. with string operations
  110. * adapted some routines to use the new cg methods
  111. }