cpuinfo.pas 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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 = type extended;
  31. ts128real = type extended;
  32. ts64comp = comp;
  33. pbestreal=^bestreal;
  34. { possible supported processors for this target }
  35. tprocessors =
  36. (no_processor,
  37. armv3,
  38. armv4,
  39. armv5
  40. );
  41. tfputype =
  42. (no_fpuprocessor,
  43. fpu_soft,
  44. fpu_libgcc,
  45. fpu_fpa,
  46. fpu_fpa10,
  47. fpu_fpa11,
  48. fpu_vfp
  49. );
  50. Const
  51. {# Size of native extended floating point type }
  52. extended_size = 8;
  53. {# Size of a pointer }
  54. pointer_size = 4;
  55. {# Size of a multimedia register }
  56. mmreg_size = 16;
  57. { target cpu string (used by compiler options) }
  58. target_cpu_string = 'arm';
  59. { size of the buffer used for setjump/longjmp
  60. the size of this buffer is deduced from the
  61. jmp_buf structure in setjumph.inc file
  62. }
  63. { for linux: }
  64. jmp_buf_size = 220; { according to sizeof(jmp_buf) on my Zaurus (FK) }
  65. { calling conventions supported by the code generator }
  66. supported_calling_conventions = [
  67. pocall_internproc,
  68. pocall_compilerproc,
  69. pocall_inline,
  70. pocall_stdcall,
  71. { same as stdcall only different name mangling }
  72. pocall_cdecl,
  73. { same as stdcall only different name mangling }
  74. pocall_cppdecl,
  75. { same as stdcall but floating point numbers are handled like equal sized integers }
  76. pocall_softfloat
  77. ];
  78. processorsstr : array[tprocessors] of string[5] = ('',
  79. 'ARMV3',
  80. 'ARMV4',
  81. 'ARMV5'
  82. );
  83. fputypestr : array[tfputype] of string[6] = ('',
  84. 'SOFT',
  85. 'LIBGCC',
  86. 'FPA',
  87. 'FPA10',
  88. 'FPA11',
  89. 'VFP'
  90. );
  91. Implementation
  92. end.
  93. {
  94. $Log$
  95. Revision 1.5 2003-12-01 18:43:32 peter
  96. * s128real type is not compatible with s80real
  97. Revision 1.4 2003/11/17 23:23:47 florian
  98. + first part of arm assembler reader
  99. Revision 1.3 2003/11/07 15:58:32 florian
  100. * Florian's culmutative nr. 1; contains:
  101. - invalid calling conventions for a certain cpu are rejected
  102. - arm softfloat calling conventions
  103. - -Sp for cpu dependend code generation
  104. - several arm fixes
  105. - remaining code for value open array paras on heap
  106. Revision 1.2 2003/08/25 23:20:38 florian
  107. + started to implement FPU support for the ARM
  108. * fixed a lot of other things
  109. Revision 1.1 2003/07/21 16:35:30 florian
  110. * very basic stuff for the arm
  111. }