i_embed.pas 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076
  1. {
  2. This unit implements support information structures for the FPC Embedded target
  3. Copyright (c) 1998-2006 by Peter Vreman
  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. unit i_embed;
  18. {$i fpcdefs.inc}
  19. {$ifdef go32v2}
  20. { As wlib uses a different Dos-Extender, long-command line
  21. encoding for DJGPP does not work here.
  22. Put all inside a script file instead }
  23. {$define USE_SCRIPTED_WLIB}
  24. {$endif}
  25. interface
  26. uses
  27. systems;
  28. const
  29. system_aarch64_embedded_info : tsysteminfo =
  30. (
  31. system : system_aarch64_embedded;
  32. name : 'Embedded';
  33. shortname : 'Embedded';
  34. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  35. tf_smartlink_sections,tf_init_final_units_by_calls];
  36. cpu : cpu_aarch64;
  37. unit_env : '';
  38. extradefines : '';
  39. exeext : '';
  40. defext : '.def';
  41. scriptext : '.sh';
  42. smartext : '.sl';
  43. unitext : '.ppu';
  44. unitlibext : '.ppl';
  45. asmext : '.s';
  46. objext : '.o';
  47. resext : '.res';
  48. resobjext : '.or';
  49. sharedlibext : '.so';
  50. staticlibext : '.a';
  51. staticlibprefix : 'libp';
  52. sharedlibprefix : 'lib';
  53. sharedClibext : '.so';
  54. staticClibext : '.a';
  55. staticClibprefix : 'lib';
  56. sharedClibprefix : 'lib';
  57. importlibprefix : 'libimp';
  58. importlibext : '.a';
  59. Cprefix : '';
  60. newline : #10;
  61. dirsep : '/';
  62. assem : as_gas;
  63. assemextern : as_gas;
  64. link : ld_none;
  65. linkextern : ld_embedded;
  66. ar : ar_gnu_ar;
  67. res : res_none;
  68. dbg : dbg_dwarf2;
  69. script : script_unix;
  70. endian : endian_little;
  71. alignment :
  72. (
  73. procalign : 8;
  74. loopalign : 8;
  75. jumpalign : 0;
  76. jumpalignskipmax : 0;
  77. coalescealign : 0;
  78. coalescealignskipmax: 0;
  79. constalignmin : 0;
  80. constalignmax : 8;
  81. varalignmin : 0;
  82. varalignmax : 8;
  83. localalignmin : 8;
  84. localalignmax : 8;
  85. recordalignmin : 0;
  86. recordalignmax : 8;
  87. maxCrecordalign : 8
  88. );
  89. first_parm_offset : 8;
  90. stacksize : 262144;
  91. stackalign : 16;
  92. abi : abi_default;
  93. llvmdatalayout : 'e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128';
  94. mos6502page0alloc : [];
  95. );
  96. system_arm_embedded_info : tsysteminfo =
  97. (
  98. system : system_arm_embedded;
  99. name : 'Embedded';
  100. shortname : 'Embedded';
  101. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  102. tf_smartlink_sections,tf_init_final_units_by_calls];
  103. cpu : cpu_arm;
  104. unit_env : '';
  105. extradefines : '';
  106. exeext : '';
  107. defext : '.def';
  108. scriptext : '.sh';
  109. smartext : '.sl';
  110. unitext : '.ppu';
  111. unitlibext : '.ppl';
  112. asmext : '.s';
  113. objext : '.o';
  114. resext : '.res';
  115. resobjext : '.or';
  116. sharedlibext : '.so';
  117. staticlibext : '.a';
  118. staticlibprefix : 'libp';
  119. sharedlibprefix : 'lib';
  120. sharedClibext : '.so';
  121. staticClibext : '.a';
  122. staticClibprefix : 'lib';
  123. sharedClibprefix : 'lib';
  124. importlibprefix : 'libimp';
  125. importlibext : '.a';
  126. Cprefix : '';
  127. newline : #10;
  128. dirsep : '/';
  129. assem : as_gas;
  130. assemextern : as_gas;
  131. link : ld_none;
  132. linkextern : ld_embedded;
  133. ar : ar_gnu_ar;
  134. res : res_none;
  135. dbg : dbg_dwarf2;
  136. script : script_unix;
  137. endian : endian_little;
  138. alignment :
  139. (
  140. procalign : 4;
  141. loopalign : 4;
  142. jumpalign : 0;
  143. jumpalignskipmax : 0;
  144. coalescealign : 0;
  145. coalescealignskipmax: 0;
  146. constalignmin : 0;
  147. constalignmax : 4;
  148. varalignmin : 0;
  149. varalignmax : 4;
  150. localalignmin : 4;
  151. localalignmax : 4;
  152. recordalignmin : 0;
  153. recordalignmax : 4;
  154. maxCrecordalign : 4
  155. );
  156. first_parm_offset : 8;
  157. stacksize : 262144;
  158. stackalign : 4;
  159. abi : abi_default;
  160. 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-v64:64:64-v128:64:128-a0:0:64-n32-S32';
  161. mos6502page0alloc : [];
  162. );
  163. system_avr_embedded_info : tsysteminfo =
  164. (
  165. system : system_avr_embedded;
  166. name : 'Embedded';
  167. shortname : 'Embedded';
  168. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  169. tf_smartlink_sections,tf_init_final_units_by_calls];
  170. cpu : cpu_avr;
  171. unit_env : '';
  172. extradefines : '';
  173. exeext : '';
  174. defext : '.def';
  175. scriptext : '.sh';
  176. smartext : '.sl';
  177. unitext : '.ppu';
  178. unitlibext : '.ppl';
  179. asmext : '.s';
  180. objext : '.o';
  181. resext : '.res';
  182. resobjext : '.or';
  183. sharedlibext : '.so';
  184. staticlibext : '.a';
  185. staticlibprefix : 'libp';
  186. sharedlibprefix : 'lib';
  187. sharedClibext : '.so';
  188. staticClibext : '.a';
  189. staticClibprefix : 'lib';
  190. sharedClibprefix : 'lib';
  191. importlibprefix : 'libimp';
  192. importlibext : '.a';
  193. Cprefix : '';
  194. newline : #10;
  195. dirsep : '/';
  196. assem : as_gas;
  197. assemextern : as_gas;
  198. link : ld_none;
  199. linkextern : ld_embedded;
  200. ar : ar_gnu_ar;
  201. res : res_none;
  202. dbg : dbg_dwarf3;
  203. script : script_unix;
  204. endian : endian_little;
  205. alignment :
  206. (
  207. procalign : 1;
  208. loopalign : 1;
  209. jumpalign : 0;
  210. jumpalignskipmax : 0;
  211. coalescealign : 0;
  212. coalescealignskipmax: 0;
  213. constalignmin : 0;
  214. constalignmax : 1;
  215. varalignmin : 0;
  216. varalignmax : 1;
  217. localalignmin : 0;
  218. localalignmax : 1;
  219. recordalignmin : 0;
  220. recordalignmax : 1;
  221. maxCrecordalign : 1
  222. );
  223. first_parm_offset : 0;
  224. stacksize : 1024;
  225. stackalign : 1;
  226. abi : abi_default;
  227. llvmdatalayout : 'todo';
  228. mos6502page0alloc : [];
  229. );
  230. system_mipsel_embedded_info : tsysteminfo =
  231. (
  232. system : system_mipsel_embedded;
  233. name : 'Embedded';
  234. shortname : 'Embedded';
  235. flags : [tf_needs_symbol_size,tf_needs_symbol_type,tf_files_case_sensitive,
  236. tf_smartlink_sections];
  237. cpu : cpu_mipsel;
  238. unit_env : '';
  239. extradefines : '';
  240. exeext : '';
  241. defext : '.def';
  242. scriptext : '.sh';
  243. smartext : '.sl';
  244. unitext : '.ppu';
  245. unitlibext : '.ppl';
  246. asmext : '.s';
  247. objext : '.o';
  248. resext : '.res';
  249. resobjext : '.or';
  250. sharedlibext : '.so';
  251. staticlibext : '.a';
  252. staticlibprefix : 'libp';
  253. sharedlibprefix : 'lib';
  254. sharedClibext : '.so';
  255. staticClibext : '.a';
  256. staticClibprefix : 'lib';
  257. sharedClibprefix : 'lib';
  258. importlibprefix : 'libimp';
  259. importlibext : '.a';
  260. Cprefix : '';
  261. newline : #10;
  262. dirsep : '/';
  263. assem : as_gas;
  264. assemextern : as_gas;
  265. link : ld_none;
  266. linkextern : ld_embedded;
  267. ar : ar_gnu_ar;
  268. res : res_none;
  269. dbg : dbg_dwarf2;
  270. script : script_unix;
  271. endian : endian_little;
  272. alignment :
  273. (
  274. procalign : 4;
  275. loopalign : 4;
  276. jumpalign : 0;
  277. jumpalignskipmax : 0;
  278. coalescealign : 0;
  279. coalescealignskipmax: 0;
  280. constalignmin : 0;
  281. constalignmax : 4;
  282. varalignmin : 0;
  283. varalignmax : 4;
  284. localalignmin : 4;
  285. localalignmax : 8;
  286. recordalignmin : 0;
  287. recordalignmax : 8;
  288. maxCrecordalign : 4
  289. );
  290. first_parm_offset : 0;
  291. stacksize : 262144;
  292. stackalign : 8;
  293. abi : abi_default;
  294. llvmdatalayout : 'todo';
  295. mos6502page0alloc : [];
  296. );
  297. system_i386_embedded_info : tsysteminfo =
  298. (
  299. system : system_i386_embedded;
  300. name : 'Embedded';
  301. shortname : 'Embedded';
  302. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  303. tf_smartlink_sections];
  304. cpu : cpu_i386;
  305. unit_env : '';
  306. extradefines : '';
  307. exeext : '';
  308. defext : '.def';
  309. scriptext : '.sh';
  310. smartext : '.sl';
  311. unitext : '.ppu';
  312. unitlibext : '.ppl';
  313. asmext : '.s';
  314. objext : '.o';
  315. resext : '.res';
  316. resobjext : '.or';
  317. sharedlibext : '.so';
  318. staticlibext : '.a';
  319. staticlibprefix : 'libp';
  320. sharedlibprefix : 'lib';
  321. sharedClibext : '.so';
  322. staticClibext : '.a';
  323. staticClibprefix : 'lib';
  324. sharedClibprefix : 'lib';
  325. importlibprefix : 'libimp';
  326. importlibext : '.a';
  327. Cprefix : '';
  328. newline : #10;
  329. dirsep : '/';
  330. assem : as_i386_elf32;
  331. assemextern : as_gas;
  332. link : ld_none;
  333. linkextern : ld_embedded;
  334. ar : ar_gnu_ar;
  335. res : res_none;
  336. dbg : dbg_stabs;
  337. script : script_unix;
  338. endian : endian_little;
  339. alignment :
  340. (
  341. procalign : 16;
  342. loopalign : 4;
  343. jumpalign : 0;
  344. jumpalignskipmax : 0;
  345. coalescealign : 0;
  346. coalescealignskipmax: 0;
  347. constalignmin : 0;
  348. constalignmax : 16;
  349. varalignmin : 0;
  350. varalignmax : 16;
  351. localalignmin : 4;
  352. localalignmax : 8;
  353. recordalignmin : 0;
  354. recordalignmax : 16;
  355. maxCrecordalign : 4
  356. );
  357. first_parm_offset : 8;
  358. stacksize : 4096;
  359. stackalign : 4;
  360. abi : abi_default;
  361. llvmdatalayout : 'e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32';
  362. mos6502page0alloc : [];
  363. );
  364. system_x86_64_embedded_info : tsysteminfo =
  365. (
  366. system : system_x86_64_embedded;
  367. name : 'Embedded';
  368. shortname : 'Embedded';
  369. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  370. tf_smartlink_sections];
  371. cpu : cpu_x86_64;
  372. unit_env : '';
  373. extradefines : '';
  374. exeext : '';
  375. defext : '.def';
  376. scriptext : '.sh';
  377. smartext : '.sl';
  378. unitext : '.ppu';
  379. unitlibext : '.ppl';
  380. asmext : '.s';
  381. objext : '.o';
  382. resext : '.res';
  383. resobjext : '.or';
  384. sharedlibext : '.so';
  385. staticlibext : '.a';
  386. staticlibprefix : 'libp';
  387. sharedlibprefix : 'lib';
  388. sharedClibext : '.so';
  389. staticClibext : '.a';
  390. staticClibprefix : 'lib';
  391. sharedClibprefix : 'lib';
  392. importlibprefix : 'libimp';
  393. importlibext : '.a';
  394. Cprefix : '';
  395. newline : #10;
  396. dirsep : '/';
  397. assem : as_x86_64_elf64;
  398. assemextern : as_gas;
  399. link : ld_none;
  400. linkextern : ld_embedded;
  401. ar : ar_gnu_ar;
  402. res : res_none;
  403. dbg : dbg_stabs;
  404. script : script_unix;
  405. endian : endian_little;
  406. alignment :
  407. (
  408. procalign : 16;
  409. loopalign : 8;
  410. jumpalign : 0;
  411. jumpalignskipmax : 0;
  412. coalescealign : 0;
  413. coalescealignskipmax: 0;
  414. constalignmin : 0;
  415. constalignmax : 16;
  416. varalignmin : 0;
  417. varalignmax : 16;
  418. localalignmin : 4;
  419. localalignmax : 16;
  420. recordalignmin : 0;
  421. recordalignmax : 16;
  422. maxCrecordalign : 16
  423. );
  424. first_parm_offset : 16;
  425. stacksize : 8*1024*1024;
  426. stackalign : 16;
  427. abi : abi_default;
  428. 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';
  429. mos6502page0alloc : [];
  430. );
  431. system_i8086_embedded_info : tsysteminfo =
  432. (
  433. system : system_i8086_embedded;
  434. name : 'Embedded';
  435. shortname : 'Embedded';
  436. flags : [tf_use_8_3,
  437. {$ifdef I8086_SMARTLINK_SECTIONS}
  438. tf_smartlink_sections,
  439. {$else I8086_SMARTLINK_SECTIONS}
  440. tf_smartlink_library,
  441. tf_no_objectfiles_when_smartlinking,
  442. {$endif I8086_SMARTLINK_SECTIONS}
  443. tf_cld,
  444. tf_no_generic_stackcheck,tf_emit_stklen];
  445. cpu : cpu_i8086;
  446. unit_env : '';
  447. extradefines : '';
  448. exeext : '.exe';
  449. defext : '.def';
  450. scriptext : '.bat';
  451. smartext : '.sl';
  452. unitext : '.ppu';
  453. unitlibext : '.ppl';
  454. asmext : '.s';
  455. objext : '.o';
  456. resext : '.res';
  457. resobjext : '.or';
  458. sharedlibext : '.dll';
  459. staticlibext : '.a';
  460. staticlibprefix : '';
  461. sharedlibprefix : '';
  462. sharedClibext : '.dll';
  463. staticClibext : '.a';
  464. staticClibprefix : 'lib';
  465. sharedClibprefix : '';
  466. importlibprefix : '';
  467. importlibext : '.al';
  468. Cprefix : '_';
  469. newline : #13#10;
  470. dirsep : '\';
  471. assem : as_i8086_omf;
  472. assemextern : as_i8086_nasmobj;
  473. link : ld_int_msdos;
  474. linkextern : ld_msdos;
  475. {$ifdef USE_SCRIPTED_WLIB}
  476. ar : ar_watcom_wlib_omf_scripted;
  477. {$else}
  478. ar : ar_watcom_wlib_omf;
  479. {$endif}
  480. res : res_none;
  481. dbg : dbg_dwarf2;
  482. script : script_dos;
  483. endian : endian_little;
  484. alignment :
  485. (
  486. procalign : 1;
  487. loopalign : 1;
  488. jumpalign : 0;
  489. jumpalignskipmax : 0;
  490. coalescealign : 0;
  491. coalescealignskipmax: 0;
  492. constalignmin : 0;
  493. constalignmax : 2;
  494. varalignmin : 0;
  495. varalignmax : 2;
  496. localalignmin : 0;
  497. localalignmax : 2;
  498. recordalignmin : 0;
  499. recordalignmax : 2;
  500. maxCrecordalign : 2
  501. );
  502. first_parm_offset : 4;
  503. stacksize : 0;
  504. stackalign : 2;
  505. abi : abi_default;
  506. llvmdatalayout : 'todo';
  507. mos6502page0alloc : [];
  508. );
  509. system_m68k_embedded_info : tsysteminfo =
  510. (
  511. system : system_m68k_embedded;
  512. name : 'Embedded';
  513. shortname : 'Embedded';
  514. flags : [tf_under_development,tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  515. tf_smartlink_sections];
  516. cpu : cpu_m68k;
  517. unit_env : '';
  518. extradefines : '';
  519. exeext : '';
  520. defext : '.def';
  521. scriptext : '.sh';
  522. smartext : '.sl';
  523. unitext : '.ppu';
  524. unitlibext : '.ppl';
  525. asmext : '.s';
  526. objext : '.o';
  527. resext : '.res';
  528. resobjext : '.or';
  529. sharedlibext : '.so';
  530. staticlibext : '.a';
  531. staticlibprefix : 'libp';
  532. sharedlibprefix : 'lib';
  533. sharedClibext : '.so';
  534. staticClibext : '.a';
  535. staticClibprefix : 'lib';
  536. sharedClibprefix : 'lib';
  537. importlibprefix : 'libimp';
  538. importlibext : '.a';
  539. Cprefix : '';
  540. newline : #10;
  541. dirsep : '/';
  542. assem : as_gas;
  543. assemextern : as_gas;
  544. link : ld_none;
  545. linkextern : ld_embedded;
  546. ar : ar_gnu_ar;
  547. res : res_none;
  548. dbg : dbg_dwarf2;
  549. script : script_unix;
  550. endian : endian_big;
  551. alignment :
  552. (
  553. procalign : 4;
  554. loopalign : 4;
  555. jumpalign : 0;
  556. jumpalignskipmax : 0;
  557. coalescealign : 0;
  558. coalescealignskipmax: 0;
  559. constalignmin : 0;
  560. constalignmax : 4;
  561. varalignmin : 0;
  562. varalignmax : 4;
  563. localalignmin : 4;
  564. localalignmax : 4;
  565. recordalignmin : 0;
  566. recordalignmax : 4;
  567. maxCrecordalign : 4
  568. );
  569. first_parm_offset : 8;
  570. stacksize : 32768;
  571. stackalign : 4;
  572. abi : abi_default;
  573. llvmdatalayout : 'TODO';
  574. mos6502page0alloc : [];
  575. );
  576. system_riscv32_embedded_info : tsysteminfo =
  577. (
  578. system : system_riscv32_embedded;
  579. name : 'Embedded';
  580. shortname : 'Embedded';
  581. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  582. tf_smartlink_sections];
  583. cpu : cpu_riscv32;
  584. unit_env : '';
  585. extradefines : '';
  586. exeext : '';
  587. defext : '.def';
  588. scriptext : '.sh';
  589. smartext : '.sl';
  590. unitext : '.ppu';
  591. unitlibext : '.ppl';
  592. asmext : '.s';
  593. objext : '.o';
  594. resext : '.res';
  595. resobjext : '.or';
  596. sharedlibext : '.so';
  597. staticlibext : '.a';
  598. staticlibprefix : 'libp';
  599. sharedlibprefix : 'lib';
  600. sharedClibext : '.so';
  601. staticClibext : '.a';
  602. staticClibprefix : 'lib';
  603. sharedClibprefix : 'lib';
  604. importlibprefix : 'libimp';
  605. importlibext : '.a';
  606. Cprefix : '';
  607. newline : #10;
  608. dirsep : '/';
  609. assem : as_gas;
  610. assemextern : as_gas;
  611. link : ld_none;
  612. linkextern : ld_embedded;
  613. ar : ar_gnu_ar;
  614. res : res_none;
  615. dbg : dbg_dwarf2;
  616. script : script_unix;
  617. endian : endian_little;
  618. alignment :
  619. (
  620. procalign : 4;
  621. loopalign : 4;
  622. jumpalign : 0;
  623. jumpalignskipmax : 0;
  624. coalescealign : 0;
  625. coalescealignskipmax: 0;
  626. constalignmin : 0;
  627. constalignmax : 4;
  628. varalignmin : 0;
  629. varalignmax : 4;
  630. localalignmin : 4;
  631. localalignmax : 4;
  632. recordalignmin : 0;
  633. recordalignmax : 4;
  634. maxCrecordalign : 4
  635. );
  636. first_parm_offset : 8;
  637. stacksize : 262144;
  638. stackalign : 16;
  639. abi : abi_riscv_ilp32;
  640. 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-v64:64:64-v128:64:128-a0:0:64-n32-S32';
  641. mos6502page0alloc : [];
  642. );
  643. system_riscv64_embedded_info : tsysteminfo =
  644. (
  645. system : system_riscv64_embedded;
  646. name : 'Embedded';
  647. shortname : 'Embedded';
  648. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  649. tf_smartlink_sections];
  650. cpu : cpu_riscv64;
  651. unit_env : '';
  652. extradefines : '';
  653. exeext : '';
  654. defext : '.def';
  655. scriptext : '.sh';
  656. smartext : '.sl';
  657. unitext : '.ppu';
  658. unitlibext : '.ppl';
  659. asmext : '.s';
  660. objext : '.o';
  661. resext : '.res';
  662. resobjext : '.or';
  663. sharedlibext : '.so';
  664. staticlibext : '.a';
  665. staticlibprefix : 'libp';
  666. sharedlibprefix : 'lib';
  667. sharedClibext : '.so';
  668. staticClibext : '.a';
  669. staticClibprefix : 'lib';
  670. sharedClibprefix : 'lib';
  671. importlibprefix : 'libimp';
  672. importlibext : '.a';
  673. Cprefix : '';
  674. newline : #10;
  675. dirsep : '/';
  676. assem : as_gas;
  677. assemextern : as_gas;
  678. link : ld_none;
  679. linkextern : ld_embedded;
  680. ar : ar_gnu_ar;
  681. res : res_none;
  682. dbg : dbg_dwarf2;
  683. script : script_unix;
  684. endian : endian_little;
  685. alignment :
  686. (
  687. procalign : 4;
  688. loopalign : 4;
  689. jumpalign : 0;
  690. jumpalignskipmax : 0;
  691. coalescealign : 0;
  692. coalescealignskipmax: 0;
  693. constalignmin : 0;
  694. constalignmax : 4;
  695. varalignmin : 0;
  696. varalignmax : 4;
  697. localalignmin : 4;
  698. localalignmax : 4;
  699. recordalignmin : 0;
  700. recordalignmax : 4;
  701. maxCrecordalign : 4
  702. );
  703. first_parm_offset : 16;
  704. stacksize : 262144;
  705. stackalign : 8;
  706. abi : abi_riscv_lp64d;
  707. 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-v64:64:64-v128:64:128-a0:0:64-n32-S32';
  708. mos6502page0alloc : [];
  709. );
  710. system_xtensa_embedded_info : tsysteminfo =
  711. (
  712. system : system_xtensa_embedded;
  713. name : 'Embedded';
  714. shortname : 'Embedded';
  715. flags : [tf_needs_symbol_size,tf_files_case_sensitive,tf_requires_proper_alignment,
  716. tf_smartlink_sections,tf_init_final_units_by_calls];
  717. cpu : cpu_xtensa;
  718. unit_env : '';
  719. extradefines : '';
  720. exeext : '';
  721. defext : '.def';
  722. scriptext : '.sh';
  723. smartext : '.sl';
  724. unitext : '.ppu';
  725. unitlibext : '.ppl';
  726. asmext : '.s';
  727. objext : '.o';
  728. resext : '.res';
  729. resobjext : '.or';
  730. sharedlibext : '.so';
  731. staticlibext : '.a';
  732. staticlibprefix : 'libp';
  733. sharedlibprefix : 'lib';
  734. sharedClibext : '.so';
  735. staticClibext : '.a';
  736. staticClibprefix : 'lib';
  737. sharedClibprefix : 'lib';
  738. importlibprefix : 'libimp';
  739. importlibext : '.a';
  740. Cprefix : '';
  741. newline : #10;
  742. dirsep : '/';
  743. assem : as_gas;
  744. assemextern : as_gas;
  745. link : ld_none;
  746. linkextern : ld_embedded;
  747. ar : ar_gnu_ar;
  748. res : res_none;
  749. dbg : dbg_dwarf2;
  750. script : script_unix;
  751. endian : endian_little;
  752. alignment :
  753. (
  754. procalign : 4;
  755. loopalign : 4;
  756. jumpalign : 0;
  757. jumpalignskipmax : 0;
  758. coalescealign : 0;
  759. coalescealignskipmax: 0;
  760. constalignmin : 0;
  761. constalignmax : 4;
  762. varalignmin : 0;
  763. varalignmax : 4;
  764. localalignmin : 4;
  765. localalignmax : 16;
  766. recordalignmin : 0;
  767. recordalignmax : 4;
  768. maxCrecordalign : 4
  769. );
  770. first_parm_offset : 8;
  771. stacksize : 65536;
  772. stackalign : 16;
  773. abi : abi_xtensa_call0;
  774. 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-v64:64:64-v128:64:128-a0:0:64-n32-S32';
  775. mos6502page0alloc : [];
  776. );
  777. system_z80_embedded_info : tsysteminfo =
  778. (
  779. system : system_z80_embedded;
  780. name : 'Embedded';
  781. shortname : 'Embedded';
  782. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  783. tf_smartlink_library,
  784. tf_no_objectfiles_when_smartlinking];
  785. cpu : cpu_z80;
  786. unit_env : '';
  787. extradefines : '';
  788. exeext : '';
  789. defext : '.def';
  790. scriptext : '.sh';
  791. smartext : '.sl';
  792. unitext : '.ppu';
  793. unitlibext : '.ppl';
  794. asmext : '.s';
  795. objext : '.rel';
  796. resext : '.res';
  797. resobjext : '.or';
  798. sharedlibext : '.so';
  799. staticlibext : '.a';
  800. staticlibprefix : 'libp';
  801. sharedlibprefix : 'lib';
  802. sharedClibext : '.so';
  803. staticClibext : '.a';
  804. staticClibprefix : 'lib';
  805. sharedClibprefix : 'lib';
  806. importlibprefix : 'libimp';
  807. importlibext : '.a';
  808. Cprefix : '';
  809. newline : #10;
  810. dirsep : '/';
  811. assem : as_z80_rel;
  812. assemextern : as_sdcc_sdasz80;
  813. link : ld_none;
  814. linkextern : ld_embedded;
  815. ar : ar_sdcc_sdar;
  816. res : res_none;
  817. dbg : dbg_dwarf2;
  818. script : script_unix;
  819. endian : endian_little;
  820. alignment :
  821. (
  822. procalign : 1;
  823. loopalign : 1;
  824. jumpalign : 0;
  825. jumpalignskipmax : 0;
  826. coalescealign : 0;
  827. coalescealignskipmax : 0;
  828. constalignmin : 0;
  829. constalignmax : 1;
  830. varalignmin : 0;
  831. varalignmax : 1;
  832. localalignmin : 0;
  833. localalignmax : 1;
  834. recordalignmin : 0;
  835. recordalignmax : 1;
  836. maxCrecordalign : 1
  837. );
  838. first_parm_offset : 4;
  839. stacksize : 1024;
  840. stackalign : 1;
  841. abi : abi_default;
  842. llvmdatalayout : 'todo';
  843. mos6502page0alloc : [];
  844. );
  845. system_mos6502_embedded_info : tsysteminfo =
  846. (
  847. system : system_mos6502_embedded;
  848. name : 'Embedded';
  849. shortname : 'Embedded';
  850. flags : [tf_needs_symbol_size,tf_files_case_sensitive,
  851. tf_smartlink_library,
  852. tf_no_objectfiles_when_smartlinking];
  853. cpu : cpu_mos6502;
  854. unit_env : '';
  855. extradefines : '';
  856. exeext : '';
  857. defext : '.def';
  858. scriptext : '.sh';
  859. smartext : '.sl';
  860. unitext : '.ppu';
  861. unitlibext : '.ppl';
  862. asmext : '.s';
  863. objext : '.rel';
  864. resext : '.res';
  865. resobjext : '.or';
  866. sharedlibext : '.so';
  867. staticlibext : '.a';
  868. staticlibprefix : 'libp';
  869. sharedlibprefix : 'lib';
  870. sharedClibext : '.so';
  871. staticClibext : '.a';
  872. staticClibprefix : 'lib';
  873. sharedClibprefix : 'lib';
  874. importlibprefix : 'libimp';
  875. importlibext : '.a';
  876. Cprefix : '';
  877. newline : #10;
  878. dirsep : '/';
  879. assem : as_sdcc_sdas6500;
  880. assemextern : as_sdcc_sdas6500;
  881. link : ld_none;
  882. linkextern : ld_embedded;
  883. ar : ar_sdcc_sdar;
  884. res : res_none;
  885. dbg : dbg_dwarf2;
  886. script : script_unix;
  887. endian : endian_little;
  888. alignment :
  889. (
  890. procalign : 1;
  891. loopalign : 1;
  892. jumpalign : 0;
  893. jumpalignskipmax : 0;
  894. coalescealign : 0;
  895. coalescealignskipmax : 0;
  896. constalignmin : 0;
  897. constalignmax : 1;
  898. varalignmin : 0;
  899. varalignmax : 1;
  900. localalignmin : 0;
  901. localalignmax : 1;
  902. recordalignmin : 0;
  903. recordalignmax : 1;
  904. maxCrecordalign : 1
  905. );
  906. first_parm_offset : 4;
  907. stacksize : 1024;
  908. stackalign : 1;
  909. abi : abi_default;
  910. llvmdatalayout : 'todo';
  911. mos6502page0alloc : [0..255];
  912. );
  913. system_wasm32_embedded_info : tsysteminfo =
  914. (
  915. system : system_wasm32_embedded;
  916. name : 'Embedded';
  917. shortname : 'Embedded';
  918. flags : [tf_under_development,tf_needs_symbol_size,tf_needs_symbol_type,
  919. tf_files_case_sensitive,tf_no_generic_stackcheck,
  920. tf_smartlink_sections,
  921. { avoid the creation of threadvar tables }
  922. tf_section_threadvars];
  923. cpu : cpu_wasm32;
  924. unit_env : '';
  925. extradefines : '';
  926. exeext : '.wasm';
  927. defext : '.def';
  928. scriptext : '.sh';
  929. smartext : '.sl';
  930. unitext : '.ppu';
  931. unitlibext : '.ppl';
  932. asmext : '.wat';
  933. objext : '.o';
  934. resext : '';
  935. resobjext : '.o';
  936. sharedlibext : ''; // keep it empty! The sharedlibext drives the export module name
  937. // if this is populated, then the name should be cleared when generating import
  938. staticlibext : '.a';
  939. staticlibprefix : '';
  940. sharedlibprefix : '';
  941. sharedClibext : '.wasm';
  942. staticClibext : '.wasm';
  943. staticClibprefix : '';
  944. sharedClibprefix : '';
  945. importlibprefix : '';
  946. importlibext : '.wasm';
  947. Cprefix : '';
  948. newline : #10;
  949. dirsep : '/';
  950. assem : as_wasm32_wasm;
  951. assemextern : as_wasm32_llvm_mc;
  952. link : ld_none;
  953. linkextern : ld_embedded;
  954. ar : ar_none;
  955. res : res_none;
  956. dbg : dbg_dwarf2;
  957. script : script_unix;
  958. endian : endian_little;
  959. alignment :
  960. (
  961. procalign : 0;
  962. loopalign : 0;
  963. jumpalign : 0;
  964. jumpalignskipmax : 0;
  965. coalescealign : 0;
  966. coalescealignskipmax: 0;
  967. constalignmin : 4;
  968. constalignmax : 16;
  969. varalignmin : 4;
  970. varalignmax : 16;
  971. localalignmin : 4;
  972. localalignmax : 16;
  973. recordalignmin : 0;
  974. recordalignmax : 16;
  975. maxCrecordalign : 16
  976. );
  977. first_parm_offset : 0;
  978. stacksize : 65536;
  979. stackalign : 16;
  980. abi : abi_default;
  981. llvmdatalayout : 'todo';
  982. mos6502page0alloc : [];
  983. );
  984. implementation
  985. initialization
  986. {$ifdef cpuaarch64}
  987. {$ifdef embedded}
  988. set_source_info(system_aarch64_embedded_info);
  989. {$endif embedded}
  990. {$endif cpuaarch64}
  991. {$ifdef CPUARM}
  992. {$ifdef embedded}
  993. set_source_info(system_arm_embedded_info);
  994. {$endif embedded}
  995. {$endif CPUARM}
  996. {$ifdef CPUAVR}
  997. {$ifdef embedded}
  998. set_source_info(system_avr_embedded_info);
  999. {$endif embedded}
  1000. {$endif CPUAVR}
  1001. {$ifdef CPUMIPSEL}
  1002. {$ifdef embedded}
  1003. set_source_info(system_mipsel_embedded_info);
  1004. {$endif embedded}
  1005. {$endif CPUMIPSEL}
  1006. {$ifdef CPUI386}
  1007. {$ifdef embedded}
  1008. set_source_info(system_i386_embedded_info);
  1009. {$endif embedded}
  1010. {$endif CPUI386}
  1011. {$ifdef CPUX86_64}
  1012. {$ifdef embedded}
  1013. set_source_info(system_x86_64_embedded_info);
  1014. {$endif embedded}
  1015. {$endif CPUX86_64}
  1016. {$ifdef cpu8086}
  1017. {$ifdef embedded}
  1018. set_source_info(system_i8086_embedded_info);
  1019. {$endif embedded}
  1020. {$endif cpu8086}
  1021. {$ifdef cpum68k}
  1022. {$ifdef embedded}
  1023. set_source_info(system_m68k_embedded_info);
  1024. {$endif embedded}
  1025. {$endif cpum68k}
  1026. {$ifdef cpuriscv32}
  1027. {$ifdef embedded}
  1028. set_source_info(system_riscv32_embedded_info);
  1029. {$endif embedded}
  1030. {$endif cpuriscv32}
  1031. {$ifdef cpuriscv64}
  1032. {$ifdef embedded}
  1033. set_source_info(system_riscv64_embedded_info);
  1034. {$endif embedded}
  1035. {$endif cpuriscv64}
  1036. {$ifdef cpuxtensa}
  1037. {$ifdef embedded}
  1038. set_source_info(system_xtensa_embedded_info);
  1039. {$endif embedded}
  1040. {$endif cpuxtensa}
  1041. {$ifdef CPUZ80}
  1042. {$ifdef embedded}
  1043. set_source_info(system_z80_embedded_info);
  1044. {$endif embedded}
  1045. {$endif CPUZ80}
  1046. {$ifdef CPUMOS6502}
  1047. {$ifdef embedded}
  1048. set_source_info(system_mos6502_embedded_info);
  1049. {$endif embedded}
  1050. {$endif CPUMOS6502}
  1051. end.