cpuinfo.pas 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. bestrealrec = TDoubleRec;
  18. ts32real = single;
  19. ts64real = double;
  20. ts80real = extended;
  21. ts128real = extended;
  22. ts64comp = comp;
  23. pbestreal=^bestreal;
  24. { possible supported processors for this target }
  25. tcputype =
  26. (cpu_none,
  27. cpu_ppc604,
  28. cpu_ppc750,
  29. cpu_ppc7400,
  30. cpu_ppc970
  31. );
  32. tfputype =
  33. (fpu_none,
  34. fpu_soft,
  35. fpu_standard
  36. );
  37. tcontrollertype =
  38. (ct_none
  39. );
  40. tcontrollerdatatype = record
  41. controllertypestr, controllerunitstr: string[20];
  42. cputype: tcputype; fputype: tfputype;
  43. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
  44. end;
  45. Const
  46. { Is there support for dealing with multiple microcontrollers available }
  47. { for this platform? }
  48. ControllerSupport = false;
  49. { We know that there are fields after sramsize
  50. but we don't care about this warning }
  51. {$PUSH}
  52. {$WARN 3177 OFF}
  53. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  54. (
  55. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  56. {$POP}
  57. { calling conventions supported by the code generator }
  58. supported_calling_conventions : tproccalloptions = [
  59. pocall_internproc,
  60. pocall_stdcall,
  61. pocall_safecall,
  62. { the difference to stdcall is only the name mangling }
  63. pocall_cdecl,
  64. { the difference to stdcall is only the name mangling }
  65. pocall_cppdecl,
  66. { pass all const records by reference }
  67. pocall_mwpascal
  68. ];
  69. cputypestr : array[tcputype] of string[10] = ('',
  70. '604',
  71. '750',
  72. '7400',
  73. '970'
  74. );
  75. fputypestr : array[tfputype] of string[8] = (
  76. 'NONE',
  77. 'SOFT',
  78. 'STANDARD'
  79. );
  80. { Supported optimizations, only used for information }
  81. supported_optimizerswitches = genericlevel1optimizerswitches+
  82. genericlevel2optimizerswitches+
  83. genericlevel3optimizerswitches-
  84. { no need to write info about those }
  85. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  86. [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_loopunroll,cs_opt_nodecse,
  87. cs_opt_tailrecursion,cs_opt_reorder_fields,cs_opt_fastmath];
  88. level1optimizerswitches = genericlevel1optimizerswitches;
  89. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_nodecse,cs_opt_tailrecursion];
  90. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  91. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  92. Implementation
  93. end.