2
0

cpuinfo.pas 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {
  2. Copyright (c) 1998-2002 by the Free Pascal development team
  3. Basic Processor information for the PowerPC
  4. See the file COPYING.FPC, included in this distribution,
  5. for details about the copyright.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. **********************************************************************}
  10. unit CPUInfo;
  11. {$i fpcdefs.inc}
  12. interface
  13. uses
  14. globtype;
  15. type
  16. bestreal = double;
  17. {$if FPC_FULLVERSION>20700}
  18. bestrealrec = TDoubleRec;
  19. {$endif FPC_FULLVERSION>20700}
  20. ts32real = single;
  21. ts64real = double;
  22. ts80real = extended;
  23. ts128real = extended;
  24. ts64comp = comp;
  25. pbestreal = ^bestreal;
  26. { possible supported processors for this target }
  27. tcputype = (cpu_none,
  28. cpu_ppc970
  29. );
  30. tfputype =
  31. (fpu_none,
  32. fpu_soft,
  33. fpu_standard
  34. );
  35. tcontrollertype =
  36. (ct_none
  37. );
  38. tcontrollerdatatype = record
  39. controllertypestr, controllerunitstr: string[20];
  40. cputype: tcputype; fputype: tfputype;
  41. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
  42. end;
  43. Const
  44. { Is there support for dealing with multiple microcontrollers available }
  45. { for this platform? }
  46. ControllerSupport = false;
  47. { We know that there are fields after sramsize
  48. but we don't care about this warning }
  49. {$PUSH}
  50. {$WARN 3177 OFF}
  51. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  52. (
  53. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  54. {$POP}
  55. { calling conventions supported by the code generator }
  56. supported_calling_conventions: tproccalloptions = [
  57. pocall_internproc,
  58. pocall_stdcall,
  59. { the difference to stdcall is only the name mangling }
  60. pocall_cdecl,
  61. { the difference to stdcall is only the name mangling }
  62. pocall_cppdecl,
  63. { the difference with stdcall is that all const record
  64. parameters are passed by reference }
  65. pocall_mwpascal
  66. ];
  67. cputypestr: array[tcputype] of string[10] = ('',
  68. '970'
  69. );
  70. fputypestr: array[tfputype] of string[8] = ('',
  71. 'SOFT',
  72. 'STANDARD'
  73. );
  74. { Supported optimizations, only used for information }
  75. supported_optimizerswitches = genericlevel1optimizerswitches+
  76. genericlevel2optimizerswitches+
  77. genericlevel3optimizerswitches-
  78. { no need to write info about those }
  79. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  80. [cs_opt_regvar,cs_opt_loopunroll,cs_opt_nodecse,
  81. cs_opt_tailrecursion,cs_opt_reorder_fields,cs_opt_fastmath];
  82. level1optimizerswitches = genericlevel1optimizerswitches;
  83. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
  84. [cs_opt_regvar,cs_opt_stackframe,cs_opt_nodecse,cs_opt_tailrecursion];
  85. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  86. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  87. implementation
  88. end.