cpuinfo.pas 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. tcontrollertype =
  36. (ct_none
  37. );
  38. Const
  39. { Is there support for dealing with multiple microcontrollers available }
  40. { for this platform? }
  41. ControllerSupport = false;
  42. { We know that there are fields after sramsize
  43. but we don't care about this warning }
  44. {$PUSH}
  45. {$WARN 3177 OFF}
  46. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  47. (
  48. (controllertypestr:''; controllerunitstr:''; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  49. {$POP}
  50. { calling conventions supported by the code generator }
  51. supported_calling_conventions : tproccalloptions = [
  52. pocall_internproc
  53. ];
  54. cputypestr : array[tcputype] of string[9] = ('',
  55. 'JVM',
  56. 'JVMDALVIK'
  57. );
  58. fputypestr : array[tfputype] of string[8] = (
  59. 'NONE',
  60. 'STANDARD'
  61. );
  62. { Supported optimizations, only used for information }
  63. supported_optimizerswitches = genericlevel1optimizerswitches+
  64. genericlevel2optimizerswitches+
  65. genericlevel3optimizerswitches-
  66. { no need to write info about those }
  67. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  68. [cs_opt_loopunroll,cs_opt_nodecse];
  69. level1optimizerswitches = genericlevel1optimizerswitches;
  70. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
  71. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  72. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  73. Implementation
  74. end.