cpuinfo.pas 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. Type
  14. { Architecture word - Native unsigned type }
  15. AWord = Longword;
  16. PAWord = ^AWord;
  17. { this must be an ordinal type with the same size as a pointer }
  18. { to allow some dirty type casts for example when using }
  19. { tconstsym.value }
  20. { Note: must be unsigned!! Otherwise, ugly code like }
  21. { pointer(-1) will result in a pointer with the value }
  22. { $fffffffffffffff on a 32bit machine if the compiler uses }
  23. { int64 constants internally (JM) }
  24. TConstPtrUInt = Longword;
  25. bestreal = double;
  26. ts32real = single;
  27. ts64real = double;
  28. ts80real = extended;
  29. ts64comp = comp;
  30. pbestreal=^bestreal;
  31. { possible supported processors for this target }
  32. tprocessors =
  33. (no_processor,
  34. ppc601,
  35. ppc604
  36. );
  37. tfputype =
  38. (no_fpuprocessor,
  39. fpu_soft,
  40. fpu_standard
  41. );
  42. Const
  43. {# Size of native extended floating point type }
  44. extended_size = 8;
  45. {# Size of a pointer }
  46. pointer_size = 4;
  47. {# Size of a multimedia register }
  48. mmreg_size = 16;
  49. { target cpu string (used by compiler options) }
  50. target_cpu_string = 'powerpc';
  51. { size of the buffer used for setjump/longjmp
  52. the size of this buffer is deduced from the
  53. jmp_buf structure in setjumph.inc file
  54. }
  55. { for linux: }
  56. jmp_buf_size = 232;
  57. { calling conventions supported by the code generator }
  58. supported_calling_conventions = [
  59. pocall_internproc,
  60. pocall_compilerproc,
  61. pocall_inline,
  62. pocall_stdcall,
  63. { the difference to stdcall is only the name mangling }
  64. pocall_cdecl,
  65. { the difference to stdcall is only the name mangling }
  66. pocall_cppdecl
  67. ];
  68. Implementation
  69. end.
  70. {
  71. $Log$
  72. Revision 1.15 2003-11-07 15:58:33 florian
  73. * Florian's culmutative nr. 1; contains:
  74. - invalid calling conventions for a certain cpu are rejected
  75. - arm softfloat calling conventions
  76. - -Sp for cpu dependend code generation
  77. - several arm fixes
  78. - remaining code for value open array paras on heap
  79. Revision 1.14 2003/09/03 11:18:37 florian
  80. * fixed arm concatcopy
  81. + arm support in the common compiler sources added
  82. * moved some generic cg code around
  83. + tfputype added
  84. * ...
  85. Revision 1.13 2003/04/26 20:15:22 florian
  86. * fixed setjmp record size
  87. Revision 1.12 2002/09/07 20:57:08 carl
  88. * cardinal -> longword
  89. Revision 1.11 2002/09/07 15:25:14 peter
  90. * old logs removed and tabs fixed
  91. Revision 1.10 2002/08/15 15:15:55 carl
  92. * jmpbuf size allocation for exceptions is now cpu specific (as it should)
  93. * more generic nodes for maths
  94. * several fixes for better m68k support
  95. Revision 1.9 2002/08/12 15:08:44 carl
  96. + stab register indexes for powerpc (moved from gdb to cpubase)
  97. + tprocessor enumeration moved to cpuinfo
  98. + linker in target_info is now a class
  99. * many many updates for m68k (will soon start to compile)
  100. - removed some ifdef or correct them for correct cpu
  101. Revision 1.8 2002/08/10 14:52:52 carl
  102. + moved target_cpu_string to cpuinfo
  103. * renamed asmmode enum.
  104. * assembler reader has now less ifdef's
  105. * move from nppcmem.pas -> ncgmem.pas vec. node.
  106. Revision 1.7 2002/05/18 13:34:26 peter
  107. * readded missing revisions
  108. Revision 1.6 2002/05/16 19:46:53 carl
  109. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  110. + try to fix temp allocation (still in ifdef)
  111. + generic constructor calls
  112. + start of tassembler / tmodulebase class cleanup
  113. Revision 1.4 2002/05/13 19:52:46 peter
  114. * a ppcppc can be build again
  115. Revision 1.3 2002/04/07 13:43:11 carl
  116. - moved type constant
  117. }