i_win.pas 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. {
  2. Copyright (c) 1998-2008 by Peter Vreman
  3. This unit implements support information structures for win32
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. { This unit implements support information structures for win32. }
  18. unit i_win;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. systems;
  23. const
  24. system_i386_win32_info : tsysteminfo =
  25. (
  26. system : system_i386_WIN32;
  27. name : 'Win32 for i386';
  28. shortname : 'Win32';
  29. flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,tf_smartlink_library
  30. ,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},
  31. tf_winlikewidestring,tf_no_pic_supported,
  32. tf_no_generic_stackcheck,tf_has_winlike_resources,
  33. tf_dwarf_relative_addresses];
  34. cpu : cpu_i386;
  35. unit_env : 'WIN32UNITS';
  36. extradefines : 'MSWINDOWS;WINDOWS';
  37. exeext : '.exe';
  38. defext : '.def';
  39. scriptext : '.bat';
  40. smartext : '.sl';
  41. unitext : '.ppu';
  42. unitlibext : '.ppl';
  43. asmext : '.s';
  44. objext : '.o';
  45. resext : '.res';
  46. resobjext : '.or';
  47. sharedlibext : '.dll';
  48. staticlibext : '.a';
  49. staticlibprefix : 'libp';
  50. sharedlibprefix : '';
  51. sharedClibext : '.dll';
  52. staticClibext : '.a';
  53. staticClibprefix : 'lib';
  54. sharedClibprefix : '';
  55. Cprefix : '_';
  56. newline : #13#10;
  57. dirsep : '\';
  58. assem : as_i386_pecoff;
  59. assemextern : as_gas;
  60. link : nil;
  61. linkextern : nil;
  62. ar : ar_gnu_ar;
  63. res : res_gnu_windres;
  64. dbg : dbg_stabs;
  65. script : script_dos;
  66. endian : endian_little;
  67. alignment :
  68. (
  69. procalign : 16;
  70. loopalign : 4;
  71. jumpalign : 0;
  72. constalignmin : 0;
  73. constalignmax : 16;
  74. varalignmin : 0;
  75. varalignmax : 16;
  76. localalignmin : 4;
  77. localalignmax : 8;
  78. recordalignmin : 0;
  79. recordalignmax : 4;
  80. maxCrecordalign : 16
  81. );
  82. first_parm_offset : 8;
  83. stacksize : 16*1024*1024;
  84. abi : abi_default;
  85. );
  86. system_x64_win64_info : tsysteminfo =
  87. (
  88. system : system_x86_64_win64;
  89. name : 'Win64 for x64';
  90. shortname : 'Win64';
  91. flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,
  92. tf_smartlink_sections,tf_smartlink_library,tf_winlikewidestring,tf_no_pic_supported,
  93. tf_no_generic_stackcheck,tf_has_winlike_resources];
  94. cpu : cpu_x86_64;
  95. unit_env : 'WIN64UNITS';
  96. extradefines : 'MSWINDOWS;WINDOWS';
  97. exeext : '.exe';
  98. defext : '.def';
  99. scriptext : '.bat';
  100. smartext : '.sl';
  101. unitext : '.ppu';
  102. unitlibext : '.ppl';
  103. asmext : '.s';
  104. objext : '.o';
  105. resext : '.res';
  106. resobjext : '.obj';
  107. sharedlibext : '.dll';
  108. staticlibext : '.a';
  109. staticlibprefix : 'libp';
  110. sharedlibprefix : '';
  111. sharedClibext : '.dll';
  112. staticClibext : '.a';
  113. staticClibprefix : 'lib';
  114. sharedClibprefix : '';
  115. Cprefix : '';
  116. newline : #13#10;
  117. dirsep : '\';
  118. assem : as_x86_64_pecoff;
  119. assemextern : as_x86_64_masm;
  120. link : nil;
  121. linkextern : nil;
  122. ar : ar_gnu_ar;
  123. res : res_win64_gorc;
  124. dbg : dbg_stabs;
  125. script : script_dos;
  126. endian : endian_little;
  127. alignment :
  128. (
  129. procalign : 16;
  130. loopalign : 8;
  131. jumpalign : 0;
  132. constalignmin : 0;
  133. constalignmax : 16;
  134. varalignmin : 0;
  135. varalignmax : 16;
  136. localalignmin : 8;
  137. localalignmax : 16;
  138. recordalignmin : 0;
  139. recordalignmax : 8;
  140. maxCrecordalign : 16
  141. );
  142. first_parm_offset : 16;
  143. stacksize : 16*1024*1024;
  144. abi : abi_default;
  145. );
  146. system_arm_wince_info : tsysteminfo =
  147. (
  148. system : system_arm_wince;
  149. name : 'WinCE for ARM';
  150. shortname : 'WinCE';
  151. flags : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},
  152. tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported,
  153. tf_has_winlike_resources];
  154. cpu : cpu_arm;
  155. unit_env : '';
  156. extradefines : 'UNDER_CE;WINDOWS;UNICODE';
  157. exeext : '.exe';
  158. defext : '.def';
  159. scriptext : '.bat';
  160. smartext : '.sl';
  161. unitext : '.ppu';
  162. unitlibext : '.ppl';
  163. asmext : '.s';
  164. objext : '.o';
  165. resext : '.res';
  166. resobjext : '.or';
  167. sharedlibext : '.dll';
  168. staticlibext : '.a';
  169. staticlibprefix : 'libp';
  170. sharedlibprefix : '';
  171. sharedClibext : '.dll';
  172. staticClibext : '.a';
  173. staticClibprefix : 'lib';
  174. sharedClibprefix : '';
  175. Cprefix : '';
  176. newline : #13#10;
  177. dirsep : '\';
  178. assem : as_gas;
  179. assemextern : as_gas;
  180. link : nil;
  181. linkextern : nil;
  182. ar : ar_gnu_ar_scripted;
  183. res : res_gnu_windres;
  184. dbg : dbg_stabs;
  185. script : script_dos;
  186. endian : endian_little;
  187. alignment :
  188. (
  189. procalign : 4;
  190. loopalign : 4;
  191. jumpalign : 0;
  192. constalignmin : 0;
  193. constalignmax : 4;
  194. varalignmin : 0;
  195. varalignmax : 4;
  196. localalignmin : 0;
  197. localalignmax : 4;
  198. recordalignmin : 0;
  199. recordalignmax : 4;
  200. maxCrecordalign : 4
  201. );
  202. first_parm_offset : 8;
  203. stacksize : 262144;
  204. abi : abi_default;
  205. );
  206. system_i386_wince_info : tsysteminfo =
  207. (
  208. system : system_i386_wince;
  209. name : 'WinCE for i386';
  210. shortname : 'WinCE';
  211. flags : [tf_files_case_aware,tf_use_function_relative_addresses
  212. {,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported,
  213. tf_has_winlike_resources];
  214. cpu : cpu_i386;
  215. unit_env : '';
  216. extradefines : 'UNDER_CE;WINDOWS;UNICODE';
  217. exeext : '.exe';
  218. defext : '.def';
  219. scriptext : '.bat';
  220. smartext : '.sl';
  221. unitext : '.ppu';
  222. unitlibext : '.ppl';
  223. asmext : '.s';
  224. objext : '.o';
  225. resext : '.res';
  226. resobjext : '.or';
  227. sharedlibext : '.dll';
  228. staticlibext : '.a';
  229. staticlibprefix : 'libp';
  230. sharedlibprefix : '';
  231. sharedClibext : '.dll';
  232. staticClibext : '.a';
  233. staticClibprefix : 'lib';
  234. sharedClibprefix : '';
  235. Cprefix : '_';
  236. newline : #13#10;
  237. dirsep : '\';
  238. assem : as_i386_pecoffwince;
  239. assemextern : as_gas;
  240. link : nil;
  241. linkextern : nil;
  242. ar : ar_gnu_ar_scripted;
  243. res : res_gnu_windres;
  244. dbg : dbg_stabs;
  245. script : script_dos;
  246. endian : endian_little;
  247. alignment :
  248. (
  249. procalign : 4;
  250. loopalign : 4;
  251. jumpalign : 0;
  252. constalignmin : 0;
  253. constalignmax : 4;
  254. varalignmin : 0;
  255. varalignmax : 4;
  256. localalignmin : 4;
  257. localalignmax : 4;
  258. recordalignmin : 0;
  259. recordalignmax : 4;
  260. maxCrecordalign : 16
  261. );
  262. first_parm_offset : 8;
  263. stacksize : 262144;
  264. abi : abi_default;
  265. );
  266. implementation
  267. initialization
  268. {$ifdef CPU86}
  269. {$ifdef WIN32}
  270. {$ifndef WDOSX}
  271. set_source_info(system_i386_win32_info);
  272. {$endif WDOSX}
  273. {$endif WIN32}
  274. {$ifdef WINCE}
  275. set_source_info(system_i386_wince_info);
  276. {$endif WINCE}
  277. {$endif CPU86}
  278. {$ifdef CPUX86_64}
  279. {$ifdef WIN64}
  280. {$ifndef WDOSX}
  281. set_source_info(system_x64_win64_info);
  282. {$endif WDOSX}
  283. {$endif WIN64}
  284. {$endif CPUX86_64}
  285. {$ifdef CPUARM}
  286. {$ifdef WINCE}
  287. set_source_info(system_arm_wince_info);
  288. {$endif WINCE}
  289. {$endif CPUARM}
  290. end.