i_win.pas 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417
  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
  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_only_local_labels,
  34. tf_safecall_exceptions,tf_no_backquote_support,tf_supports_hidden_symbols];
  35. cpu : cpu_i386;
  36. unit_env : 'WIN32UNITS';
  37. extradefines : 'MSWINDOWS;WINDOWS';
  38. exeext : '.exe';
  39. defext : '.def';
  40. scriptext : '.bat';
  41. smartext : '.sl';
  42. unitext : '.ppu';
  43. unitlibext : '.ppl';
  44. asmext : '.s';
  45. objext : '.o';
  46. resext : '.res';
  47. resobjext : '.or';
  48. sharedlibext : '.dll';
  49. staticlibext : '.a';
  50. staticlibprefix : 'libp';
  51. sharedlibprefix : '';
  52. sharedClibext : '.dll';
  53. staticClibext : '.a';
  54. staticClibprefix : 'lib';
  55. sharedClibprefix : '';
  56. importlibprefix : 'libimp';
  57. importlibext : '.a';
  58. Cprefix : '_';
  59. newline : #13#10;
  60. dirsep : '\';
  61. assem : as_i386_pecoff;
  62. assemextern : as_gas;
  63. link : ld_int_windows;
  64. linkextern : ld_windows;
  65. ar : ar_gnu_ar;
  66. res : res_gnu_windres;
  67. dbg : dbg_stabs;
  68. script : script_dos;
  69. endian : endian_little;
  70. alignment :
  71. (
  72. procalign : 16;
  73. loopalign : 8;
  74. jumpalign : 16;
  75. jumpalignskipmax : 10;
  76. coalescealign : 0;
  77. coalescealignskipmax: 0;
  78. constalignmin : 0;
  79. constalignmax : 16;
  80. varalignmin : 0;
  81. varalignmax : 16;
  82. localalignmin : 4;
  83. localalignmax : 8;
  84. recordalignmin : 0;
  85. recordalignmax : 4;
  86. maxCrecordalign : 16
  87. );
  88. first_parm_offset : 8;
  89. stacksize : 16*1024*1024;
  90. stackalign : 4;
  91. abi : abi_default;
  92. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  93. );
  94. system_x64_win64_info : tsysteminfo =
  95. (
  96. system : system_x86_64_win64;
  97. name : 'Win64 for x64';
  98. shortname : 'Win64';
  99. flags : [tf_files_case_aware,tf_has_dllscanner,
  100. tf_smartlink_sections,
  101. tf_winlikewidestring,tf_no_pic_supported,
  102. tf_dwarf_only_local_labels,
  103. tf_no_generic_stackcheck,tf_has_winlike_resources,
  104. tf_safecall_exceptions,tf_no_backquote_support,tf_supports_hidden_symbols];
  105. cpu : cpu_x86_64;
  106. unit_env : 'WIN64UNITS';
  107. extradefines : 'MSWINDOWS;WINDOWS';
  108. exeext : '.exe';
  109. defext : '.def';
  110. scriptext : '.bat';
  111. smartext : '.sl';
  112. unitext : '.ppu';
  113. unitlibext : '.ppl';
  114. asmext : '.s';
  115. objext : '.o';
  116. resext : '.res';
  117. resobjext : '.obj';
  118. sharedlibext : '.dll';
  119. staticlibext : '.a';
  120. staticlibprefix : 'libp';
  121. sharedlibprefix : '';
  122. sharedClibext : '.dll';
  123. staticClibext : '.a';
  124. staticClibprefix : 'lib';
  125. sharedClibprefix : '';
  126. importlibprefix : 'libimp';
  127. importlibext : '.a';
  128. Cprefix : '';
  129. newline : #13#10;
  130. dirsep : '\';
  131. assem : as_x86_64_pecoff;
  132. assemextern : as_gas;
  133. link : ld_int_windows;
  134. linkextern : ld_windows;
  135. ar : ar_gnu_ar;
  136. res : res_gnu_windres;
  137. dbg : dbg_dwarf2;
  138. script : script_dos;
  139. endian : endian_little;
  140. alignment :
  141. (
  142. procalign : 16;
  143. loopalign : 8;
  144. jumpalign : 16;
  145. jumpalignskipmax : 10;
  146. coalescealign : 0;
  147. coalescealignskipmax: 0;
  148. constalignmin : 0;
  149. constalignmax : 16;
  150. varalignmin : 0;
  151. varalignmax : 64;
  152. localalignmin : 4;
  153. localalignmax : 16;
  154. recordalignmin : 0;
  155. recordalignmax : 8;
  156. maxCrecordalign : 16
  157. );
  158. first_parm_offset : 16;
  159. stacksize : 16*1024*1024;
  160. stackalign : 16;
  161. abi : abi_default;
  162. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128';
  163. );
  164. system_arm_wince_info : tsysteminfo =
  165. (
  166. system : system_arm_wince;
  167. name : 'WinCE for ARM';
  168. shortname : 'WinCE';
  169. flags : [tf_files_case_aware{,tf_winlikewidestring},
  170. tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported,
  171. tf_has_winlike_resources,
  172. tf_safecall_exceptions,tf_no_backquote_support,tf_supports_hidden_symbols];
  173. cpu : cpu_arm;
  174. unit_env : '';
  175. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  176. exeext : '.exe';
  177. defext : '.def';
  178. scriptext : '.bat';
  179. smartext : '.sl';
  180. unitext : '.ppu';
  181. unitlibext : '.ppl';
  182. asmext : '.s';
  183. objext : '.o';
  184. resext : '.res';
  185. resobjext : '.or';
  186. sharedlibext : '.dll';
  187. staticlibext : '.a';
  188. staticlibprefix : 'libp';
  189. sharedlibprefix : '';
  190. sharedClibext : '.dll';
  191. staticClibext : '.a';
  192. staticClibprefix : 'lib';
  193. sharedClibprefix : '';
  194. importlibprefix : 'libimp';
  195. importlibext : '.a';
  196. Cprefix : '';
  197. newline : #13#10;
  198. dirsep : '\';
  199. assem : as_arm_pecoffwince;
  200. assemextern : as_gas;
  201. link : ld_int_windows;
  202. linkextern : ld_windows;
  203. ar : ar_gnu_ar_scripted;
  204. res : res_gnu_windres;
  205. dbg : dbg_stabs;
  206. script : script_dos;
  207. endian : endian_little;
  208. alignment :
  209. (
  210. procalign : 4;
  211. loopalign : 4;
  212. jumpalign : 0;
  213. jumpalignskipmax : 0;
  214. coalescealign : 0;
  215. coalescealignskipmax: 0;
  216. constalignmin : 0;
  217. constalignmax : 4;
  218. varalignmin : 0;
  219. varalignmax : 4;
  220. localalignmin : 0;
  221. localalignmax : 4;
  222. recordalignmin : 0;
  223. recordalignmax : 4;
  224. maxCrecordalign : 4
  225. );
  226. first_parm_offset : 8;
  227. stacksize : 262144;
  228. stackalign : 4;
  229. abi : abi_default;
  230. llvmdatalayout : 'todo';
  231. );
  232. system_i386_wince_info : tsysteminfo =
  233. (
  234. system : system_i386_wince;
  235. name : 'WinCE for i386';
  236. shortname : 'WinCE';
  237. flags : [tf_files_case_aware
  238. {,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported,
  239. tf_has_winlike_resources,
  240. tf_safecall_exceptions,tf_no_backquote_support,tf_supports_hidden_symbols];
  241. cpu : cpu_i386;
  242. unit_env : '';
  243. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  244. exeext : '.exe';
  245. defext : '.def';
  246. scriptext : '.bat';
  247. smartext : '.sl';
  248. unitext : '.ppu';
  249. unitlibext : '.ppl';
  250. asmext : '.s';
  251. objext : '.o';
  252. resext : '.res';
  253. resobjext : '.or';
  254. sharedlibext : '.dll';
  255. staticlibext : '.a';
  256. staticlibprefix : 'libp';
  257. sharedlibprefix : '';
  258. sharedClibext : '.dll';
  259. staticClibext : '.a';
  260. staticClibprefix : 'lib';
  261. sharedClibprefix : '';
  262. importlibprefix : 'libimp';
  263. importlibext : '.a';
  264. Cprefix : '_';
  265. newline : #13#10;
  266. dirsep : '\';
  267. assem : as_i386_pecoffwince;
  268. assemextern : as_gas;
  269. link : ld_int_windows;
  270. linkextern : ld_windows;
  271. ar : ar_gnu_ar_scripted;
  272. res : res_gnu_windres;
  273. dbg : dbg_stabs;
  274. script : script_dos;
  275. endian : endian_little;
  276. alignment :
  277. (
  278. procalign : 4;
  279. loopalign : 4;
  280. jumpalign : 0;
  281. jumpalignskipmax : 0;
  282. coalescealign : 0;
  283. coalescealignskipmax: 0;
  284. constalignmin : 0;
  285. constalignmax : 4;
  286. varalignmin : 0;
  287. varalignmax : 4;
  288. localalignmin : 4;
  289. localalignmax : 4;
  290. recordalignmin : 0;
  291. recordalignmax : 4;
  292. maxCrecordalign : 16
  293. );
  294. first_parm_offset : 8;
  295. stacksize : 262144;
  296. stackalign : 4;
  297. abi : abi_default;
  298. llvmdatalayout : 'todo';
  299. );
  300. system_aarch64_win64_info : tsysteminfo =
  301. (
  302. system : system_aarch64_win64;
  303. name : 'Win64 for Aarch64';
  304. shortname : 'Win64';
  305. flags : [tf_files_case_aware,tf_has_dllscanner,
  306. tf_smartlink_sections,
  307. tf_winlikewidestring,tf_no_pic_supported,
  308. tf_dwarf_only_local_labels,
  309. tf_no_generic_stackcheck,tf_has_winlike_resources,
  310. tf_safecall_exceptions,tf_no_backquote_support,tf_supports_hidden_symbols];
  311. cpu : cpu_aarch64;
  312. unit_env : 'WIN64UNITS';
  313. extradefines : 'MSWINDOWS;WINDOWS';
  314. exeext : '.exe';
  315. defext : '.def';
  316. scriptext : '.bat';
  317. smartext : '.sl';
  318. unitext : '.ppu';
  319. unitlibext : '.ppl';
  320. asmext : '.s';
  321. objext : '.o';
  322. resext : '.res';
  323. resobjext : '.obj';
  324. sharedlibext : '.dll';
  325. staticlibext : '.a';
  326. staticlibprefix : 'libp';
  327. sharedlibprefix : '';
  328. sharedClibext : '.dll';
  329. staticClibext : '.a';
  330. staticClibprefix : 'lib';
  331. sharedClibprefix : '';
  332. importlibprefix : 'libimp';
  333. importlibext : '.a';
  334. Cprefix : '';
  335. newline : #13#10;
  336. dirsep : '\';
  337. assem : as_clang_gas;
  338. assemextern : as_clang_gas;
  339. link : ld_int_windows;
  340. linkextern : ld_windows;
  341. ar : ar_gnu_ar;
  342. res : res_gnu_windres;
  343. dbg : dbg_dwarf2;
  344. script : script_dos;
  345. endian : endian_little;
  346. alignment :
  347. (
  348. procalign : 8;
  349. loopalign : 4;
  350. jumpalign : 0;
  351. jumpalignskipmax : 0;
  352. coalescealign : 0;
  353. coalescealignskipmax: 0;
  354. constalignmin : 0;
  355. constalignmax : 16;
  356. varalignmin : 0;
  357. varalignmax : 16;
  358. localalignmin : 4;
  359. localalignmax : 16;
  360. recordalignmin : 0;
  361. recordalignmax : 16;
  362. maxCrecordalign : 16
  363. );
  364. first_parm_offset : 16;
  365. stacksize : 16*1024*1024;
  366. stackalign : 16;
  367. abi : abi_default;
  368. llvmdatalayout : 'e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n32:64-S128'
  369. );
  370. implementation
  371. initialization
  372. {$ifdef CPUI386}
  373. {$ifdef WIN32}
  374. {$ifndef WDOSX}
  375. set_source_info(system_i386_win32_info);
  376. {$endif WDOSX}
  377. {$endif WIN32}
  378. {$ifdef WINCE}
  379. set_source_info(system_i386_wince_info);
  380. {$endif WINCE}
  381. {$endif CPUI386}
  382. {$ifdef CPUX86_64}
  383. {$ifdef WIN64}
  384. {$ifndef WDOSX}
  385. set_source_info(system_x64_win64_info);
  386. {$endif WDOSX}
  387. {$endif WIN64}
  388. {$endif CPUX86_64}
  389. {$ifdef CPUARM}
  390. {$ifdef WINCE}
  391. set_source_info(system_arm_wince_info);
  392. {$endif WINCE}
  393. {$endif CPUARM}
  394. {$ifdef CPUAARCH64}
  395. {$ifdef WIN64}
  396. set_source_info(system_aarch64_win64_info);
  397. {$endif WIN64}
  398. {$endif CPUAARCH64}
  399. end.