2
0

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. recordalignmin : 0;
  78. recordalignmax : 2;
  79. maxCrecordalign : 4
  80. );
  81. first_parm_offset : 8;
  82. heapsize : 256*1024;
  83. stacksize : 262144;
  84. DllScanSupported:false;
  85. use_function_relative_addresses : true
  86. );
  87. system_i386_netbsd_info : tsysteminfo =
  88. (
  89. system : system_i386_NetBSD;
  90. name : 'NetBSD for i386';
  91. shortname : 'NetBSD';
  92. flags : [tf_under_development];
  93. cpu : cpu_i386;
  94. unit_env : 'BSDUNITS';
  95. extradefines : 'UNIX;BSD;HASUNIX';
  96. sourceext : '.pp';
  97. pasext : '.pas';
  98. exeext : '';
  99. defext : '.def';
  100. scriptext : '.sh';
  101. smartext : '.sl';
  102. unitext : '.ppu';
  103. unitlibext : '.ppl';
  104. asmext : '.s';
  105. objext : '.o';
  106. resext : '.res';
  107. resobjext : '.or';
  108. sharedlibext : '.so';
  109. staticlibext : '.a';
  110. staticlibprefix : 'libp';
  111. sharedlibprefix : 'lib';
  112. sharedClibext : '.so';
  113. staticClibext : '.a';
  114. staticClibprefix : 'lib';
  115. sharedClibprefix : 'lib';
  116. Cprefix : '_';
  117. newline : #10;
  118. dirsep : '/';
  119. files_case_relevent : true;
  120. assem : as_gas;
  121. assemextern : as_gas;
  122. link : nil;
  123. linkextern : nil;
  124. ar : ar_gnu_ar;
  125. res : res_none;
  126. script : script_unix;
  127. endian : endian_little;
  128. alignment :
  129. (
  130. procalign : 4;
  131. loopalign : 4;
  132. jumpalign : 0;
  133. constalignmin : 0;
  134. constalignmax : 1;
  135. varalignmin : 0;
  136. varalignmax : 1;
  137. localalignmin : 0;
  138. localalignmax : 1;
  139. recordalignmin : 0;
  140. recordalignmax : 2;
  141. maxCrecordalign : 4
  142. );
  143. first_parm_offset : 8;
  144. heapsize : 256*1024;
  145. stacksize : 262144;
  146. DllScanSupported:false;
  147. use_function_relative_addresses : true
  148. );
  149. system_m68k_netbsd_info : tsysteminfo =
  150. (
  151. system : system_m68k_NetBSD;
  152. name : 'NetBSD for m68k';
  153. shortname : 'NetBSD';
  154. flags : [tf_under_development];
  155. cpu : cpu_m68k;
  156. unit_env : 'BSDUNITS';
  157. extradefines : 'UNIX;BSD;HASUNIX';
  158. sourceext : '.pp';
  159. pasext : '.pas';
  160. exeext : '';
  161. defext : '.def';
  162. scriptext : '.sh';
  163. smartext : '.sl';
  164. unitext : '.ppu';
  165. unitlibext : '.ppl';
  166. asmext : '.s';
  167. objext : '.o';
  168. resext : '.res';
  169. resobjext : '.or';
  170. sharedlibext : '.so';
  171. staticlibext : '.a';
  172. staticlibprefix : 'libp';
  173. sharedlibprefix : 'lib';
  174. sharedClibext : '.so';
  175. staticClibext : '.a';
  176. staticClibprefix : 'lib';
  177. sharedClibprefix : 'lib';
  178. Cprefix : '';
  179. newline : #10;
  180. dirsep : '/';
  181. files_case_relevent : true;
  182. assem : as_gas;
  183. assemextern : as_gas;
  184. link : nil;
  185. linkextern : nil;
  186. ar : ar_gnu_ar;
  187. res : res_none;
  188. script : script_unix;
  189. endian : endian_big;
  190. alignment :
  191. (
  192. procalign : 4;
  193. loopalign : 4;
  194. jumpalign : 0;
  195. constalignmin : 0;
  196. constalignmax : 1;
  197. varalignmin : 0;
  198. varalignmax : 1;
  199. localalignmin : 0;
  200. localalignmax : 1;
  201. recordalignmin : 0;
  202. recordalignmax : 2;
  203. maxCrecordalign : 4
  204. );
  205. first_parm_offset : 8;
  206. heapsize : 256*1024;
  207. stacksize : 262144;
  208. DllScanSupported:false;
  209. use_function_relative_addresses : true
  210. );
  211. system_powerpc_netbsd_info : tsysteminfo =
  212. (
  213. system : system_powerpc_netbsd;
  214. name : 'NetBSD for PowerPC';
  215. shortname : 'NetBSD';
  216. flags : [];
  217. cpu : cpu_powerpc;
  218. unit_env : '';
  219. extradefines : 'UNIX;BSD;HASUNIX';
  220. sourceext : '.pp';
  221. pasext : '.pas';
  222. exeext : '';
  223. defext : '.def';
  224. scriptext : '.sh';
  225. smartext : '.sl';
  226. unitext : '.ppu';
  227. unitlibext : '.ppl';
  228. asmext : '.s';
  229. objext : '.o';
  230. resext : '.res';
  231. resobjext : '.or';
  232. sharedlibext : '.so';
  233. staticlibext : '.s';
  234. staticlibprefix : 'libp';
  235. sharedlibprefix : 'lib';
  236. sharedClibext : '.so';
  237. staticClibext : '.a';
  238. staticClibprefix : 'lib';
  239. sharedClibprefix : 'lib';
  240. Cprefix : '';
  241. newline : #10;
  242. dirsep : '/';
  243. files_case_relevent : true;
  244. assem : as_gas;
  245. assemextern : as_gas;
  246. link : nil;
  247. linkextern : nil;
  248. ar : ar_gnu_ar;
  249. res : res_none;
  250. script : script_unix;
  251. endian : endian_big;
  252. alignment :
  253. (
  254. procalign : 4;
  255. loopalign : 4;
  256. jumpalign : 0;
  257. constalignmin : 0;
  258. constalignmax : 4;
  259. varalignmin : 0;
  260. varalignmax : 4;
  261. localalignmin : 0;
  262. localalignmax : 4;
  263. recordalignmin : 0;
  264. recordalignmax : 2;
  265. maxCrecordalign : 4
  266. );
  267. first_parm_offset : 8;
  268. heapsize : 256*1024;
  269. stacksize : 32*1024*1024;
  270. DllScanSupported:false;
  271. use_function_relative_addresses : true;
  272. { abi_powerpc_sysv doesn't work yet }
  273. abi : abi_powerpc_aix;
  274. );
  275. system_powerpc_darwin_info : tsysteminfo =
  276. (
  277. system : system_powerpc_darwin;
  278. name : 'Darwin for PowerPC';
  279. shortname : 'Darwin';
  280. flags : [tf_under_development];
  281. cpu : cpu_powerpc;
  282. unit_env : 'BSDUNITS';
  283. extradefines : 'UNIX;BSD;HASUNIX';
  284. sourceext : '.pp';
  285. pasext : '.pas';
  286. exeext : '';
  287. defext : '.def';
  288. scriptext : '.sh';
  289. smartext : '.sl';
  290. unitext : '.ppu';
  291. unitlibext : '.ppl';
  292. asmext : '.s';
  293. objext : '.o';
  294. resext : '.res';
  295. resobjext : '.or';
  296. sharedlibext : '.so';
  297. staticlibext : '.a';
  298. staticlibprefix : 'libp';
  299. sharedlibprefix : 'lib';
  300. sharedClibext : '.so';
  301. staticClibext : '.a';
  302. staticClibprefix : 'lib';
  303. sharedClibprefix : 'lib';
  304. Cprefix : '';
  305. newline : #10;
  306. dirsep : '/';
  307. files_case_relevent : true;
  308. assem : as_gas;
  309. assemextern : as_gas;
  310. link : nil;
  311. linkextern : nil;
  312. ar : ar_gnu_ar;
  313. res : res_none;
  314. script : script_unix;
  315. endian : endian_big;
  316. alignment :
  317. (
  318. procalign : 16;
  319. loopalign : 4;
  320. jumpalign : 0;
  321. constalignmin : 0;
  322. constalignmax : 1;
  323. varalignmin : 0;
  324. varalignmax : 1;
  325. localalignmin : 0;
  326. localalignmax : 1;
  327. recordalignmin : 0;
  328. recordalignmax : 2;
  329. maxCrecordalign : 4
  330. );
  331. first_parm_offset : 8;
  332. heapsize : 256*1024;
  333. stacksize : 262144;
  334. DllScanSupported:false;
  335. use_function_relative_addresses : true;
  336. abi : abi_powerpc_aix;
  337. );
  338. implementation
  339. initialization
  340. {$ifdef cpu86}
  341. {$ifdef FreeBSD}
  342. set_source_info(system_i386_FreeBSD_info);
  343. {$endif}
  344. {$ifdef NetBSD}
  345. set_source_info(system_i386_NetBSD_info);
  346. {$endif}
  347. {$endif cpu86}
  348. {$ifdef cpu68}
  349. {$ifdef NetBSD}
  350. set_source_info(system_m68k_NetBSD_info);
  351. {$endif NetBSD}
  352. {$endif cpu68}
  353. {$ifdef cpupowerpc}
  354. {$ifdef Darwin}
  355. set_source_info(system_powerpc_darwin_info);
  356. {$endif Darwin}
  357. {$ifdef NetBSD}
  358. set_source_info(system_powerpc_netbsd_info);
  359. {$endif}
  360. {$endif cpu68}
  361. end.
  362. {
  363. $Log$
  364. Revision 1.4 2003-10-03 22:09:49 peter
  365. * removed paraalign
  366. Revision 1.3 2003/05/28 23:18:31 florian
  367. * started to fix and clean up the sparc port
  368. Revision 1.2 2003/05/25 23:15:04 marco
  369. * NetBSD target support. OpenBSD reserved in the enum, for future use.
  370. Revision 1.1 2003/05/20 23:54:00 florian
  371. + basic darwin support added
  372. Revision 1.2 2003/01/11 16:35:15 marco
  373. * HASUNIX defined for now.
  374. Revision 1.1 2002/09/06 15:03:51 carl
  375. * moved files to systems directory
  376. Revision 1.3 2002/08/13 18:01:51 carl
  377. * rename swatoperands to swapoperands
  378. + m68k first compilable version (still needs a lot of testing):
  379. assembler generator, system information , inline
  380. assembler reader.
  381. Revision 1.2 2002/08/12 15:08:39 carl
  382. + stab register indexes for powerpc (moved from gdb to cpubase)
  383. + tprocessor enumeration moved to cpuinfo
  384. + linker in target_info is now a class
  385. * many many updates for m68k (will soon start to compile)
  386. - removed some ifdef or correct them for correct cpu
  387. Revision 1.1 2002/07/26 21:15:38 florian
  388. * rewrote the system handling
  389. }