i_win.pas 15 KB

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