cpuinfo.pas 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 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 = Cardinal;
  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 = cardinal;
  31. Const
  32. {# Size of native extended floating point type }
  33. extended_size = 10;
  34. {# Size of a pointer }
  35. pointer_size = 4;
  36. {# Size of a multimedia register }
  37. mmreg_size = 8;
  38. Implementation
  39. end.
  40. {
  41. $Log$
  42. Revision 1.9 2002-05-16 19:46:50 carl
  43. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  44. + try to fix temp allocation (still in ifdef)
  45. + generic constructor calls
  46. + start of tassembler / tmodulebase class cleanup
  47. Revision 1.7 2002/04/20 21:37:07 carl
  48. + generic FPC_CHECKPOINTER
  49. + first parameter offset in stack now portable
  50. * rename some constants
  51. + move some cpu stuff to other units
  52. - remove unused constents
  53. * fix stacksize for some targets
  54. * fix generic size problems which depend now on EXTEND_SIZE constant
  55. * removing frame pointer in routines is only available for : i386,m68k and vis targets
  56. Revision 1.6 2002/04/07 13:41:50 carl
  57. - moved type constant
  58. Revision 1.5 2002/04/02 17:11:34 peter
  59. * tlocation,treference update
  60. * LOC_CONSTANT added for better constant handling
  61. * secondadd splitted in multiple routines
  62. * location_force_reg added for loading a location to a register
  63. of a specified size
  64. * secondassignment parses now first the right and then the left node
  65. (this is compatible with Kylix). This saves a lot of push/pop especially
  66. with string operations
  67. * adapted some routines to use the new cg methods
  68. Revision 1.4 2001/09/02 21:18:29 peter
  69. * split constsym.value in valueord,valueordptr,valueptr. The valueordptr
  70. is used for holding target platform pointer values. As those can be
  71. bigger than the source platform.
  72. Revision 1.3 2001/06/03 20:21:08 peter
  73. * Kylix fixes, mostly case names of units
  74. Revision 1.2 2001/02/08 13:09:03 jonas
  75. * fixed web bug 1396: tpointerord is now a cardinal instead of a longint,
  76. but added a hack in ncnv so that pointer(-1) still works
  77. Revision 1.1 2000/10/15 09:39:37 peter
  78. * moved cpu*.pas to i386/
  79. * renamed n386 to common cpunode
  80. Revision 1.5 2000/09/24 15:06:14 peter
  81. * use defines.inc
  82. Revision 1.4 2000/08/16 13:06:06 florian
  83. + support of 64 bit integer constants
  84. Revision 1.3 2000/08/12 06:45:08 florian
  85. + type TConstExprInt added
  86. Revision 1.2 2000/07/13 11:32:39 michael
  87. + removed logs
  88. }