cpuinfo.pas 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by the Free Pascal development team
  4. Basic Processor information for the ARM
  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. PAInt = ^AInt;
  21. { this must be an ordinal type with the same size as a pointer }
  22. { to allow some dirty type casts for example when using }
  23. { tconstsym.value }
  24. { Note: must be unsigned!! Otherwise, ugly code like }
  25. { pointer(-1) will result in a pointer with the value }
  26. { $fffffffffffffff on a 32bit machine if the compiler uses }
  27. { int64 constants internally (JM) }
  28. TConstPtrUInt = Longword;
  29. bestreal = double;
  30. ts32real = single;
  31. ts64real = double;
  32. ts80real = type extended;
  33. ts128real = type extended;
  34. ts64comp = comp;
  35. pbestreal=^bestreal;
  36. { possible supported processors for this target }
  37. tprocessors =
  38. (no_processor,
  39. armv3,
  40. armv4,
  41. armv5
  42. );
  43. tfputype =
  44. (no_fpuprocessor,
  45. fpu_soft,
  46. fpu_libgcc,
  47. fpu_fpa,
  48. fpu_fpa10,
  49. fpu_fpa11,
  50. fpu_vfp
  51. );
  52. Const
  53. {# Size of native extended floating point type }
  54. extended_size = 8;
  55. {# Size of a pointer }
  56. pointer_size = 4;
  57. {# Size of a multimedia register }
  58. mmreg_size = 16;
  59. { target cpu string (used by compiler options) }
  60. target_cpu_string = 'arm';
  61. { size of the buffer used for setjump/longjmp
  62. the size of this buffer is deduced from the
  63. jmp_buf structure in setjumph.inc file
  64. }
  65. { for linux: }
  66. jmp_buf_size = 220; { according to sizeof(jmp_buf) on my Zaurus (FK) }
  67. { calling conventions supported by the code generator }
  68. supported_calling_conventions : tproccalloptions = [
  69. pocall_internproc,
  70. pocall_compilerproc,
  71. pocall_inline,
  72. pocall_stdcall,
  73. { same as stdcall only different name mangling }
  74. pocall_cdecl,
  75. { same as stdcall only different name mangling }
  76. pocall_cppdecl,
  77. { same as stdcall but floating point numbers are handled like equal sized integers }
  78. pocall_softfloat
  79. ];
  80. processorsstr : array[tprocessors] of string[5] = ('',
  81. 'ARMV3',
  82. 'ARMV4',
  83. 'ARMV5'
  84. );
  85. fputypestr : array[tfputype] of string[6] = ('',
  86. 'SOFT',
  87. 'LIBGCC',
  88. 'FPA',
  89. 'FPA10',
  90. 'FPA11',
  91. 'VFP'
  92. );
  93. Implementation
  94. end.
  95. {
  96. $Log$
  97. Revision 1.7 2004-04-28 15:19:03 florian
  98. + syscall directive support for MorphOS added
  99. Revision 1.6 2004/03/06 20:35:19 florian
  100. * fixed arm compilation
  101. * cleaned up code generation for exported linux procedures
  102. Revision 1.5 2003/12/01 18:43:32 peter
  103. * s128real type is not compatible with s80real
  104. Revision 1.4 2003/11/17 23:23:47 florian
  105. + first part of arm assembler reader
  106. Revision 1.3 2003/11/07 15:58:32 florian
  107. * Florian's culmutative nr. 1; contains:
  108. - invalid calling conventions for a certain cpu are rejected
  109. - arm softfloat calling conventions
  110. - -Sp for cpu dependend code generation
  111. - several arm fixes
  112. - remaining code for value open array paras on heap
  113. Revision 1.2 2003/08/25 23:20:38 florian
  114. + started to implement FPU support for the ARM
  115. * fixed a lot of other things
  116. Revision 1.1 2003/07/21 16:35:30 florian
  117. * very basic stuff for the arm
  118. }