cpuinfo.pas 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. uses
  22. globtype;
  23. Type
  24. AWord = QWord;
  25. PAWord = ^AWord;
  26. { the ordinal type used when evaluating constant integer expressions }
  27. TConstExprInt = int64;
  28. { ... the same unsigned }
  29. TConstExprUInt = {$ifdef fpc}qword{$else}int64{$endif};
  30. { this must be an ordinal type with the same size as a pointer }
  31. { Note: must be unsigned!! Otherwise, ugly code like }
  32. { pointer(-1) will result in a pointer with the value }
  33. { $fffffffffffffff on a 32bit machine if the compiler uses }
  34. { int64 constants internally (JM) }
  35. TConstPtrUInt = qword;
  36. bestreal = extended;
  37. ts32real = single;
  38. ts64real = double;
  39. ts80real = extended;
  40. ts128real = type extended;
  41. ts64comp = type extended;
  42. pbestreal=^bestreal;
  43. tprocessors =
  44. (no_processor,
  45. ClassAthlon64
  46. );
  47. tfputype =
  48. (no_fpuprocessor,
  49. fpu_sse64
  50. );
  51. Const
  52. { Size of native extended type }
  53. extended_size = 10;
  54. { Size of a pointer }
  55. pointer_size = 8;
  56. { Size of a multimedia register }
  57. mmreg_size = 16;
  58. { target cpu string (used by compiler options) }
  59. target_cpu_string = 'x86_64';
  60. { size of the buffer used for setjump/longjmp
  61. the size of this buffer is deduced from the
  62. jmp_buf structure in setjumph.inc file
  63. }
  64. {$warning FIX: jmp_buf_size }
  65. jmp_buf_size = 48;
  66. { calling conventions supported by the code generator }
  67. supported_calling_conventions = [
  68. pocall_internproc,
  69. pocall_compilerproc,
  70. pocall_inline,
  71. pocall_register,
  72. pocall_safecall,
  73. pocall_stdcall,
  74. pocall_cdecl,
  75. pocall_cppdecl
  76. ];
  77. processorsstr : array[tprocessors] of string[10] = ('',
  78. 'ATHLON64'
  79. );
  80. fputypestr : array[tfputype] of string[6] = ('',
  81. 'SSE64'
  82. );
  83. sse_singlescalar : set of tfputype = [fpu_sse64];
  84. sse_doublescalar : set of tfputype = [fpu_sse64];
  85. Implementation
  86. end.
  87. {
  88. $Log$
  89. Revision 1.10 2003-12-25 01:07:09 florian
  90. + $fputype directive support
  91. + single data type operations with sse unit
  92. * fixed more x86-64 stuff
  93. Revision 1.9 2003/12/22 19:00:17 florian
  94. * fixed some x86-64 issues
  95. Revision 1.8 2003/12/20 12:38:51 florian
  96. * some x86-64 compilation fixe
  97. Revision 1.7 2003/09/24 17:12:02 florian
  98. * several fixes for new reg allocator
  99. Revision 1.6 2003/01/05 13:36:54 florian
  100. * x86-64 compiles
  101. + very basic support for float128 type (x86-64 only)
  102. Revision 1.5 2002/09/07 15:25:15 peter
  103. * old logs removed and tabs fixed
  104. Revision 1.4 2002/08/12 15:08:45 carl
  105. + stab register indexes for powerpc (moved from gdb to cpubase)
  106. + tprocessor enumeration moved to cpuinfo
  107. + linker in target_info is now a class
  108. * many many updates for m68k (will soon start to compile)
  109. - removed some ifdef or correct them for correct cpu
  110. Revision 1.3 2002/08/10 14:53:38 carl
  111. + moved target_cpu_string to cpuinfo
  112. * renamed asmmode enum.
  113. * assembler reader has now less ifdef's
  114. * move from nppcmem.pas -> ncgmem.pas vec. node.
  115. Revision 1.2 2002/07/25 22:55:34 florian
  116. * several fixes, small test units can be compiled
  117. Revision 1.1 2002/07/24 22:38:15 florian
  118. + initial release of x86-64 target code
  119. }