cpuinfo.pas 2.9 KB

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