cpuinfo.pas 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 =
  24. (cpu_none,
  25. cpu_ppc604,
  26. cpu_ppc750,
  27. cpu_ppc7400,
  28. cpu_ppc970
  29. );
  30. tfputype =
  31. (fpu_none,
  32. fpu_soft,
  33. fpu_standard
  34. );
  35. Const
  36. { calling conventions supported by the code generator }
  37. supported_calling_conventions : tproccalloptions = [
  38. pocall_internproc,
  39. pocall_stdcall,
  40. { the difference to stdcall is only the name mangling }
  41. pocall_cdecl,
  42. { the difference to stdcall is only the name mangling }
  43. pocall_cppdecl,
  44. { pass all const records by reference }
  45. pocall_mwpascal
  46. ];
  47. cputypestr : array[tcputype] of string[10] = ('',
  48. '604',
  49. '750',
  50. '7400',
  51. '970'
  52. );
  53. fputypestr : array[tfputype] of string[8] = (
  54. 'NONE',
  55. 'SOFT',
  56. 'STANDARD'
  57. );
  58. { Supported optimizations, only used for information }
  59. supported_optimizerswitches = genericlevel1optimizerswitches+
  60. genericlevel2optimizerswitches+
  61. genericlevel3optimizerswitches-
  62. { no need to write info about those }
  63. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  64. [cs_opt_regvar,cs_opt_loopunroll,cs_opt_nodecse,cs_opt_tailrecursion];
  65. level1optimizerswitches = genericlevel1optimizerswitches;
  66. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_regvar,cs_opt_nodecse,cs_opt_tailrecursion];
  67. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  68. Implementation
  69. end.