cpuinfo.pas 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. {$if FPC_FULLVERSION>20700}
  17. bestrealrec = TDoubleRec;
  18. {$endif FPC_FULLVERSION>20700}
  19. ts32real = single;
  20. ts64real = double;
  21. ts80real = extended;
  22. ts128real = extended;
  23. ts64comp = comp;
  24. pbestreal=^bestreal;
  25. { possible supported processors for this target }
  26. tcputype =
  27. (cpu_none,
  28. { jvm, same as cpu_none }
  29. cpu_jvm,
  30. { jvm byte code to be translated into Dalvik bytecode: more type-
  31. sensitive }
  32. cpu_dalvik
  33. );
  34. tfputype =
  35. (fpu_none,
  36. fpu_standard
  37. );
  38. tcontrollertype =
  39. (ct_none
  40. );
  41. tcontrollerdatatype = record
  42. controllertypestr, controllerunitstr: string[20];
  43. cputype: tcputype; fputype: tfputype;
  44. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
  45. end;
  46. Const
  47. { Is there support for dealing with multiple microcontrollers available }
  48. { for this platform? }
  49. ControllerSupport = false;
  50. { We know that there are fields after sramsize
  51. but we don't care about this warning }
  52. {$PUSH}
  53. {$WARN 3177 OFF}
  54. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  55. (
  56. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  57. {$POP}
  58. { calling conventions supported by the code generator }
  59. supported_calling_conventions : tproccalloptions = [
  60. pocall_internproc
  61. ];
  62. cputypestr : array[tcputype] of string[9] = ('',
  63. 'JVM',
  64. 'JVMDALVIK'
  65. );
  66. fputypestr : array[tfputype] of string[8] = (
  67. 'NONE',
  68. 'STANDARD'
  69. );
  70. { Supported optimizations, only used for information }
  71. supported_optimizerswitches = genericlevel1optimizerswitches+
  72. genericlevel2optimizerswitches+
  73. genericlevel3optimizerswitches-
  74. { no need to write info about those }
  75. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  76. [cs_opt_loopunroll,cs_opt_nodecse];
  77. level1optimizerswitches = genericlevel1optimizerswitches;
  78. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
  79. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  80. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  81. Implementation
  82. end.