cpuinfo.pas 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. interface
  12. uses
  13. globtype;
  14. type
  15. bestreal = double;
  16. ts32real = single;
  17. ts64real = double;
  18. ts80real = extended;
  19. ts128real = extended;
  20. ts64comp = comp;
  21. pbestreal = ^bestreal;
  22. { possible supported processors for this target }
  23. tcputype = (cpu_none,
  24. cpu_ppc970
  25. );
  26. tfputype =
  27. (fpu_none,
  28. fpu_soft,
  29. fpu_standard
  30. );
  31. const
  32. { calling conventions supported by the code generator }
  33. supported_calling_conventions: tproccalloptions = [
  34. pocall_internproc,
  35. pocall_stdcall,
  36. { the difference to stdcall is only the name mangling }
  37. pocall_cdecl,
  38. { the difference to stdcall is only the name mangling }
  39. pocall_cppdecl
  40. ];
  41. cputypestr: array[tcputype] of string[10] = ('',
  42. '970'
  43. );
  44. fputypestr: array[tfputype] of string[8] = ('',
  45. 'SOFT',
  46. 'STANDARD'
  47. );
  48. { Supported optimizations, only used for information }
  49. supported_optimizerswitches = genericlevel1optimizerswitches+
  50. genericlevel2optimizerswitches+
  51. genericlevel3optimizerswitches-
  52. { no need to write info about those }
  53. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  54. [cs_opt_regvar,cs_opt_loopunroll];
  55. level1optimizerswitches = genericlevel1optimizerswitches;
  56. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_regvar,cs_opt_stackframe];
  57. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  58. implementation
  59. end.