cpuinfo.pas 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {******************************************************************************
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl
  4. Basic Processor information
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************}
  17. unit cpuinfo;
  18. {$INCLUDE fpcdefs.inc}
  19. interface
  20. uses
  21. globtype;
  22. type
  23. {# Natural integer register type and size for the target machine }
  24. AWord=Longword;
  25. AInt = Longint;
  26. PAWord=^AWord;
  27. { the ordinal type used when evaluating constant integer expressions }
  28. TConstExprInt=int64;
  29. { this must be an ordinal type with the same size as a pointer }
  30. { Note: must be unsigned!! Otherwise, ugly code like }
  31. TConstPtrUInt=cardinal;
  32. bestreal = double;
  33. ts32real = single;
  34. ts64real = double;
  35. ts80real = extended;
  36. ts128real = type extended;
  37. ts64comp = type extended;
  38. pbestreal=^bestreal;
  39. { possible supported processors for this target }
  40. tprocessors=(no_processor,SPARC_V7,SPARC_V8,SPARC_V9);
  41. tfputype =(no_fpu,fpu_soft,fpu_hard);
  42. const
  43. {# Size of native extended floating point type }
  44. {SPARC architecture uses IEEE double floating point numbers}
  45. extended_size = 8;
  46. {# Size of a pointer }
  47. pointer_size = 4;
  48. {# Size of a multimedia register }
  49. mmreg_size = 8;
  50. { target cpu string (used by compiler options) }
  51. target_cpu_string = 'sparc';
  52. { size of the buffer used for setjump/longjmp
  53. the size of this buffer is deduced from the
  54. jmp_buf structure in setjumph.inc file }
  55. {$warning jmp_buf_size not set!}
  56. JMP_BUF_SIZE = 4; // 4 is used temporary to remove AllocTemp warning
  57. { calling conventions supported by the code generator }
  58. supported_calling_conventions : tproccalloptions = [
  59. pocall_internproc,
  60. pocall_compilerproc,
  61. pocall_inline,
  62. pocall_stdcall,
  63. pocall_cdecl,
  64. pocall_cppdecl
  65. ];
  66. processorsstr : array[tprocessors] of string[10] = ('',
  67. 'SPARC V7',
  68. 'SPARC V8',
  69. 'SPARC V9'
  70. );
  71. fputypestr : array[tfputype] of string[6] = ('',
  72. 'SOFT',
  73. 'HARD'
  74. );
  75. implementation
  76. end.
  77. {
  78. $Log$
  79. Revision 1.16 2004-04-28 15:19:03 florian
  80. + syscall directive support for MorphOS added
  81. Revision 1.15 2004/03/12 08:18:11 mazen
  82. - revert '../' from include path
  83. Revision 1.14 2004/03/11 16:22:28 mazen
  84. + help lazarus analyze the file
  85. Revision 1.13 2004/02/27 11:44:48 mazen
  86. + added AInt support
  87. Revision 1.12 2003/12/01 18:43:32 peter
  88. * s128real type is not compatible with s80real
  89. Revision 1.11 2003/11/28 13:09:07 mazen
  90. + defintion of ts128real
  91. + globtype is needed in interface uses clause
  92. Revision 1.10 2003/11/07 15:58:33 florian
  93. * Florian's culmutative nr. 1; contains:
  94. - invalid calling conventions for a certain cpu are rejected
  95. - arm softfloat calling conventions
  96. - -Sp for cpu dependend code generation
  97. - several arm fixes
  98. - remaining code for value open array paras on heap
  99. Revision 1.9 2003/09/03 15:55:01 peter
  100. * NEWRA branch merged
  101. Revision 1.8 2003/06/17 16:35:42 peter
  102. * JMP_BUF_SIZE changed to 4 to remove Alloctemp warnings
  103. Revision 1.7 2003/05/23 22:33:48 florian
  104. * fix some small flaws which prevent sparc linux system unit from compiling
  105. * some reformatting done
  106. Revision 1.6 2002/11/16 20:07:57 florian
  107. * made target_cpu_name lowercase
  108. Revision 1.5 2002/10/16 12:36:54 mazen
  109. * patch of Carl Eric added
  110. }