cpuinfo.pas 3.0 KB

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