fpcdefs.inc 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. {$mode objfpc}
  2. {$asmmode default}
  3. {$H-}
  4. {$goto on}
  5. {$inline on}
  6. {$interfaces corba}
  7. { This reduces the memory requirements a lot }
  8. {$PACKENUM 1}
  9. {$ifdef FPC_HAS_VARSETS}
  10. {$ifndef FPC_BIG_ENDIAN}
  11. { $define USE_PACKSET1}
  12. {$endif}
  13. {$endif FPC_HAS_VARSETS}
  14. {$ifdef USE_PACKSET1}
  15. {$PACKSET 1}
  16. {$endif USE_PACKSET1}
  17. { We don't use exceptions, so turn off the implicit
  18. exceptions in the constructors }
  19. {$IMPLICITEXCEPTIONS OFF}
  20. { Inline small functions, but not when EXTDEBUG is used }
  21. {$ifndef EXTDEBUG}
  22. {$define USEINLINE}
  23. {$endif EXTDEBUG}
  24. {$define USEEXCEPT}
  25. { This fake CPU is used to allow incorporation of globtype unit
  26. into utils/ppudump without any CPU specific code PM }
  27. {$ifdef generic_cpu}
  28. {$define cpu32bit}
  29. {$define cpu32bitaddr}
  30. {$define cpu32bitalu}
  31. {$define cpuflags}
  32. {$define cpuextended}
  33. {$endif generic_cpu}
  34. {$ifdef cpuarm}
  35. {$packrecords c}
  36. {$endif cpuarm}
  37. {$ifdef i8086}
  38. {$define cpu16bit}
  39. {$define cpu16bitaddr}
  40. {$define cpu16bitalu}
  41. {$define x86}
  42. {$define cpuflags}
  43. {$define cpuextended}
  44. {//$define SUPPORT_MMX}
  45. {$define cpumm}
  46. {$define fewintregisters}
  47. {//$define cpurox}
  48. {$define SUPPORT_SAFECALL}
  49. {$define cpuneedsmulhelper}
  50. { TODO: add another define in order to disable the div helper for 16-bit divs? }
  51. {$define cpuneedsdiv32helper}
  52. {$define VOLATILE_ES}
  53. {$define SUPPORT_GET_FRAME}
  54. {$endif i8086}
  55. {$ifdef i386}
  56. {$define cpu32bit}
  57. {$define cpu32bitaddr}
  58. {$define cpu32bitalu}
  59. {$define x86}
  60. {$define cpuflags}
  61. {$define cpuextended}
  62. {$define SUPPORT_MMX}
  63. {$define cpumm}
  64. {$define fewintregisters}
  65. {$define cpurox}
  66. {$define SUPPORT_SAFECALL}
  67. {$define SUPPORT_GET_FRAME}
  68. {$endif i386}
  69. {$ifdef x86_64}
  70. {$define x86}
  71. {$define cpuflags}
  72. {$define cpu64bitalu}
  73. {$define cpu64bitaddr}
  74. {$define cpuextended}
  75. {$define cpufloat128}
  76. {$define cputargethasfixedstack}
  77. {$define cpumm}
  78. {$define cpurox}
  79. {$define cpurefshaveindexreg}
  80. {$define SUPPORT_SAFECALL}
  81. {$define SUPPORT_GET_FRAME}
  82. {$endif x86_64}
  83. {$ifdef ia64}
  84. {$define cpuflags}
  85. {$define cpu64bitalu}
  86. {$define cpu64bitaddr}
  87. {$define cpuextended}
  88. {$define cpufloat128}
  89. {$endif ia64}
  90. {$ifdef alpha}
  91. {$define cpu64bitalu}
  92. {$define cpu64bitaddr}
  93. {$define cpurefshaveindexreg}
  94. {$endif alpha}
  95. {$ifdef sparc}
  96. {$define cpu32bit}
  97. {$define cpu32bitaddr}
  98. {$define cpu32bitalu}
  99. {$define cpuflags}
  100. {$define cputargethasfixedstack}
  101. {$define cpurefshaveindexreg}
  102. {$define SUPPORT_SAFECALL}
  103. {$endif sparc}
  104. {$ifdef powerpc}
  105. {$define cpu32bit}
  106. {$define cpu32bitaddr}
  107. {$define cpu32bitalu}
  108. {$define cpuflags}
  109. {$define cputargethasfixedstack}
  110. {$define cpumm}
  111. {$define cpurox}
  112. {$define cpurefshaveindexreg}
  113. {$define fpc_compiler_has_fixup_jmps}
  114. {$endif powerpc}
  115. {$ifdef powerpc64}
  116. {$define cpu64bitalu}
  117. {$define cpu64bitaddr}
  118. {$define cpuflags}
  119. {$define cputargethasfixedstack}
  120. {$define cpumm}
  121. {$define cpurox}
  122. {$define cpurefshaveindexreg}
  123. {$define fpc_compiler_has_fixup_jmps}
  124. {$define cpuno32bitops}
  125. {$endif powerpc64}
  126. {$ifdef arm}
  127. {$define cpu32bit}
  128. {$define cpu32bitaddr}
  129. {$define cpu32bitalu}
  130. {$define cpuflags}
  131. {$define cpufpemu}
  132. {$define cpuneedsdiv32helper}
  133. {$define cpurox}
  134. {$define cputargethasfixedstack}
  135. {$define cpurefshaveindexreg}
  136. {$define cpucapabilities}
  137. {$define SUPPORT_SAFECALL}
  138. {$define SUPPORT_GET_FRAME}
  139. { default to armel }
  140. {$if not(defined(CPUARM)) and not(defined(CPUARMEB)) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
  141. {$define FPC_ARMEL}
  142. {$endif}
  143. { inherit FPC_ARMEL? }
  144. {$if defined(CPUARMEL) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
  145. {$define FPC_ARMEL}
  146. {$endif}
  147. { inherit FPC_ARMEB? }
  148. {$if defined(CPUARMEB) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMHF))}
  149. {$define FPC_ARMEB}
  150. {$endif}
  151. { inherit FPC_ARMHF? }
  152. {$if defined(CPUARMHF) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMEB))}
  153. {$define FPC_ARMHF}
  154. {$endif}
  155. {$endif arm}
  156. {$ifdef m68k}
  157. {$define cpu32bit}
  158. {$define cpu32bitaddr}
  159. {$define cpu32bitalu}
  160. {$define cpuflags}
  161. {$define cpufpemu}
  162. {$define cpurefshaveindexreg}
  163. {$define cpucapabilities}
  164. {$endif m68k}
  165. {$ifdef avr}
  166. {$define cpu8bit}
  167. {$define cpu16bitaddr}
  168. {$define cpu8bitalu}
  169. {$define cpuflags}
  170. {$define cpunofpu}
  171. {$define cpunodefaultint}
  172. {$define cpuneedsdiv32helper}
  173. {$define cpuneedsmulhelper}
  174. {$define cpurefshaveindexreg}
  175. {$define cpucapabilities}
  176. {$endif avr}
  177. {$ifdef mipsel}
  178. {$define mips}
  179. {$else not mipsel}
  180. { Define both mips and mipseb if mipsel is not defined
  181. but mips cpu is wanted. }
  182. {$ifdef mipseb}
  183. {$define mips}
  184. {$endif mipseb}
  185. {$ifdef mips}
  186. {$define mipseb}
  187. {$endif mips}
  188. {$endif mipsel}
  189. {$ifdef mips}
  190. {$ifndef mips64}
  191. {$define cpu32bit}
  192. {$define cpu32bitalu}
  193. {$define cpu32bitaddr}
  194. {$else}
  195. {$error mips64 not yet supported}
  196. {$endif}
  197. {$define cpuflags} { Flags are emulated }
  198. {$define cputargethasfixedstack}
  199. {$define cpurequiresproperalignment}
  200. { define cpumm}
  201. {$define cpurefshaveindexreg}
  202. {$define fpc_compiler_has_fixup_jmps}
  203. {$define SUPPORT_GET_FRAME}
  204. {$endif mips}
  205. {$ifdef jvm}
  206. {$define cpu32bit}
  207. {$define cpu64bitalu}
  208. {$define cpu32bitaddr}
  209. {$define cpuhighleveltarget}
  210. {$define symansistr}
  211. {$define SUPPORT_GET_FRAME}
  212. {$endif}
  213. {$ifdef aarch64}
  214. {$define cpu64bit}
  215. {$define cpu64bitaddr}
  216. {$define cpu64bitalu}
  217. {$define cpuflags}
  218. {$define cpurox}
  219. {$define cputargethasfixedstack}
  220. {$define cpurefshaveindexreg}
  221. {$endif aarch64}
  222. {$IFDEF MACOS}
  223. {$DEFINE USE_FAKE_SYSUTILS}
  224. {$ENDIF MACOS}
  225. { Stabs is not officially supported on 64 bit targets by gdb, except on Mac OS X
  226. (but there we don't support it)
  227. }
  228. {$ifdef cpu64bitaddr}
  229. {$define NoDbgStabs}
  230. {$endif}
  231. {$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)}
  232. {$error Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time }
  233. {$endif}
  234. { llvm backends partially use other backends for parameter info calculation,
  235. alignment info, data sizes etc. They always support 64 bit alu though.
  236. }
  237. {$ifdef llvm}
  238. {$undef SUPPORT_MMX}
  239. {$undef cpu16bitalu}
  240. {$undef cpu32bitalu}
  241. {$define cpu64bitalu}
  242. {$define cpuhighleveltarget}
  243. {$endif}