cpuinfo.pas 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. AWord = QWord;
  23. PAWord = ^AWord;
  24. { the ordinal type used when evaluating constant integer expressions }
  25. TConstExprInt = int64;
  26. { ... the same unsigned }
  27. TConstExprUInt = {$ifdef fpc}qword{$else}int64{$endif};
  28. { this must be an ordinal type with the same size as a pointer }
  29. { Note: must be unsigned!! Otherwise, ugly code like }
  30. { pointer(-1) will result in a pointer with the value }
  31. { $fffffffffffffff on a 32bit machine if the compiler uses }
  32. { int64 constants internally (JM) }
  33. TConstPtrUInt = qword;
  34. bestreal = extended;
  35. ts32real = single;
  36. ts64real = double;
  37. ts80real = extended;
  38. ts64comp = extended;
  39. pbestreal=^bestreal;
  40. tprocessors =
  41. (no_processor,
  42. ClassDefault
  43. );
  44. tfputype =
  45. (no_fpuprocessor,
  46. fpu_soft,
  47. fpu_standard,
  48. fpu_x87,
  49. fpu_sse,
  50. fpu_sse2,
  51. fpu_sse3
  52. );
  53. Const
  54. { Size of native extended type }
  55. extended_size = 10;
  56. { Size of a pointer }
  57. pointer_size = 8;
  58. { Size of a multimedia register }
  59. mmreg_size = 16;
  60. { target cpu string (used by compiler options) }
  61. target_cpu_string = 'x86_64';
  62. { size of the buffer used for setjump/longjmp
  63. the size of this buffer is deduced from the
  64. jmp_buf structure in setjumph.inc file
  65. }
  66. {$warning FIX: jmp_buf_size }
  67. jmp_buf_size = 48;
  68. Implementation
  69. end.
  70. {
  71. $Log$
  72. Revision 1.7 2003-09-24 17:12:02 florian
  73. * several fixes for new reg allocator
  74. Revision 1.6 2003/01/05 13:36:54 florian
  75. * x86-64 compiles
  76. + very basic support for float128 type (x86-64 only)
  77. Revision 1.5 2002/09/07 15:25:15 peter
  78. * old logs removed and tabs fixed
  79. Revision 1.4 2002/08/12 15:08:45 carl
  80. + stab register indexes for powerpc (moved from gdb to cpubase)
  81. + tprocessor enumeration moved to cpuinfo
  82. + linker in target_info is now a class
  83. * many many updates for m68k (will soon start to compile)
  84. - removed some ifdef or correct them for correct cpu
  85. Revision 1.3 2002/08/10 14:53:38 carl
  86. + moved target_cpu_string to cpuinfo
  87. * renamed asmmode enum.
  88. * assembler reader has now less ifdef's
  89. * move from nppcmem.pas -> ncgmem.pas vec. node.
  90. Revision 1.2 2002/07/25 22:55:34 florian
  91. * several fixes, small test units can be compiled
  92. Revision 1.1 2002/07/24 22:38:15 florian
  93. + initial release of x86-64 target code
  94. }