i_win.pas 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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];
  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 : 4;
  75. constalignmin : 0;
  76. constalignmax : 16;
  77. varalignmin : 0;
  78. varalignmax : 16;
  79. localalignmin : 4;
  80. localalignmax : 8;
  81. recordalignmin : 0;
  82. recordalignmax : 4;
  83. maxCrecordalign : 16
  84. );
  85. first_parm_offset : 8;
  86. stacksize : 16*1024*1024;
  87. stackalign : 4;
  88. abi : abi_default;
  89. 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';
  90. );
  91. system_x64_win64_info : tsysteminfo =
  92. (
  93. system : system_x86_64_win64;
  94. name : 'Win64 for x64';
  95. shortname : 'Win64';
  96. flags : [tf_files_case_aware,tf_has_dllscanner,
  97. tf_smartlink_sections,
  98. tf_winlikewidestring,tf_no_pic_supported,
  99. tf_dwarf_only_local_labels,
  100. tf_no_generic_stackcheck,tf_has_winlike_resources,
  101. tf_safecall_exceptions,tf_no_backquote_support];
  102. cpu : cpu_x86_64;
  103. unit_env : 'WIN64UNITS';
  104. extradefines : 'MSWINDOWS;WINDOWS';
  105. exeext : '.exe';
  106. defext : '.def';
  107. scriptext : '.bat';
  108. smartext : '.sl';
  109. unitext : '.ppu';
  110. unitlibext : '.ppl';
  111. asmext : '.s';
  112. objext : '.o';
  113. resext : '.res';
  114. resobjext : '.obj';
  115. sharedlibext : '.dll';
  116. staticlibext : '.a';
  117. staticlibprefix : 'libp';
  118. sharedlibprefix : '';
  119. sharedClibext : '.dll';
  120. staticClibext : '.a';
  121. staticClibprefix : 'lib';
  122. sharedClibprefix : '';
  123. importlibprefix : 'libimp';
  124. importlibext : '.a';
  125. Cprefix : '';
  126. newline : #13#10;
  127. dirsep : '\';
  128. assem : as_x86_64_pecoff;
  129. assemextern : as_gas;
  130. link : ld_int_windows;
  131. linkextern : ld_windows;
  132. ar : ar_gnu_ar;
  133. res : res_gnu_windres;
  134. dbg : dbg_dwarf2;
  135. script : script_dos;
  136. endian : endian_little;
  137. alignment :
  138. (
  139. procalign : 16;
  140. loopalign : 8;
  141. jumpalign : 4;
  142. constalignmin : 0;
  143. constalignmax : 16;
  144. varalignmin : 0;
  145. varalignmax : 16;
  146. localalignmin : 4;
  147. localalignmax : 16;
  148. recordalignmin : 0;
  149. recordalignmax : 8;
  150. maxCrecordalign : 16
  151. );
  152. first_parm_offset : 16;
  153. stacksize : 16*1024*1024;
  154. stackalign : 16;
  155. abi : abi_default;
  156. 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';
  157. );
  158. system_arm_wince_info : tsysteminfo =
  159. (
  160. system : system_arm_wince;
  161. name : 'WinCE for ARM';
  162. shortname : 'WinCE';
  163. flags : [tf_files_case_aware{,tf_winlikewidestring},
  164. tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported,
  165. tf_has_winlike_resources,
  166. tf_safecall_exceptions,tf_no_backquote_support];
  167. cpu : cpu_arm;
  168. unit_env : '';
  169. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  170. exeext : '.exe';
  171. defext : '.def';
  172. scriptext : '.bat';
  173. smartext : '.sl';
  174. unitext : '.ppu';
  175. unitlibext : '.ppl';
  176. asmext : '.s';
  177. objext : '.o';
  178. resext : '.res';
  179. resobjext : '.or';
  180. sharedlibext : '.dll';
  181. staticlibext : '.a';
  182. staticlibprefix : 'libp';
  183. sharedlibprefix : '';
  184. sharedClibext : '.dll';
  185. staticClibext : '.a';
  186. staticClibprefix : 'lib';
  187. sharedClibprefix : '';
  188. importlibprefix : 'libimp';
  189. importlibext : '.a';
  190. Cprefix : '';
  191. newline : #13#10;
  192. dirsep : '\';
  193. assem : as_arm_pecoffwince;
  194. assemextern : as_gas;
  195. link : ld_int_windows;
  196. linkextern : ld_windows;
  197. ar : ar_gnu_ar_scripted;
  198. res : res_gnu_windres;
  199. dbg : dbg_stabs;
  200. script : script_dos;
  201. endian : endian_little;
  202. alignment :
  203. (
  204. procalign : 4;
  205. loopalign : 4;
  206. jumpalign : 0;
  207. constalignmin : 0;
  208. constalignmax : 4;
  209. varalignmin : 0;
  210. varalignmax : 4;
  211. localalignmin : 0;
  212. localalignmax : 4;
  213. recordalignmin : 0;
  214. recordalignmax : 4;
  215. maxCrecordalign : 4
  216. );
  217. first_parm_offset : 8;
  218. stacksize : 262144;
  219. stackalign : 4;
  220. abi : abi_default;
  221. llvmdatalayout : 'todo';
  222. );
  223. system_i386_wince_info : tsysteminfo =
  224. (
  225. system : system_i386_wince;
  226. name : 'WinCE for i386';
  227. shortname : 'WinCE';
  228. flags : [tf_files_case_aware
  229. {,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported,
  230. tf_has_winlike_resources,
  231. tf_safecall_exceptions,tf_no_backquote_support];
  232. cpu : cpu_i386;
  233. unit_env : '';
  234. extradefines : 'UNDER_CE;WINDOWS;FPC_OS_UNICODE';
  235. exeext : '.exe';
  236. defext : '.def';
  237. scriptext : '.bat';
  238. smartext : '.sl';
  239. unitext : '.ppu';
  240. unitlibext : '.ppl';
  241. asmext : '.s';
  242. objext : '.o';
  243. resext : '.res';
  244. resobjext : '.or';
  245. sharedlibext : '.dll';
  246. staticlibext : '.a';
  247. staticlibprefix : 'libp';
  248. sharedlibprefix : '';
  249. sharedClibext : '.dll';
  250. staticClibext : '.a';
  251. staticClibprefix : 'lib';
  252. sharedClibprefix : '';
  253. importlibprefix : 'libimp';
  254. importlibext : '.a';
  255. Cprefix : '_';
  256. newline : #13#10;
  257. dirsep : '\';
  258. assem : as_i386_pecoffwince;
  259. assemextern : as_gas;
  260. link : ld_int_windows;
  261. linkextern : ld_windows;
  262. ar : ar_gnu_ar_scripted;
  263. res : res_gnu_windres;
  264. dbg : dbg_stabs;
  265. script : script_dos;
  266. endian : endian_little;
  267. alignment :
  268. (
  269. procalign : 4;
  270. loopalign : 4;
  271. jumpalign : 0;
  272. constalignmin : 0;
  273. constalignmax : 4;
  274. varalignmin : 0;
  275. varalignmax : 4;
  276. localalignmin : 4;
  277. localalignmax : 4;
  278. recordalignmin : 0;
  279. recordalignmax : 4;
  280. maxCrecordalign : 16
  281. );
  282. first_parm_offset : 8;
  283. stacksize : 262144;
  284. stackalign : 4;
  285. abi : abi_default;
  286. llvmdatalayout : 'todo';
  287. );
  288. implementation
  289. initialization
  290. {$ifdef CPUI386}
  291. {$ifdef WIN32}
  292. {$ifndef WDOSX}
  293. set_source_info(system_i386_win32_info);
  294. {$endif WDOSX}
  295. {$endif WIN32}
  296. {$ifdef WINCE}
  297. set_source_info(system_i386_wince_info);
  298. {$endif WINCE}
  299. {$endif CPUI386}
  300. {$ifdef CPUX86_64}
  301. {$ifdef WIN64}
  302. {$ifndef WDOSX}
  303. set_source_info(system_x64_win64_info);
  304. {$endif WDOSX}
  305. {$endif WIN64}
  306. {$endif CPUX86_64}
  307. {$ifdef CPUARM}
  308. {$ifdef WINCE}
  309. set_source_info(system_arm_wince_info);
  310. {$endif WINCE}
  311. {$endif CPUARM}
  312. end.