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. bestrealrec = TDoubleRec;
  18. ts32real = single;
  19. ts64real = double;
  20. ts80real = extended;
  21. ts128real = extended;
  22. ts64comp = comp;
  23. pbestreal=^bestreal;
  24. { possible supported processors for this target }
  25. tcputype =
  26. (cpu_none,
  27. { wasm32, same as cpu_none }
  28. cpu_wasm32
  29. );
  30. tfputype =
  31. (fpu_none,
  32. fpu_standard
  33. );
  34. tcontrollertype =
  35. (ct_none
  36. );
  37. tcontrollerdatatype = record
  38. controllertypestr, controllerunitstr: string[20];
  39. cputype: tcputype; fputype: tfputype;
  40. flashbase, flashsize, srambase, sramsize, eeprombase, eepromsize, bootbase, bootsize: dword;
  41. end;
  42. Const
  43. { Is there support for dealing with multiple microcontrollers available }
  44. { for this platform? }
  45. ControllerSupport = false;
  46. { We know that there are fields after sramsize
  47. but we don't care about this warning }
  48. {$PUSH}
  49. {$WARN 3177 OFF}
  50. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  51. (
  52. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  53. {$POP}
  54. { calling conventions supported by the code generator }
  55. supported_calling_conventions : tproccalloptions = [
  56. pocall_internproc,
  57. pocall_stdcall,
  58. pocall_cdecl
  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.