assemble.pas 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. {
  2. $Id$
  3. Copyright (c) 1998 by the FPC development team
  4. This unit handles the assemblerfile write and assembler calls of FPC
  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. unit assemble;
  18. interface
  19. uses
  20. {$ifdef Delphi}
  21. dmisc,
  22. {$endif Delphi}
  23. dos,cobjects,globtype,globals,aasm;
  24. const
  25. {$ifdef tp}
  26. AsmOutSize=1024;
  27. {$else}
  28. AsmOutSize=32768;
  29. {$endif}
  30. type
  31. PAsmList=^TAsmList;
  32. TAsmList=object
  33. {filenames}
  34. path : pathstr;
  35. name : namestr;
  36. asmfile, { current .s and .o file }
  37. objfile,
  38. as_bin : string;
  39. SmartAsm : boolean;
  40. IsEndFile : boolean; { special 'end' file for import dir ? }
  41. {outfile}
  42. AsmSize,
  43. AsmStartSize,
  44. outcnt : longint;
  45. outbuf : array[0..AsmOutSize-1] of char;
  46. outfile : file;
  47. Constructor Init(smart:boolean);
  48. Destructor Done;
  49. Function FindAssembler:string;
  50. Function CallAssembler(const command,para:string):Boolean;
  51. Function DoAssemble:boolean;
  52. Procedure RemoveAsm;
  53. procedure NextSmartName;
  54. Procedure AsmFlush;
  55. Procedure AsmClear;
  56. Procedure AsmWrite(const s:string);
  57. Procedure AsmWritePChar(p:pchar);
  58. Procedure AsmWriteLn(const s:string);
  59. Procedure AsmLn;
  60. procedure AsmCreate;
  61. procedure AsmClose;
  62. procedure Synchronize;
  63. procedure WriteTree(p:paasmoutput);virtual;
  64. procedure WriteAsmList;virtual;
  65. end;
  66. Procedure GenerateAsm(smart:boolean);
  67. Procedure OnlyAsm;
  68. var
  69. SmartLinkFilesCnt : longint;
  70. Implementation
  71. uses
  72. script,files,systems,verbose
  73. {$ifdef linux}
  74. ,linux
  75. {$endif}
  76. ,strings
  77. {$ifdef i386}
  78. {$ifndef NoAg386Bin}
  79. ,ag386bin
  80. {$endif}
  81. {$ifndef NoAg386Att}
  82. ,ag386att
  83. {$endif NoAg386Att}
  84. {$ifndef NoAg386Nsm}
  85. ,ag386nsm
  86. {$endif NoAg386Nsm}
  87. {$ifndef NoAg386Int}
  88. ,ag386int
  89. {$endif NoAg386Int}
  90. {$ifdef Ag386Cof}
  91. ,ag386cof
  92. {$endif Ag386Cof}
  93. {$endif}
  94. {$ifdef m68k}
  95. {$ifndef NoAg68kGas}
  96. ,ag68kgas
  97. {$endif NoAg68kGas}
  98. {$ifndef NoAg68kMot}
  99. ,ag68kmot
  100. {$endif NoAg68kMot}
  101. {$ifndef NoAg68kMit}
  102. ,ag68kmit
  103. {$endif NoAg68kMit}
  104. {$ifndef NoAg68kMpw}
  105. ,ag68kmpw
  106. {$endif NoAg68kMpw}
  107. {$endif}
  108. ;
  109. {*****************************************************************************
  110. TAsmList
  111. *****************************************************************************}
  112. Function DoPipe:boolean;
  113. begin
  114. DoPipe:=(cs_asm_pipe in aktglobalswitches) and
  115. not(cs_asm_leave in aktglobalswitches)
  116. {$ifdef i386}
  117. and (aktoutputformat=as_i386_as)
  118. {$endif i386}
  119. {$ifdef m68k}
  120. and (aktoutputformat=as_m68k_as);
  121. {$endif m68k}
  122. end;
  123. const
  124. lastas : byte=255;
  125. var
  126. LastASBin : string;
  127. Function TAsmList.FindAssembler:string;
  128. var
  129. asfound : boolean;
  130. begin
  131. if lastas<>ord(target_asm.id) then
  132. begin
  133. lastas:=ord(target_asm.id);
  134. { is an assembler passed ? }
  135. if utilsdirectory<>'' then
  136. LastASBin:=Search(target_asm.asmbin+source_os.exeext,utilsdirectory,asfound)+
  137. target_asm.asmbin+source_os.exeext;
  138. if LastASBin='' then
  139. LastASBin:=FindExe(target_asm.asmbin,asfound);
  140. if (not asfound) and not(cs_asm_extern in aktglobalswitches) then
  141. begin
  142. Message1(exec_w_assembler_not_found,LastASBin);
  143. aktglobalswitches:=aktglobalswitches+[cs_asm_extern];
  144. end;
  145. if asfound then
  146. Message1(exec_t_using_assembler,LastASBin);
  147. end;
  148. FindAssembler:=LastASBin;
  149. end;
  150. Function TAsmList.CallAssembler(const command,para:string):Boolean;
  151. begin
  152. callassembler:=true;
  153. if not(cs_asm_extern in aktglobalswitches) then
  154. begin
  155. swapvectors;
  156. exec(command,para);
  157. swapvectors;
  158. if (doserror<>0) then
  159. begin
  160. Message1(exec_w_cant_call_assembler,tostr(doserror));
  161. aktglobalswitches:=aktglobalswitches+[cs_asm_extern];
  162. callassembler:=false;
  163. end
  164. else
  165. if (dosexitcode<>0) then
  166. begin
  167. Message1(exec_w_error_while_assembling,tostr(dosexitcode));
  168. callassembler:=false;
  169. end;
  170. end
  171. else
  172. AsmRes.AddAsmCommand(command,para,name);
  173. end;
  174. procedure TAsmList.RemoveAsm;
  175. var
  176. g : file;
  177. i : word;
  178. begin
  179. if cs_asm_leave in aktglobalswitches then
  180. exit;
  181. if cs_asm_extern in aktglobalswitches then
  182. AsmRes.AddDeleteCommand(AsmFile)
  183. else
  184. begin
  185. assign(g,AsmFile);
  186. {$I-}
  187. erase(g);
  188. {$I+}
  189. i:=ioresult;
  190. end;
  191. end;
  192. Function TAsmList.DoAssemble:boolean;
  193. var
  194. s : string;
  195. begin
  196. DoAssemble:=true;
  197. if DoPipe then
  198. exit;
  199. if (SmartLinkFilesCnt<=1) and not(cs_asm_extern in aktglobalswitches) then
  200. Message1(exec_i_assembling,name);
  201. s:=target_asm.asmcmd;
  202. Replace(s,'$ASM',AsmFile);
  203. Replace(s,'$OBJ',ObjFile);
  204. if CallAssembler(FindAssembler,s) then
  205. RemoveAsm
  206. else
  207. begin
  208. DoAssemble:=false;
  209. GenerateError;
  210. end;
  211. end;
  212. procedure TAsmList.NextSmartName;
  213. var
  214. s : string;
  215. begin
  216. inc(SmartLinkFilesCnt);
  217. if SmartLinkFilesCnt>999999 then
  218. Message(asmw_f_too_many_asm_files);
  219. if IsEndFile then
  220. begin
  221. s:=current_module^.asmprefix^+'e';
  222. IsEndFile:=false;
  223. end
  224. else
  225. s:=current_module^.asmprefix^;
  226. AsmFile:=Path+FixFileName(s+tostr(SmartLinkFilesCnt)+target_info.asmext);
  227. ObjFile:=Path+FixFileName(s+tostr(SmartLinkFilesCnt)+target_info.objext);
  228. end;
  229. {*****************************************************************************
  230. TAsmList AsmFile Writing
  231. *****************************************************************************}
  232. Procedure TAsmList.AsmFlush;
  233. begin
  234. if outcnt>0 then
  235. begin
  236. BlockWrite(outfile,outbuf,outcnt);
  237. outcnt:=0;
  238. end;
  239. end;
  240. Procedure TAsmList.AsmClear;
  241. begin
  242. outcnt:=0;
  243. end;
  244. Procedure TAsmList.AsmWrite(const s:string);
  245. begin
  246. if OutCnt+length(s)>=AsmOutSize then
  247. AsmFlush;
  248. Move(s[1],OutBuf[OutCnt],length(s));
  249. inc(OutCnt,length(s));
  250. inc(AsmSize,length(s));
  251. end;
  252. Procedure TAsmList.AsmWriteLn(const s:string);
  253. begin
  254. AsmWrite(s);
  255. AsmLn;
  256. end;
  257. Procedure TAsmList.AsmWritePChar(p:pchar);
  258. var
  259. i,j : longint;
  260. begin
  261. i:=StrLen(p);
  262. j:=i;
  263. while j>0 do
  264. begin
  265. i:=min(j,AsmOutSize);
  266. if OutCnt+i>=AsmOutSize then
  267. AsmFlush;
  268. Move(p[0],OutBuf[OutCnt],i);
  269. inc(OutCnt,i);
  270. inc(AsmSize,i);
  271. dec(j,i);
  272. p:=pchar(@p[i]);
  273. end;
  274. end;
  275. Procedure TAsmList.AsmLn;
  276. begin
  277. if OutCnt>=AsmOutSize-2 then
  278. AsmFlush;
  279. OutBuf[OutCnt]:=target_os.newline[1];
  280. inc(OutCnt);
  281. inc(AsmSize);
  282. if length(target_os.newline)>1 then
  283. begin
  284. OutBuf[OutCnt]:=target_os.newline[2];
  285. inc(OutCnt);
  286. inc(AsmSize);
  287. end;
  288. end;
  289. procedure TAsmList.AsmCreate;
  290. begin
  291. if SmartAsm then
  292. NextSmartName;
  293. {$ifdef linux}
  294. if DoPipe then
  295. begin
  296. Message1(exec_i_assembling_pipe,asmfile);
  297. POpen(outfile,'as -o '+objfile,'W');
  298. end
  299. else
  300. {$endif}
  301. begin
  302. Assign(outfile,asmfile);
  303. {$I-}
  304. Rewrite(outfile,1);
  305. {$I+}
  306. if ioresult<>0 then
  307. Message1(exec_d_cant_create_asmfile,asmfile);
  308. end;
  309. outcnt:=0;
  310. AsmSize:=0;
  311. AsmStartSize:=0;
  312. end;
  313. procedure TAsmList.AsmClose;
  314. var
  315. f : file;
  316. l : longint;
  317. begin
  318. AsmFlush;
  319. {$ifdef linux}
  320. if DoPipe then
  321. Close(outfile)
  322. else
  323. {$endif}
  324. begin
  325. {Touch Assembler time to ppu time is there is a ppufilename}
  326. if Assigned(current_module^.ppufilename) then
  327. begin
  328. Assign(f,current_module^.ppufilename^);
  329. {$I-}
  330. reset(f,1);
  331. {$I+}
  332. if ioresult=0 then
  333. begin
  334. getftime(f,l);
  335. close(f);
  336. reset(outfile,1);
  337. setftime(outfile,l);
  338. end;
  339. end;
  340. close(outfile);
  341. end;
  342. end;
  343. {Touch Assembler and object time to ppu time is there is a ppufilename}
  344. procedure TAsmList.Synchronize;
  345. begin
  346. {Touch Assembler time to ppu time is there is a ppufilename}
  347. if Assigned(current_module^.ppufilename) then
  348. begin
  349. SynchronizeFileTime(current_module^.ppufilename^,asmfile);
  350. if not(cs_asm_extern in aktglobalswitches) then
  351. SynchronizeFileTime(current_module^.ppufilename^,objfile);
  352. end;
  353. end;
  354. procedure TAsmList.WriteTree(p:paasmoutput);
  355. begin
  356. end;
  357. procedure TAsmList.WriteAsmList;
  358. begin
  359. end;
  360. Constructor TAsmList.Init(smart:boolean);
  361. var
  362. i : word;
  363. begin
  364. { load start values }
  365. asmfile:=current_module^.asmfilename^;
  366. objfile:=current_module^.objfilename^;
  367. name:=FixFileName(current_module^.modulename^);
  368. OutCnt:=0;
  369. SmartLinkFilesCnt:=0;
  370. IsEndFile:=false;
  371. SmartAsm:=smart;
  372. { Which path will be used ? }
  373. if SmartAsm then
  374. begin
  375. path:=current_module^.path^+FixFileName(current_module^.modulename^)+target_info.smartext;
  376. {$I-}
  377. mkdir(path);
  378. {$I+}
  379. i:=ioresult;
  380. path:=FixPath(path,false);
  381. end
  382. else
  383. path:=current_module^.path^;
  384. end;
  385. Destructor TAsmList.Done;
  386. begin
  387. end;
  388. {*****************************************************************************
  389. Generate Assembler Files Main Procedure
  390. *****************************************************************************}
  391. Procedure GenerateAsm(smart:boolean);
  392. var
  393. a : PAsmList;
  394. {$ifdef i386}
  395. {$ifndef NoAg386Bin}
  396. b : Pi386binasmlist;
  397. {$endif}
  398. {$endif}
  399. begin
  400. case aktoutputformat of
  401. as_none : ;
  402. {$ifdef i386}
  403. {$ifndef NoAg386Bin}
  404. as_i386_dbg,
  405. as_i386_coff,
  406. as_i386_pecoff :
  407. begin
  408. case aktoutputformat of
  409. as_i386_dbg :
  410. b:=new(pi386binasmlist,Init(og_dbg,smart));
  411. as_i386_coff :
  412. b:=new(pi386binasmlist,Init(og_coff,smart));
  413. as_i386_pecoff :
  414. b:=new(pi386binasmlist,Init(og_pecoff,smart));
  415. end;
  416. b^.WriteBin;
  417. dispose(b,done);
  418. if assigned(current_module^.ppufilename) then
  419. begin
  420. if smart then
  421. SynchronizeFileTime(current_module^.ppufilename^,current_module^.staticlibfilename^)
  422. else
  423. SynchronizeFileTime(current_module^.ppufilename^,current_module^.objfilename^);
  424. end;
  425. exit;
  426. end;
  427. {$endif NoAg386Bin}
  428. {$ifndef NoAg386Att}
  429. as_i386_as,
  430. as_i386_as_aout,
  431. as_i386_asw :
  432. a:=new(pi386attasmlist,Init(smart));
  433. {$endif NoAg386Att}
  434. {$ifndef NoAg386Nsm}
  435. as_i386_nasmcoff,
  436. as_i386_nasmelf,
  437. as_i386_nasmobj :
  438. a:=new(pi386nasmasmlist,Init(smart));
  439. {$endif NoAg386Nsm}
  440. {$ifndef NoAg386Int}
  441. as_i386_tasm :
  442. a:=new(pi386intasmlist,Init(smart));
  443. {$endif NoAg386Int}
  444. {$endif}
  445. {$ifdef m68k}
  446. {$ifndef NoAg68kGas}
  447. as_m68k_as,
  448. as_m68k_gas :
  449. a:=new(pm68kgasasmlist,Init(smart));
  450. {$endif NoAg86KGas}
  451. {$ifndef NoAg68kMot}
  452. as_m68k_mot :
  453. a:=new(pm68kmotasmlist,Init(smart));
  454. {$endif NoAg86kMot}
  455. {$ifndef NoAg68kMit}
  456. as_m68k_mit :
  457. a:=new(pm68kmitasmlist,Init(smart));
  458. {$endif NoAg86KMot}
  459. {$ifndef NoAg68kMpw}
  460. as_m68k_mpw :
  461. a:=new(pm68kmpwasmlist,Init(smart));
  462. {$endif NoAg68kMpw}
  463. {$endif}
  464. else
  465. {$ifdef TP}
  466. exit;
  467. {$else}
  468. Message(asmw_f_assembler_output_not_supported);
  469. {$endif}
  470. end;
  471. a^.AsmCreate;
  472. a^.WriteAsmList;
  473. a^.AsmClose;
  474. a^.DoAssemble;
  475. a^.synchronize;
  476. dispose(a,Done);
  477. end;
  478. Procedure OnlyAsm;
  479. var
  480. a : PAsmList;
  481. begin
  482. a:=new(pasmlist,Init(false));
  483. a^.DoAssemble;
  484. dispose(a,Done);
  485. end;
  486. end.
  487. {
  488. $Log$
  489. Revision 1.50 1999-07-03 00:27:05 peter
  490. * better smartlinking support
  491. Revision 1.49 1999/06/28 16:02:29 peter
  492. * merged
  493. Revision 1.48.2.1 1999/06/28 15:55:39 peter
  494. * also search path if not found in utilsdirectory
  495. Revision 1.48 1999/05/27 19:44:03 peter
  496. * removed oldasm
  497. * plabel -> pasmlabel
  498. * -a switches to source writing automaticly
  499. * assembler readers OOPed
  500. * asmsymbol automaticly external
  501. * jumptables and other label fixes for asm readers
  502. Revision 1.47 1999/05/13 21:59:19 peter
  503. * removed oldppu code
  504. * warning if objpas is loaded from uses
  505. * first things for new deref writing
  506. Revision 1.46 1999/05/05 22:21:48 peter
  507. * updated messages
  508. Revision 1.45 1999/05/04 21:44:33 florian
  509. * changes to compile it with Delphi 4.0
  510. Revision 1.44 1999/05/02 23:28:42 peter
  511. * don't include ag386bin for oldasm
  512. Revision 1.43 1999/05/02 22:41:51 peter
  513. * moved section names to systems
  514. * fixed nasm,intel writer
  515. Revision 1.42 1999/05/01 13:24:00 peter
  516. * merged nasm compiler
  517. * old asm moved to oldasm/
  518. Revision 1.41 1999/03/24 23:16:42 peter
  519. * fixed bugs 212,222,225,227,229,231,233
  520. Revision 1.40 1999/03/18 20:30:44 peter
  521. + .a writer
  522. Revision 1.39 1999/03/01 15:43:48 peter
  523. * synchronize also the objfile for ag386bin
  524. Revision 1.38 1999/02/26 00:48:15 peter
  525. * assembler writers fixed for ag386bin
  526. Revision 1.37 1999/02/24 00:59:11 peter
  527. * small updates for ag386bin
  528. Revision 1.36 1999/02/22 02:15:01 peter
  529. * updates for ag386bin
  530. Revision 1.35 1999/02/17 10:16:26 peter
  531. * small fixes for the binary writer
  532. Revision 1.34 1999/01/10 15:37:52 peter
  533. * moved some tables from ra386*.pas -> i386.pas
  534. + start of coff writer
  535. * renamed asmutils unit to rautils
  536. Revision 1.33 1998/12/11 00:02:45 peter
  537. + globtype,tokens,version unit splitted from globals
  538. Revision 1.32 1998/11/06 09:46:46 pierre
  539. * assemble failure increments status errorcount again !!
  540. Revision 1.31 1998/10/26 22:23:28 peter
  541. + fixpath() has an extra option to allow a ./ as path
  542. Revision 1.30 1998/10/16 13:37:14 florian
  543. + switch -FD added to specify the path for utilities
  544. Revision 1.29 1998/10/15 16:19:42 peter
  545. * fixed asmsynchronize
  546. Revision 1.28 1998/10/14 15:56:43 pierre
  547. * all references to comp suppressed for m68k
  548. Revision 1.27 1998/10/13 16:50:01 pierre
  549. * undid some changes of Peter that made the compiler wrong
  550. for m68k (I had to reinsert some ifdefs)
  551. * removed several memory leaks under m68k
  552. * removed the meory leaks for assembler readers
  553. * cross compiling shoud work again better
  554. ( crosscompiling sysamiga works
  555. but as68k still complain about some code !)
  556. Revision 1.26 1998/10/13 13:10:11 peter
  557. * new style for m68k/i386 infos and enums
  558. Revision 1.25 1998/10/13 08:19:24 pierre
  559. + source_os is now set correctly for cross-processor compilers
  560. (tos contains all target_infos and
  561. we use CPU86 and CPU68 conditionnals to
  562. get the source operating system
  563. this only works if you do not undefine
  564. the source target !!)
  565. * several cg68k memory leaks fixed
  566. + started to change the code so that it should be possible to have
  567. a complete compiler (both for m68k and i386 !!)
  568. Revision 1.24 1998/10/08 23:28:50 peter
  569. * -vu shows unit info, -vt shows tried/used files
  570. Revision 1.23 1998/10/07 04:27:37 carl
  571. + MPW support
  572. Revision 1.22 1998/09/16 16:41:39 peter
  573. * merged fixes
  574. Revision 1.21.2.1 1998/09/16 16:11:38 peter
  575. * missing isendfile reset in .init
  576. Revision 1.21 1998/09/07 18:33:32 peter
  577. + smartlinking for win95 imports
  578. Revision 1.20 1998/09/04 17:34:20 pierre
  579. * bug with datalabel corrected
  580. + assembler errors better commented
  581. * one nested record crash removed
  582. Revision 1.19 1998/08/26 10:06:34 peter
  583. * reduce amount of asmfiles generated
  584. * no stabs are written in writefilelineinfo when debuginfo is off
  585. Revision 1.18 1998/08/21 14:08:39 pierre
  586. + TEST_FUNCRET now default (old code removed)
  587. works also for m68k (at least compiles)
  588. Revision 1.17 1998/08/17 09:17:43 peter
  589. * static/shared linking updates
  590. Revision 1.16 1998/08/14 21:56:30 peter
  591. * setting the outputfile using -o works now to create static libs
  592. Revision 1.15 1998/08/14 18:16:09 peter
  593. * return after a failed call will now add it to ppas
  594. Revision 1.14 1998/08/10 14:49:41 peter
  595. + localswitches, moduleswitches, globalswitches splitting
  596. Revision 1.13 1998/07/14 21:46:40 peter
  597. * updated messages file
  598. Revision 1.12 1998/07/08 14:58:34 daniel
  599. * First check if call to assembler is succesfull, then check it's exit code.
  600. This is more logical than first checking the exit code. For some mysterious
  601. reason this did not give problems on DOS & Linux. On OS/2 it did.
  602. Revision 1.11 1998/06/08 22:59:43 peter
  603. * smartlinking works for win32
  604. * some defines to exclude some compiler parts
  605. Revision 1.10 1998/06/04 23:51:33 peter
  606. * m68k compiles
  607. + .def file creation moved to gendef.pas so it could also be used
  608. for win32
  609. Revision 1.9 1998/05/23 01:21:01 peter
  610. + aktasmmode, aktoptprocessor, aktoutputformat
  611. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  612. + $LIBNAME to set the library name where the unit will be put in
  613. * splitted cgi386 a bit (codeseg to large for bp7)
  614. * nasm, tasm works again. nasm moved to ag386nsm.pas
  615. Revision 1.8 1998/05/11 13:07:53 peter
  616. + $ifdef NEWPPU for the new ppuformat
  617. + $define GDB not longer required
  618. * removed all warnings and stripped some log comments
  619. * no findfirst/findnext anymore to remove smartlink *.o files
  620. Revision 1.7 1998/05/07 00:17:00 peter
  621. * smartlinking for sets
  622. + consts labels are now concated/generated in hcodegen
  623. * moved some cpu code to cga and some none cpu depended code from cga
  624. to tree and hcodegen and cleanup of hcodegen
  625. * assembling .. output reduced for smartlinking ;)
  626. Revision 1.6 1998/05/04 17:54:24 peter
  627. + smartlinking works (only case jumptable left todo)
  628. * redesign of systems.pas to support assemblers and linkers
  629. + Unitname is now also in the PPU-file, increased version to 14
  630. Revision 1.5 1998/04/29 10:33:44 pierre
  631. + added some code for ansistring (not complete nor working yet)
  632. * corrected operator overloading
  633. * corrected nasm output
  634. + started inline procedures
  635. + added starstarn : use ** for exponentiation (^ gave problems)
  636. + started UseTokenInfo cond to get accurate positions
  637. Revision 1.4 1998/04/27 23:10:27 peter
  638. + new scanner
  639. * $makelib -> if smartlink
  640. * small filename fixes pmodule.setfilename
  641. * moved import from files.pas -> import.pas
  642. Revision 1.3 1998/04/10 14:41:43 peter
  643. * removed some Hints
  644. * small speed optimization for AsmLn
  645. Revision 1.2 1998/04/08 11:34:18 peter
  646. * nasm works (linux only tested)
  647. }