fpcdefs.inc 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. {$define cpucapabilities}
  69. {$endif i386}
  70. {$ifdef x86_64}
  71. {$define x86}
  72. {$define cpuflags}
  73. {$define cpu64bitalu}
  74. {$define cpu64bitaddr}
  75. {$define cpuextended}
  76. {$define cpufloat128}
  77. {$define cputargethasfixedstack}
  78. {$define cpumm}
  79. {$define cpurox}
  80. {$define cpurefshaveindexreg}
  81. {$define SUPPORT_SAFECALL}
  82. {$define SUPPORT_GET_FRAME}
  83. {$define cpucapabilities}
  84. {$endif x86_64}
  85. {$ifdef ia64}
  86. {$define cpuflags}
  87. {$define cpu64bitalu}
  88. {$define cpu64bitaddr}
  89. {$define cpuextended}
  90. {$define cpufloat128}
  91. {$endif ia64}
  92. {$ifdef alpha}
  93. {$define cpu64bitalu}
  94. {$define cpu64bitaddr}
  95. {$define cpurefshaveindexreg}
  96. {$endif alpha}
  97. {$ifdef sparc}
  98. {$define cpu32bit}
  99. {$define cpu32bitaddr}
  100. {$define cpu32bitalu}
  101. {$define cpuflags}
  102. {$define cputargethasfixedstack}
  103. {$define cpurefshaveindexreg}
  104. {$define SUPPORT_SAFECALL}
  105. {$endif sparc}
  106. {$ifdef powerpc}
  107. {$define cpu32bit}
  108. {$define cpu32bitaddr}
  109. {$define cpu32bitalu}
  110. {$define cpuflags}
  111. {$define cputargethasfixedstack}
  112. {$define cpumm}
  113. {$define cpurox}
  114. {$define cpurefshaveindexreg}
  115. {$endif powerpc}
  116. {$ifdef powerpc64}
  117. {$define cpu64bitalu}
  118. {$define cpu64bitaddr}
  119. {$define cpuflags}
  120. {$define cputargethasfixedstack}
  121. {$define cpumm}
  122. {$define cpurox}
  123. {$define cpurefshaveindexreg}
  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. {$define cpuneedsdiv32helper}
  165. {$endif m68k}
  166. {$ifdef avr}
  167. {$define cpu8bit}
  168. {$define cpu16bitaddr}
  169. {$define cpu8bitalu}
  170. {$define cpuflags}
  171. {$define cpunofpu}
  172. {$define cpunodefaultint}
  173. {$define cpuneedsdiv32helper}
  174. {$define cpuneedsmulhelper}
  175. {$define cpurefshaveindexreg}
  176. {$define cpucapabilities}
  177. {$endif avr}
  178. {$ifdef mipsel}
  179. {$define mips}
  180. {$else not mipsel}
  181. { Define both mips and mipseb if mipsel is not defined
  182. but mips cpu is wanted. }
  183. {$ifdef mipseb}
  184. {$define mips}
  185. {$endif mipseb}
  186. {$ifdef mips}
  187. {$define mipseb}
  188. {$endif mips}
  189. {$endif mipsel}
  190. {$ifdef mips}
  191. {$ifndef mips64}
  192. {$define cpu32bit}
  193. {$define cpu32bitalu}
  194. {$define cpu32bitaddr}
  195. {$else}
  196. {$error mips64 not yet supported}
  197. {$endif}
  198. {$define cpuflags} { Flags are emulated }
  199. {$define cputargethasfixedstack}
  200. {$define cpurequiresproperalignment}
  201. { define cpumm}
  202. {$define cpurefshaveindexreg}
  203. {$define SUPPORT_GET_FRAME}
  204. {$define SUPPORT_SAFECALL}
  205. {$endif mips}
  206. {$ifdef jvm}
  207. {$define cpu32bit}
  208. {$define cpu64bitalu}
  209. {$define cpu32bitaddr}
  210. {$define cpuhighleveltarget}
  211. {$define symansistr}
  212. {$define SUPPORT_GET_FRAME}
  213. {$endif}
  214. {$ifdef aarch64}
  215. {$define cpu64bit}
  216. {$define cpu64bitaddr}
  217. {$define cpu64bitalu}
  218. {$define cpuflags}
  219. {$define cpurox}
  220. {$define cputargethasfixedstack}
  221. {$define cpurefshaveindexreg}
  222. {$endif aarch64}
  223. {$IFDEF MACOS}
  224. {$DEFINE USE_FAKE_SYSUTILS}
  225. {$ENDIF MACOS}
  226. { Stabs is not officially supported on 64 bit targets by gdb, except on Mac OS X
  227. (but there we don't support it)
  228. }
  229. {$ifdef cpu64bitaddr}
  230. {$define NoDbgStabs}
  231. {$endif}
  232. {$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)}
  233. {$error Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time }
  234. {$endif}