fpcdefs.inc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. {$endif powerpc64}
  125. {$ifdef arm}
  126. {$define cpu32bit}
  127. {$define cpu32bitaddr}
  128. {$define cpu32bitalu}
  129. {$define cpuflags}
  130. {$define cpufpemu}
  131. {$define cpuneedsdiv32helper}
  132. {$define cpurox}
  133. {$define cputargethasfixedstack}
  134. {$define cpurefshaveindexreg}
  135. {$define SUPPORT_SAFECALL}
  136. {$define SUPPORT_GET_FRAME}
  137. { default to armel }
  138. {$if not(defined(CPUARM)) and not(defined(CPUARMEB)) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
  139. {$define FPC_ARMEL}
  140. {$endif}
  141. { inherit FPC_ARMEL? }
  142. {$if defined(CPUARMEL) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEB)) and not(defined(FPC_ARMHF))}
  143. {$define FPC_ARMEL}
  144. {$endif}
  145. { inherit FPC_ARMEB? }
  146. {$if defined(CPUARMEB) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMHF))}
  147. {$define FPC_ARMEB}
  148. {$endif}
  149. { inherit FPC_ARMHF? }
  150. {$if defined(CPUARMHF) and not(defined(FPC_OARM)) and not(defined(FPC_ARMEL)) and not(defined(FPC_ARMEB))}
  151. {$define FPC_ARMHF}
  152. {$endif}
  153. {$endif arm}
  154. {$ifdef m68k}
  155. {$define cpu32bit}
  156. {$define cpu32bitaddr}
  157. {$define cpu32bitalu}
  158. {$define cpuflags}
  159. {$define cpufpemu}
  160. {$define cpurefshaveindexreg}
  161. {$endif m68k}
  162. {$ifdef avr}
  163. {$define cpu8bit}
  164. {$define cpu16bitaddr}
  165. {$define cpu8bitalu}
  166. {$define cpuflags}
  167. {$define cpunofpu}
  168. {$define cpunodefaultint}
  169. {$define cpuneedsdiv32helper}
  170. {$define cpuneedsmulhelper}
  171. {$define cpurefshaveindexreg}
  172. {$endif avr}
  173. {$ifdef mipsel}
  174. {$define mips}
  175. {$else not mipsel}
  176. { Define both mips and mipseb if mipsel is not defined
  177. but mips cpu is wanted. }
  178. {$ifdef mipseb}
  179. {$define mips}
  180. {$endif mipseb}
  181. {$ifdef mips}
  182. {$define mipseb}
  183. {$endif mips}
  184. {$endif mipsel}
  185. {$ifdef mips}
  186. {$ifndef mips64}
  187. {$define cpu32bit}
  188. {$define cpu32bitalu}
  189. {$define cpu32bitaddr}
  190. {$else}
  191. {$error mips64 not yet supported}
  192. {$endif}
  193. {$define cpuflags} { Flags are emulated }
  194. {$define cputargethasfixedstack}
  195. {$define cpurequiresproperalignment}
  196. { define cpumm}
  197. {$define cpurefshaveindexreg}
  198. {$define fpc_compiler_has_fixup_jmps}
  199. {$endif mips}
  200. {$ifdef jvm}
  201. {$define cpu32bit}
  202. {$define cpu64bitalu}
  203. {$define cpu32bitaddr}
  204. {$define cpuhighleveltarget}
  205. {$define symansistr}
  206. {$define SUPPORT_GET_FRAME}
  207. {$endif}
  208. {$ifdef aarch64}
  209. {$define cpu64bit}
  210. {$define cpu64bitaddr}
  211. {$define cpu64bitalu}
  212. {$define cpuflags}
  213. {$define cpurox}
  214. {$define cputargethasfixedstack}
  215. {$define cpurefshaveindexreg}
  216. {$endif aarch64}
  217. {$IFDEF MACOS}
  218. {$DEFINE USE_FAKE_SYSUTILS}
  219. {$ENDIF MACOS}
  220. { Stabs is not officially supported on 64 bit targets by gdb, except on Mac OS X
  221. (but there we don't support it)
  222. }
  223. {$ifdef cpu64bitaddr}
  224. {$define NoDbgStabs}
  225. {$endif}
  226. {$if not defined(FPC_HAS_TYPE_EXTENDED) and defined(i386)}
  227. {$error Cross-compiling from systems without support for an 80 bit extended floating point type to i386 is not yet supported at this time }
  228. {$endif}