cpuinfo.pas 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. {
  2. $Id$
  3. Copyright (c) 1998-2004 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. uses
  22. globtype;
  23. Type
  24. bestreal = extended;
  25. ts32real = single;
  26. ts64real = double;
  27. ts80real = extended;
  28. ts128real = type extended;
  29. ts64comp = type extended;
  30. pbestreal=^bestreal;
  31. { possible supported processors for this target }
  32. tprocessors =
  33. (no_processor,
  34. Class386,
  35. ClassPentium,
  36. ClassPentium2,
  37. ClassPentium3,
  38. ClassPentium4
  39. );
  40. tfputype =
  41. (no_fpuprocessor,
  42. fpu_soft,
  43. fpu_x87,
  44. fpu_sse,
  45. fpu_sse2
  46. );
  47. Const
  48. {# Size of native extended floating point type }
  49. extended_size = 10;
  50. {# Size of a multimedia register }
  51. mmreg_size = 8;
  52. { target cpu string (used by compiler options) }
  53. target_cpu_string = 'i386';
  54. { size of the buffer used for setjump/longjmp
  55. the size of this buffer is deduced from the
  56. jmp_buf structure in setjumph.inc file
  57. }
  58. jmp_buf_size = 24;
  59. { calling conventions supported by the code generator }
  60. supported_calling_conventions : tproccalloptions = [
  61. pocall_internproc,
  62. pocall_compilerproc,
  63. pocall_inline,
  64. pocall_register,
  65. pocall_safecall,
  66. pocall_stdcall,
  67. pocall_cdecl,
  68. pocall_cppdecl,
  69. pocall_far16,
  70. pocall_pascal,
  71. pocall_oldfpccall
  72. ];
  73. processorsstr : array[tprocessors] of string[10] = ('',
  74. '386',
  75. 'PENTIUM',
  76. 'PENTIUM2',
  77. 'PENTIUM3',
  78. 'PENTIUM4'
  79. );
  80. fputypestr : array[tfputype] of string[6] = ('',
  81. 'SOFT',
  82. 'X87',
  83. 'SSE',
  84. 'SSE2'
  85. );
  86. sse_singlescalar : set of tfputype = [fpu_sse,fpu_sse2];
  87. sse_doublescalar : set of tfputype = [fpu_sse2];
  88. Implementation
  89. end.
  90. {
  91. $Log$
  92. Revision 1.26 2004-06-20 08:55:31 florian
  93. * logs truncated
  94. Revision 1.25 2004/06/16 20:07:10 florian
  95. * dwarf branch merged
  96. Revision 1.24 2004/04/28 15:19:03 florian
  97. + syscall directive support for MorphOS added
  98. Revision 1.23.2.2 2004/05/01 16:02:10 peter
  99. * POINTER_SIZE replaced with sizeof(aint)
  100. * aint,aword,tconst*int moved to globtype
  101. Revision 1.23.2.1 2004/04/26 21:00:37 peter
  102. * AInt fixed, PAInt added
  103. Revision 1.23 2004/02/27 10:21:05 florian
  104. * top_symbol killed
  105. + refaddr to treference added
  106. + refsymbol to treference added
  107. * top_local stuff moved to an extra record to save memory
  108. + aint introduced
  109. * tppufile.get/putint64/aint implemented
  110. }