cpuinfo.pas 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by the Free Pascal development team
  4. Basic Processor information for the PowerPC
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. Unit CPUInfo;
  12. Interface
  13. uses
  14. globtype;
  15. Type
  16. { Architecture word - Native unsigned type }
  17. AWord = Longword;
  18. AInt = Longint;
  19. PAWord = ^AWord;
  20. { this must be an ordinal type with the same size as a pointer }
  21. { to allow some dirty type casts for example when using }
  22. { tconstsym.value }
  23. { Note: must be unsigned!! Otherwise, ugly code like }
  24. { pointer(-1) will result in a pointer with the value }
  25. { $fffffffffffffff on a 32bit machine if the compiler uses }
  26. { int64 constants internally (JM) }
  27. TConstPtrUInt = Longword;
  28. bestreal = double;
  29. ts32real = single;
  30. ts64real = double;
  31. ts80real = extended;
  32. ts128real = extended;
  33. ts64comp = comp;
  34. pbestreal=^bestreal;
  35. { possible supported processors for this target }
  36. tprocessors =
  37. (no_processor,
  38. ppc601,
  39. ppc604
  40. );
  41. tfputype =
  42. (no_fpuprocessor,
  43. fpu_soft,
  44. fpu_standard
  45. );
  46. Const
  47. {# Size of native extended floating point type }
  48. extended_size = 8;
  49. {# Size of a pointer }
  50. pointer_size = 4;
  51. {# Size of a multimedia register }
  52. mmreg_size = 16;
  53. { target cpu string (used by compiler options) }
  54. target_cpu_string = 'powerpc';
  55. { size of the buffer used for setjump/longjmp
  56. the size of this buffer is deduced from the
  57. jmp_buf structure in setjumph.inc file
  58. }
  59. { for linux: }
  60. jmp_buf_size = 232;
  61. { calling conventions supported by the code generator }
  62. supported_calling_conventions = [
  63. pocall_internproc,
  64. pocall_compilerproc,
  65. pocall_inline,
  66. pocall_stdcall,
  67. { the difference to stdcall is only the name mangling }
  68. pocall_cdecl,
  69. { the difference to stdcall is only the name mangling }
  70. pocall_cppdecl
  71. ];
  72. processorsstr : array[tprocessors] of string[10] = ('',
  73. '603',
  74. '604'
  75. );
  76. fputypestr : array[tfputype] of string[6] = ('',
  77. 'SOFT',
  78. 'STANDARD'
  79. );
  80. Implementation
  81. end.
  82. {
  83. $Log$
  84. Revision 1.17 2004-02-27 10:21:05 florian
  85. * top_symbol killed
  86. + refaddr to treference added
  87. + refsymbol to treference added
  88. * top_local stuff moved to an extra record to save memory
  89. + aint introduced
  90. * tppufile.get/putint64/aint implemented
  91. Revision 1.16 2003/11/12 16:05:40 florian
  92. * assembler readers OOPed
  93. + typed currency constants
  94. + typed 128 bit float constants if the CPU supports it
  95. Revision 1.15 2003/11/07 15:58:33 florian
  96. * Florian's culmutative nr. 1; contains:
  97. - invalid calling conventions for a certain cpu are rejected
  98. - arm softfloat calling conventions
  99. - -Sp for cpu dependend code generation
  100. - several arm fixes
  101. - remaining code for value open array paras on heap
  102. Revision 1.14 2003/09/03 11:18:37 florian
  103. * fixed arm concatcopy
  104. + arm support in the common compiler sources added
  105. * moved some generic cg code around
  106. + tfputype added
  107. * ...
  108. Revision 1.13 2003/04/26 20:15:22 florian
  109. * fixed setjmp record size
  110. Revision 1.12 2002/09/07 20:57:08 carl
  111. * cardinal -> longword
  112. Revision 1.11 2002/09/07 15:25:14 peter
  113. * old logs removed and tabs fixed
  114. Revision 1.10 2002/08/15 15:15:55 carl
  115. * jmpbuf size allocation for exceptions is now cpu specific (as it should)
  116. * more generic nodes for maths
  117. * several fixes for better m68k support
  118. Revision 1.9 2002/08/12 15:08:44 carl
  119. + stab register indexes for powerpc (moved from gdb to cpubase)
  120. + tprocessor enumeration moved to cpuinfo
  121. + linker in target_info is now a class
  122. * many many updates for m68k (will soon start to compile)
  123. - removed some ifdef or correct them for correct cpu
  124. Revision 1.8 2002/08/10 14:52:52 carl
  125. + moved target_cpu_string to cpuinfo
  126. * renamed asmmode enum.
  127. * assembler reader has now less ifdef's
  128. * move from nppcmem.pas -> ncgmem.pas vec. node.
  129. Revision 1.7 2002/05/18 13:34:26 peter
  130. * readded missing revisions
  131. Revision 1.6 2002/05/16 19:46:53 carl
  132. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  133. + try to fix temp allocation (still in ifdef)
  134. + generic constructor calls
  135. + start of tassembler / tmodulebase class cleanup
  136. Revision 1.4 2002/05/13 19:52:46 peter
  137. * a ppcppc can be build again
  138. Revision 1.3 2002/04/07 13:43:11 carl
  139. - moved type constant
  140. }