/compiler/jvm/cpuinfo.pas

https://github.com/slibre/freepascal · Pascal · 79 lines · 44 code · 15 blank · 20 comment · 0 complexity · d7c8ded43c02b859db9ac1e68b5ab768 MD5 · raw file

  1. {
  2. Copyright (c) 2010 by the Free Pascal development team
  3. Basic Processor information for the Java VM
  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. { jvm, same as cpu_none }
  26. cpu_jvm,
  27. { jvm byte code to be translated into Dalvik bytecode: more type-
  28. sensitive }
  29. cpu_dalvik
  30. );
  31. tfputype =
  32. (fpu_none,
  33. fpu_standard
  34. );
  35. Const
  36. { calling conventions supported by the code generator }
  37. supported_calling_conventions : tproccalloptions = [
  38. pocall_internproc
  39. ];
  40. cputypestr : array[tcputype] of string[9] = ('',
  41. 'JVM',
  42. 'JVMDALVIK'
  43. );
  44. fputypestr : array[tfputype] of string[8] = (
  45. 'NONE',
  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_loopunroll,cs_opt_nodecse];
  55. level1optimizerswitches = genericlevel1optimizerswitches;
  56. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
  57. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  58. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  59. Implementation
  60. end.