i_embed.pas 35 KB

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