cpuinfo.pas 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. {
  2. Copyright (c) 2010 by Free Pascal and Lazarus foundation
  3. Basic Processor information for the WebAssembly
  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. { wasm32, same as cpu_none }
  30. cpu_wasm32
  31. );
  32. tfputype =
  33. (fpu_none,
  34. fpu_standard
  35. );
  36. tcontrollertype =
  37. (ct_none
  38. );
  39. tcontrollerdatatype = record
  40. controllertypestr, controllerunitstr: string[20];
  41. cputype: tcputype; fputype: tfputype;
  42. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
  43. end;
  44. Const
  45. { Is there support for dealing with multiple microcontrollers available }
  46. { for this platform? }
  47. ControllerSupport = false;
  48. { We know that there are fields after sramsize
  49. but we don't care about this warning }
  50. {$PUSH}
  51. {$WARN 3177 OFF}
  52. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  53. (
  54. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  55. {$POP}
  56. { calling conventions supported by the code generator }
  57. supported_calling_conventions : tproccalloptions = [
  58. pocall_internproc
  59. ];
  60. cputypestr : array[tcputype] of string[9] = ('',
  61. 'WASM32'
  62. );
  63. fputypestr : array[tfputype] of string[8] = (
  64. 'NONE',
  65. 'STANDARD'
  66. );
  67. { Supported optimizations, only used for information }
  68. supported_optimizerswitches = genericlevel1optimizerswitches+
  69. genericlevel2optimizerswitches+
  70. genericlevel3optimizerswitches-
  71. { no need to write info about those }
  72. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  73. [cs_opt_loopunroll,cs_opt_nodecse];
  74. level1optimizerswitches = genericlevel1optimizerswitches;
  75. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [cs_opt_nodecse];
  76. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  77. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  78. Implementation
  79. end.