cpuinfo.pas 3.3 KB

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