cpuinfo.pas 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. PAWord = ^AWord;
  19. AInt = longint;
  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 = real;
  29. ts32real = single;
  30. ts64real = double;
  31. ts80real = extended;
  32. ts128real = type extended;
  33. ts64comp = extended;
  34. pbestreal=^bestreal;
  35. { possible supported processors for this target }
  36. tprocessors =
  37. (no_processor,
  38. MC68000,
  39. MC68020,
  40. Coldfire
  41. );
  42. tfputype =
  43. (no_fpuprocessor,
  44. fpu_soft,
  45. fpu_libgcc,
  46. fpu_68881
  47. );
  48. Const
  49. {# Size of native extended floating point type }
  50. extended_size = 8;
  51. {# Size of a pointer }
  52. pointer_size = 4;
  53. {# Size of a multimedia register }
  54. mmreg_size = 16;
  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. jmp_buf_size = 28;
  60. { target cpu string (used by compiler options) }
  61. target_cpu_string = 'm68k';
  62. { calling conventions supported by the code generator }
  63. supported_calling_conventions = [
  64. pocall_internproc,
  65. pocall_compilerproc,
  66. pocall_inline,
  67. pocall_stdcall,
  68. { the difference to stdcall is only the name mangling }
  69. pocall_cdecl,
  70. { the difference to stdcall is only the name mangling }
  71. pocall_cppdecl,
  72. { this used by the PalmOS port only }
  73. pocall_palmossyscall
  74. ];
  75. processorsstr : array[tprocessors] of string[5] = ('',
  76. '68000',
  77. '68020',
  78. 'COLDFIRE'
  79. );
  80. fputypestr : array[tfputype] of string[6] = ('',
  81. 'SOFT',
  82. 'LIBGCC',
  83. '68881'
  84. );
  85. Implementation
  86. end.
  87. {
  88. $Log$
  89. Revision 1.9 2004-04-18 21:13:59 florian
  90. * more adaptions for m68k
  91. Revision 1.8 2004/01/30 12:17:18 florian
  92. * fixed some m68k compilation problems
  93. Revision 1.7 2003/11/07 15:58:32 florian
  94. * Florian's culmutative nr. 1; contains:
  95. - invalid calling conventions for a certain cpu are rejected
  96. - arm softfloat calling conventions
  97. - -Sp for cpu dependend code generation
  98. - several arm fixes
  99. - remaining code for value open array paras on heap
  100. Revision 1.6 2002/12/14 15:02:03 carl
  101. * maxoperands -> max_operands (for portability in rautils.pas)
  102. * fix some range-check errors with loadconst
  103. + add ncgadd unit to m68k
  104. * some bugfix of a_param_reg with LOC_CREFERENCE
  105. Revision 1.5 2002/09/07 20:53:28 carl
  106. * cardinal -> longword
  107. Revision 1.4 2002/09/07 15:25:13 peter
  108. * old logs removed and tabs fixed
  109. Revision 1.3 2002/08/15 15:15:55 carl
  110. * jmpbuf size allocation for exceptions is now cpu specific (as it should)
  111. * more generic nodes for maths
  112. * several fixes for better m68k support
  113. Revision 1.2 2002/08/12 15:08:44 carl
  114. + stab register indexes for powerpc (moved from gdb to cpubase)
  115. + tprocessor enumeration moved to cpuinfo
  116. + linker in target_info is now a class
  117. * many many updates for m68k (will soon start to compile)
  118. - removed some ifdef or correct them for correct cpu
  119. Revision 1.1 2002/08/11 08:06:09 carl
  120. + try to commit this ** file again
  121. Revision 1.7 2002/05/18 13:34:26 peter
  122. * readded missing revisions
  123. Revision 1.6 2002/05/16 19:46:53 carl
  124. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  125. + try to fix temp allocation (still in ifdef)
  126. + generic constructor calls
  127. + start of tassembler / tmodulebase class cleanup
  128. Revision 1.4 2002/05/13 19:52:46 peter
  129. * a ppcppc can be build again
  130. Revision 1.3 2002/04/07 13:43:11 carl
  131. - moved type constant
  132. }