cpuinfo.pas 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. Interface
  12. uses
  13. globtype;
  14. Type
  15. bestreal = double;
  16. ts32real = single;
  17. ts64real = double;
  18. ts80real = type extended;
  19. ts128real = type extended;
  20. ts64comp = comp;
  21. pbestreal=^bestreal;
  22. { possible supported processors for this target }
  23. tcputype =
  24. (cpu_none,
  25. cpu_armv8
  26. );
  27. Type
  28. tfputype =
  29. (fpu_none,
  30. fpu_vfp
  31. );
  32. tcontrollertype =
  33. (ct_none
  34. );
  35. Const
  36. {# Size of native extended floating point type }
  37. extended_size = 8;
  38. {# Size of a multimedia register }
  39. mmreg_size = 16;
  40. { target cpu string (used by compiler options) }
  41. target_cpu_string = 'aarch64';
  42. { calling conventions supported by the code generator }
  43. supported_calling_conventions : tproccalloptions = [
  44. pocall_internproc,
  45. pocall_safecall,
  46. pocall_stdcall,
  47. { same as stdcall only different name mangling }
  48. pocall_cdecl,
  49. { same as stdcall only different name mangling }
  50. pocall_cppdecl,
  51. { same as stdcall but floating point numbers are handled like equal sized integers }
  52. pocall_softfloat,
  53. { same as stdcall (requires that all const records are passed by
  54. reference, but that's already done for stdcall) }
  55. pocall_mwpascal,
  56. { used for interrupt handling }
  57. pocall_interrupt
  58. ];
  59. cputypestr : array[tcputype] of string[8] = ('',
  60. 'ARMV8'
  61. );
  62. fputypestr : array[tfputype] of string[9] = ('',
  63. 'VFP'
  64. );
  65. { Supported optimizations, only used for information }
  66. supported_optimizerswitches = genericlevel1optimizerswitches+
  67. genericlevel2optimizerswitches+
  68. genericlevel3optimizerswitches-
  69. { no need to write info about those }
  70. [cs_opt_level1,cs_opt_level2,cs_opt_level3]+
  71. [cs_opt_regvar,cs_opt_loopunroll,cs_opt_tailrecursion,
  72. cs_opt_stackframe,cs_opt_nodecse,cs_opt_reorder_fields,cs_opt_fastmath];
  73. level1optimizerswitches = genericlevel1optimizerswitches;
  74. level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
  75. [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion,cs_opt_nodecse];
  76. level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [cs_opt_scheduler{,cs_opt_loopunroll}];
  77. level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [];
  78. Implementation
  79. end.