i_bsd.pas 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Peter Vreman
  4. This unit implements support information structures for FreeBSD/NetBSD
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. { This unit implements support information structures for FreeBSD/NetBSD.
  19. OpenBSD and Darwin must be added still.}
  20. unit i_bsd;
  21. interface
  22. uses
  23. systems;
  24. const
  25. system_i386_freebsd_info : tsysteminfo =
  26. (
  27. system : system_i386_FreeBSD;
  28. name : 'FreeBSD/ELF for i386';
  29. shortname : 'FreeBSD';
  30. flags : [];
  31. cpu : cpu_i386;
  32. unit_env : 'BSDUNITS';
  33. extradefines : 'UNIX;BSD;HASUNIX';
  34. sourceext : '.pp';
  35. pasext : '.pas';
  36. exeext : '';
  37. defext : '.def';
  38. scriptext : '.sh';
  39. smartext : '.sl';
  40. unitext : '.ppu';
  41. unitlibext : '.ppl';
  42. asmext : '.s';
  43. objext : '.o';
  44. resext : '.res';
  45. resobjext : '.or';
  46. sharedlibext : '.so';
  47. staticlibext : '.a';
  48. staticlibprefix : 'libp';
  49. sharedlibprefix : 'lib';
  50. sharedClibext : '.so';
  51. staticClibext : '.a';
  52. staticClibprefix : 'lib';
  53. sharedClibprefix : 'lib';
  54. Cprefix : '';
  55. newline : #10;
  56. dirsep : '/';
  57. files_case_relevent : true;
  58. assem : as_i386_elf32;
  59. assemextern : as_gas;
  60. link : nil;
  61. linkextern : nil;
  62. ar : ar_gnu_ar;
  63. res : res_none;
  64. script : script_unix;
  65. endian : endian_little;
  66. alignment :
  67. (
  68. procalign : 4;
  69. loopalign : 4;
  70. jumpalign : 0;
  71. constalignmin : 0;
  72. constalignmax : 4;
  73. varalignmin : 0;
  74. varalignmax : 4;
  75. localalignmin : 0;
  76. localalignmax : 4;
  77. paraalign : 4;
  78. recordalignmin : 0;
  79. recordalignmax : 2;
  80. maxCrecordalign : 4
  81. );
  82. first_parm_offset : 8;
  83. heapsize : 256*1024;
  84. stacksize : 262144;
  85. DllScanSupported:false;
  86. use_function_relative_addresses : true
  87. );
  88. system_i386_netbsd_info : tsysteminfo =
  89. (
  90. system : system_i386_NetBSD;
  91. name : 'NetBSD for i386';
  92. shortname : 'NetBSD';
  93. flags : [tf_under_development];
  94. cpu : cpu_i386;
  95. unit_env : 'BSDUNITS';
  96. extradefines : 'UNIX;BSD;HASUNIX';
  97. sourceext : '.pp';
  98. pasext : '.pas';
  99. exeext : '';
  100. defext : '.def';
  101. scriptext : '.sh';
  102. smartext : '.sl';
  103. unitext : '.ppu';
  104. unitlibext : '.ppl';
  105. asmext : '.s';
  106. objext : '.o';
  107. resext : '.res';
  108. resobjext : '.or';
  109. sharedlibext : '.so';
  110. staticlibext : '.a';
  111. staticlibprefix : 'libp';
  112. sharedlibprefix : 'lib';
  113. sharedClibext : '.so';
  114. staticClibext : '.a';
  115. staticClibprefix : 'lib';
  116. sharedClibprefix : 'lib';
  117. Cprefix : '_';
  118. newline : #10;
  119. dirsep : '/';
  120. files_case_relevent : true;
  121. assem : as_gas;
  122. assemextern : as_gas;
  123. link : nil;
  124. linkextern : nil;
  125. ar : ar_gnu_ar;
  126. res : res_none;
  127. script : script_unix;
  128. endian : endian_little;
  129. alignment :
  130. (
  131. procalign : 4;
  132. loopalign : 4;
  133. jumpalign : 0;
  134. constalignmin : 0;
  135. constalignmax : 1;
  136. varalignmin : 0;
  137. varalignmax : 1;
  138. localalignmin : 0;
  139. localalignmax : 1;
  140. paraalign : 4;
  141. recordalignmin : 0;
  142. recordalignmax : 2;
  143. maxCrecordalign : 4
  144. );
  145. first_parm_offset : 8;
  146. heapsize : 256*1024;
  147. stacksize : 262144;
  148. DllScanSupported:false;
  149. use_function_relative_addresses : true
  150. );
  151. system_m68k_netbsd_info : tsysteminfo =
  152. (
  153. system : system_m68k_NetBSD;
  154. name : 'NetBSD for m68k';
  155. shortname : 'NetBSD';
  156. flags : [tf_under_development];
  157. cpu : cpu_m68k;
  158. unit_env : 'BSDUNITS';
  159. extradefines : 'UNIX;BSD;HASUNIX';
  160. sourceext : '.pp';
  161. pasext : '.pas';
  162. exeext : '';
  163. defext : '.def';
  164. scriptext : '.sh';
  165. smartext : '.sl';
  166. unitext : '.ppu';
  167. unitlibext : '.ppl';
  168. asmext : '.s';
  169. objext : '.o';
  170. resext : '.res';
  171. resobjext : '.or';
  172. sharedlibext : '.so';
  173. staticlibext : '.a';
  174. staticlibprefix : 'libp';
  175. sharedlibprefix : 'lib';
  176. sharedClibext : '.so';
  177. staticClibext : '.a';
  178. staticClibprefix : 'lib';
  179. sharedClibprefix : 'lib';
  180. Cprefix : '';
  181. newline : #10;
  182. dirsep : '/';
  183. files_case_relevent : true;
  184. assem : as_gas;
  185. assemextern : as_gas;
  186. link : nil;
  187. linkextern : nil;
  188. ar : ar_gnu_ar;
  189. res : res_none;
  190. script : script_unix;
  191. endian : endian_big;
  192. alignment :
  193. (
  194. procalign : 4;
  195. loopalign : 4;
  196. jumpalign : 0;
  197. constalignmin : 0;
  198. constalignmax : 1;
  199. varalignmin : 0;
  200. varalignmax : 1;
  201. localalignmin : 0;
  202. localalignmax : 1;
  203. paraalign : 4;
  204. recordalignmin : 0;
  205. recordalignmax : 2;
  206. maxCrecordalign : 4
  207. );
  208. first_parm_offset : 8;
  209. heapsize : 256*1024;
  210. stacksize : 262144;
  211. DllScanSupported:false;
  212. use_function_relative_addresses : true
  213. );
  214. system_powerpc_netbsd_info : tsysteminfo =
  215. (
  216. system : system_powerpc_netbsd;
  217. name : 'NetBSD for PowerPC';
  218. shortname : 'NetBSD';
  219. flags : [];
  220. cpu : cpu_powerpc;
  221. unit_env : '';
  222. extradefines : 'UNIX;BSD;HASUNIX';
  223. sourceext : '.pp';
  224. pasext : '.pas';
  225. exeext : '';
  226. defext : '.def';
  227. scriptext : '.sh';
  228. smartext : '.sl';
  229. unitext : '.ppu';
  230. unitlibext : '.ppl';
  231. asmext : '.s';
  232. objext : '.o';
  233. resext : '.res';
  234. resobjext : '.or';
  235. sharedlibext : '.so';
  236. staticlibext : '.s';
  237. staticlibprefix : 'libp';
  238. sharedlibprefix : 'lib';
  239. sharedClibext : '.so';
  240. staticClibext : '.a';
  241. staticClibprefix : 'lib';
  242. sharedClibprefix : 'lib';
  243. Cprefix : '';
  244. newline : #10;
  245. dirsep : '/';
  246. files_case_relevent : true;
  247. assem : as_gas;
  248. assemextern : as_gas;
  249. link : nil;
  250. linkextern : nil;
  251. ar : ar_gnu_ar;
  252. res : res_none;
  253. script : script_unix;
  254. endian : endian_big;
  255. alignment :
  256. (
  257. procalign : 4;
  258. loopalign : 4;
  259. jumpalign : 0;
  260. constalignmin : 0;
  261. constalignmax : 4;
  262. varalignmin : 0;
  263. varalignmax : 4;
  264. localalignmin : 0;
  265. localalignmax : 4;
  266. paraalign : 4;
  267. recordalignmin : 0;
  268. recordalignmax : 2;
  269. maxCrecordalign : 4
  270. );
  271. first_parm_offset : 8;
  272. heapsize : 256*1024;
  273. stacksize : 32*1024*1024;
  274. DllScanSupported:false;
  275. use_function_relative_addresses : true;
  276. { abi_powerpc_sysv doesn't work yet }
  277. abi : abi_powerpc_aix;
  278. );
  279. system_powerpc_darwin_info : tsysteminfo =
  280. (
  281. system : system_powerpc_darwin;
  282. name : 'Darwin for PowerPC';
  283. shortname : 'Darwin';
  284. flags : [tf_under_development];
  285. cpu : cpu_powerpc;
  286. unit_env : 'BSDUNITS';
  287. extradefines : 'UNIX;BSD;HASUNIX';
  288. sourceext : '.pp';
  289. pasext : '.pas';
  290. exeext : '';
  291. defext : '.def';
  292. scriptext : '.sh';
  293. smartext : '.sl';
  294. unitext : '.ppu';
  295. unitlibext : '.ppl';
  296. asmext : '.s';
  297. objext : '.o';
  298. resext : '.res';
  299. resobjext : '.or';
  300. sharedlibext : '.so';
  301. staticlibext : '.a';
  302. staticlibprefix : 'libp';
  303. sharedlibprefix : 'lib';
  304. sharedClibext : '.so';
  305. staticClibext : '.a';
  306. staticClibprefix : 'lib';
  307. sharedClibprefix : 'lib';
  308. Cprefix : '';
  309. newline : #10;
  310. dirsep : '/';
  311. files_case_relevent : true;
  312. assem : as_gas;
  313. assemextern : as_gas;
  314. link : nil;
  315. linkextern : nil;
  316. ar : ar_gnu_ar;
  317. res : res_none;
  318. script : script_unix;
  319. endian : endian_big;
  320. alignment :
  321. (
  322. procalign : 16;
  323. loopalign : 4;
  324. jumpalign : 0;
  325. constalignmin : 0;
  326. constalignmax : 1;
  327. varalignmin : 0;
  328. varalignmax : 1;
  329. localalignmin : 0;
  330. localalignmax : 1;
  331. paraalign : 4;
  332. recordalignmin : 0;
  333. recordalignmax : 2;
  334. maxCrecordalign : 4
  335. );
  336. first_parm_offset : 8;
  337. heapsize : 256*1024;
  338. stacksize : 262144;
  339. DllScanSupported:false;
  340. use_function_relative_addresses : true;
  341. abi : abi_powerpc_aix;
  342. );
  343. implementation
  344. initialization
  345. {$ifdef cpu86}
  346. {$ifdef FreeBSD}
  347. set_source_info(system_i386_FreeBSD_info);
  348. {$endif}
  349. {$ifdef NetBSD}
  350. set_source_info(system_i386_NetBSD_info);
  351. {$endif}
  352. {$endif cpu86}
  353. {$ifdef cpu68}
  354. {$ifdef NetBSD}
  355. set_source_info(system_m68k_NetBSD_info);
  356. {$endif NetBSD}
  357. {$endif cpu68}
  358. {$ifdef cpupowerpc}
  359. {$ifdef Darwin}
  360. set_source_info(system_powerpc_darwin_info);
  361. {$endif Darwin}
  362. {$ifdef NetBSD}
  363. set_source_info(system_powerpc_netbsd_info);
  364. {$endif}
  365. {$endif cpu68}
  366. end.
  367. {
  368. $Log$
  369. Revision 1.2 2003-05-25 23:15:04 marco
  370. * NetBSD target support. OpenBSD reserved in the enum, for future use.
  371. Revision 1.1 2003/05/20 23:54:00 florian
  372. + basic darwin support added
  373. Revision 1.2 2003/01/11 16:35:15 marco
  374. * HASUNIX defined for now.
  375. Revision 1.1 2002/09/06 15:03:51 carl
  376. * moved files to systems directory
  377. Revision 1.3 2002/08/13 18:01:51 carl
  378. * rename swatoperands to swapoperands
  379. + m68k first compilable version (still needs a lot of testing):
  380. assembler generator, system information , inline
  381. assembler reader.
  382. Revision 1.2 2002/08/12 15:08:39 carl
  383. + stab register indexes for powerpc (moved from gdb to cpubase)
  384. + tprocessor enumeration moved to cpuinfo
  385. + linker in target_info is now a class
  386. * many many updates for m68k (will soon start to compile)
  387. - removed some ifdef or correct them for correct cpu
  388. Revision 1.1 2002/07/26 21:15:38 florian
  389. * rewrote the system handling
  390. }