cpuinfo.pas 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 = 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. { target cpu string (used by compiler options) }
  39. target_cpu_string = 'i386';
  40. Implementation
  41. end.
  42. {
  43. $Log$
  44. Revision 1.11 2002-08-10 14:47:50 carl
  45. + moved target_cpu_string to cpuinfo
  46. * renamed asmmode enum.
  47. * assembler reader has now less ifdef's
  48. * move from nppcmem.pas -> ncgmem.pas vec. node.
  49. Revision 1.10 2002/05/18 13:34:22 peter
  50. * readded missing revisions
  51. Revision 1.9 2002/05/16 19:46:50 carl
  52. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  53. + try to fix temp allocation (still in ifdef)
  54. + generic constructor calls
  55. + start of tassembler / tmodulebase class cleanup
  56. Revision 1.7 2002/04/20 21:37:07 carl
  57. + generic FPC_CHECKPOINTER
  58. + first parameter offset in stack now portable
  59. * rename some constants
  60. + move some cpu stuff to other units
  61. - remove unused constents
  62. * fix stacksize for some targets
  63. * fix generic size problems which depend now on EXTEND_SIZE constant
  64. * removing frame pointer in routines is only available for : i386,m68k and vis targets
  65. Revision 1.6 2002/04/07 13:41:50 carl
  66. - moved type constant
  67. Revision 1.5 2002/04/02 17:11:34 peter
  68. * tlocation,treference update
  69. * LOC_CONSTANT added for better constant handling
  70. * secondadd splitted in multiple routines
  71. * location_force_reg added for loading a location to a register
  72. of a specified size
  73. * secondassignment parses now first the right and then the left node
  74. (this is compatible with Kylix). This saves a lot of push/pop especially
  75. with string operations
  76. * adapted some routines to use the new cg methods
  77. }