cpuinfo.pas 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. {
  2. Copyright (c) 1998-2002 by the Free Pascal development team
  3. Basic Processor information for AArch64
  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 = type extended;
  23. ts128real = type extended;
  24. ts64comp = comp;
  25. pbestreal=^bestreal;
  26. { possible supported processors for this target }
  27. tcputype =
  28. (cpu_none,
  29. cpu_armv8
  30. );
  31. Type
  32. tfputype =
  33. (fpu_none,
  34. fpu_vfp
  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. fputypestrllvm : array[tfputype] of string[6] = ('',
  46. ''
  47. );
  48. { Is there support for dealing with multiple microcontrollers available }
  49. { for this platform? }
  50. ControllerSupport = false; (* Not yet at least ;-) *)
  51. {# Size of native extended floating point type }
  52. extended_size = 8;
  53. { target cpu string (used by compiler options) }
  54. target_cpu_string = 'aarch64';
  55. { We know that there are fields after sramsize
  56. but we don't care about this warning }
  57. {$PUSH}
  58. {$WARN 3177 OFF}
  59. embedded_controllers : array [tcontrollertype] of tcontrollerdatatype =
  60. (
  61. (controllertypestr:''; controllerunitstr:''; cputype:cpu_none; fputype:fpu_none; flashbase:0; flashsize:0; srambase:0; sramsize:0));
  62. {$POP}
  63. { calling conventions supported by the code generator }
  64. supported_calling_conventions : tproccalloptions = [
  65. pocall_internproc,
  66. pocall_safecall,
  67. pocall_stdcall,
  68. { same as stdcall only different name mangling }
  69. pocall_cdecl,
  70. { same as stdcall only different name mangling }
  71. pocall_cppdecl,
  72. { same as stdcall but floating point numbers are handled like equal sized integers }
  73. pocall_softfloat,
  74. { same as stdcall (requires that all const records are passed by
  75. reference, but that's already done for stdcall) }
  76. pocall_mwpascal,
  77. { used for interrupt handling }
  78. pocall_interrupt
  79. ];
  80. cputypestr : array[tcputype] of string[8] = ('',
  81. 'ARMV8'
  82. );
  83. fputypestr : array[tfputype] of string[9] = ('',
  84. 'VFP'
  85. );
  86. { Supported optimizations, only used for information }
  87. supported_optimizerswitches = genericlevel1optimizerswitches+
  88. genericlevel2optimizerswitches+
  89. genericlevel3optimizerswitches-
  90. { no need to write info about those }
  91. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  92. [cs_opt_regvar,cs_opt_loopunroll,cs_opt_tailrecursion,
  93. cs_opt_nodecse,cs_opt_reorder_fields,cs_opt_fastmath];
  94. level1optimizerswitches = genericlevel1optimizerswitches;
  95. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
  96. [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion,cs_opt_nodecse];
  97. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}];
  98. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  99. Implementation
  100. end.