ag386int.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. {
  2. $Id$
  3. Copyright (c) 1996,97 by Florian Klaempfl
  4. This unit implements an asmoutput class for Intel syntax with Intel i386+
  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. unit ag386int;
  19. interface
  20. uses aasm,assemble;
  21. type
  22. pi386intasmlist=^ti386intasmlist;
  23. ti386intasmlist = object(tasmlist)
  24. procedure WriteTree(p:paasmoutput);virtual;
  25. procedure WriteAsmList;virtual;
  26. end;
  27. implementation
  28. uses
  29. dos,globals,systems,cobjects,i386,
  30. strings,files,verbose
  31. {$ifdef GDB}
  32. ,gdb
  33. {$endif GDB}
  34. ;
  35. const
  36. line_length = 70;
  37. extstr : array[EXT_NEAR..EXT_ABS] of String[8] =
  38. ('NEAR','FAR','PROC','BYTE','WORD','DWORD',
  39. 'CODEPTR','DATAPTR','FWORD','PWORD','QWORD','TBYTE','ABS');
  40. function double2str(d : double) : string;
  41. var
  42. hs : string;
  43. p : byte;
  44. begin
  45. str(d,hs);
  46. { nasm expects a lowercase e }
  47. p:=pos('E',hs);
  48. if p>0 then
  49. hs[p]:='e';
  50. p:=pos('+',hs);
  51. if p>0 then
  52. delete(hs,p,1);
  53. double2str:=lower(hs);
  54. end;
  55. function extended2str(e : extended) : string;
  56. var
  57. hs : string;
  58. p : byte;
  59. begin
  60. {$ifdef VER0_99_5}
  61. str(double(e),hs);
  62. {$else}
  63. str(e,hs);
  64. {$endif}
  65. { nasm expects a lowercase e }
  66. p:=pos('E',hs);
  67. if p>0 then
  68. hs[p]:='e';
  69. p:=pos('+',hs);
  70. if p>0 then
  71. delete(hs,p,1);
  72. extended2str:=lower(hs);
  73. end;
  74. function comp2str(d : bestreal) : string;
  75. type
  76. pdouble = ^double;
  77. var
  78. c : comp;
  79. dd : pdouble;
  80. begin
  81. {$ifdef TP}
  82. c:=d;
  83. {$else}
  84. c:=comp(d);
  85. {$endif}
  86. dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
  87. comp2str:=double2str(dd^);
  88. end;
  89. function getreferencestring(const ref : treference) : string;
  90. var
  91. s : string;
  92. first : boolean;
  93. begin
  94. if ref.isintvalue then
  95. s:= tostr(ref.offset)
  96. else
  97. with ref do
  98. begin
  99. first:=true;
  100. if ref.segment<>R_DEFAULT_SEG then
  101. s:=int_reg2str[segment]+':['
  102. else
  103. s:='[';
  104. if assigned(symbol) then
  105. begin
  106. s:=s+symbol^;
  107. first:=false;
  108. end;
  109. if (base<>R_NO) then
  110. begin
  111. if not(first) then
  112. s:=s+'+'
  113. else
  114. first:=false;
  115. s:=s+int_reg2str[base];
  116. end;
  117. if (index<>R_NO) then
  118. begin
  119. if not(first) then
  120. s:=s+'+'
  121. else
  122. first:=false;
  123. s:=s+int_reg2str[index];
  124. if scalefactor<>0 then
  125. s:=s+'*'+tostr(scalefactor);
  126. end;
  127. if offset<0 then
  128. s:=s+tostr(offset)
  129. else if (offset>0) then
  130. s:=s+'+'+tostr(offset);
  131. s:=s+']';
  132. end;
  133. getreferencestring:=s;
  134. end;
  135. function getopstr(t : byte;o : pointer;s : topsize; _operator: tasmop;dest : boolean) : string;
  136. var
  137. hs : string;
  138. begin
  139. case t of
  140. top_reg : getopstr:=int_reg2str[tregister(o)];
  141. top_const,
  142. top_ref : begin
  143. if t=top_const then
  144. hs := tostr(longint(o))
  145. else
  146. hs:=getreferencestring(preference(o)^);
  147. { can possibly give a range check error under tp }
  148. { if using in... }
  149. if ((_operator <> A_LGS) and (_operator <> A_LSS) and
  150. (_operator <> A_LFS) and (_operator <> A_LDS) and
  151. (_operator <> A_LES)) then
  152. Begin
  153. case s of
  154. S_B : hs:='byte ptr '+hs;
  155. S_W : hs:='word ptr '+hs;
  156. S_L : hs:='dword ptr '+hs;
  157. S_IS : hs:='word ptr '+hs;
  158. S_IL : hs:='dword ptr '+hs;
  159. S_IQ : hs:='qword ptr '+hs;
  160. S_FS : hs:='dword ptr '+hs;
  161. S_FL : hs:='qword ptr '+hs;
  162. S_FX : hs:='tbyte ptr '+hs;
  163. S_BW : if dest then
  164. hs:='word ptr '+hs
  165. else
  166. hs:='byte ptr '+hs;
  167. S_BL : if dest then
  168. hs:='dword ptr '+hs
  169. else
  170. hs:='byte ptr '+hs;
  171. S_WL : if dest then
  172. hs:='dword ptr '+hs
  173. else
  174. hs:='word ptr '+hs;
  175. end;
  176. end;
  177. getopstr:=hs;
  178. end;
  179. top_symbol : begin
  180. hs:='offset '+strpas(pchar(pcsymbol(o)^.symbol));
  181. if pcsymbol(o)^.offset>0 then
  182. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  183. else
  184. if pcsymbol(o)^.offset<0 then
  185. hs:=hs+tostr(pcsymbol(o)^.offset);
  186. getopstr:=hs;
  187. end;
  188. else
  189. internalerror(10001);
  190. end;
  191. end;
  192. function getopstr_jmp(t : byte;o : pointer) : string;
  193. var
  194. hs : string;
  195. begin
  196. case t of
  197. top_reg : getopstr_jmp:=int_reg2str[tregister(o)];
  198. top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
  199. top_const : getopstr_jmp:=tostr(longint(o));
  200. top_symbol : begin
  201. hs:=strpas(pchar(pcsymbol(o)^.symbol));
  202. if pcsymbol(o)^.offset>0 then
  203. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  204. else
  205. if pcsymbol(o)^.offset<0 then
  206. hs:=hs+tostr(pcsymbol(o)^.offset);
  207. getopstr_jmp:=hs;
  208. end;
  209. else
  210. internalerror(10001);
  211. end;
  212. end;
  213. {****************************************************************************
  214. TI386INTASMLIST
  215. ****************************************************************************}
  216. var
  217. LastSec : tsection;
  218. const
  219. ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
  220. (#9'DD'#9,#9'DW'#9,#9'DB'#9);
  221. ait_section2masmstr : array[tsection] of string[6]=
  222. ('','CODE','DATA','BSS','');
  223. Function PadTabs(p:pchar;addch:char):string;
  224. var
  225. s : string;
  226. i : longint;
  227. begin
  228. i:=strlen(p);
  229. if addch<>#0 then
  230. begin
  231. inc(i);
  232. s:=StrPas(p)+addch;
  233. end
  234. else
  235. s:=StrPas(p);
  236. if i<8 then
  237. PadTabs:=s+#9#9
  238. else
  239. PadTabs:=s+#9;
  240. end;
  241. procedure ti386intasmlist.WriteTree(p:paasmoutput);
  242. type
  243. twowords=record
  244. word1,word2:word;
  245. end;
  246. var
  247. s,
  248. prefix,
  249. suffix : string;
  250. hp : pai;
  251. counter,
  252. lines,
  253. i,j,l : longint;
  254. consttyp : tait;
  255. found,
  256. quoted : boolean;
  257. begin
  258. if not assigned(p) then
  259. exit;
  260. hp:=pai(p^.first);
  261. while assigned(hp) do
  262. begin
  263. case hp^.typ of
  264. ait_comment : Begin
  265. AsmWrite(target_asm.comment);
  266. AsmWritePChar(pai_asm_comment(hp)^.str);
  267. AsmLn;
  268. End;
  269. ait_regalloc,
  270. ait_regdealloc :;
  271. ait_section : begin
  272. if LastSec<>sec_none then
  273. AsmWriteLn('_'+ait_section2masmstr[LastSec]+#9#9'ENDS');
  274. if pai_section(hp)^.sec<>sec_none then
  275. begin
  276. AsmLn;
  277. AsmWriteLn('_'+ait_section2masmstr[pai_section(hp)^.sec]+#9#9+
  278. 'SEGMENT'#9'PARA PUBLIC USE32 '''+
  279. ait_section2masmstr[pai_section(hp)^.sec]+'''');
  280. end;
  281. LastSec:=pai_section(hp)^.sec;
  282. end;
  283. ait_align : begin
  284. { CAUSES PROBLEMS WITH THE SEGMENT DEFINITION }
  285. { SEGMENT DEFINITION SHOULD MATCH TYPE OF ALIGN }
  286. { HERE UNDER TASM! }
  287. AsmWriteLn(#9'ALIGN '+tostr(pai_align(hp)^.aligntype));
  288. end;
  289. ait_external : AsmWriteLn(#9'EXTRN'#9+StrPas(pai_external(hp)^.name)+
  290. ' :'+extstr[pai_external(hp)^.exttyp]);
  291. ait_datablock : begin
  292. if pai_datablock(hp)^.is_global then
  293. AsmWriteLn(#9'PUBLIC'#9+StrPas(pai_datablock(hp)^.name));
  294. AsmWriteLn(PadTabs(pai_datablock(hp)^.name,#0)+'DB'#9+tostr(pai_datablock(hp)^.size)+' DUP(?)');
  295. end;
  296. ait_const_32bit,
  297. ait_const_8bit,
  298. ait_const_16bit : begin
  299. AsmWrite(ait_const2str[hp^.typ]+tostr(pai_const(hp)^.value));
  300. consttyp:=hp^.typ;
  301. l:=0;
  302. repeat
  303. found:=(not (Pai(hp^.next)=nil)) and (Pai(hp^.next)^.typ=consttyp);
  304. if found then
  305. begin
  306. hp:=Pai(hp^.next);
  307. s:=','+tostr(pai_const(hp)^.value);
  308. AsmWrite(s);
  309. inc(l,length(s));
  310. end;
  311. until (not found) or (l>line_length);
  312. AsmLn;
  313. end;
  314. ait_const_symbol : begin
  315. AsmWrite(#9#9+'DD '#9'offset ');
  316. AsmWritePChar(pchar(pai_const(hp)^.value));
  317. AsmLn;
  318. end;
  319. ait_const_symbol_offset : begin
  320. AsmWrite(#9#9+'DD '#9'offset ');
  321. AsmWritePChar(pai_const_symbol_offset(hp)^.name);
  322. if pai_const_symbol_offset(hp)^.offset>0 then
  323. AsmWrite('+'+tostr(pai_const_symbol_offset(hp)^.offset))
  324. else if pai_const_symbol_offset(hp)^.offset<0 then
  325. AsmWrite(tostr(pai_const_symbol_offset(hp)^.offset));
  326. AsmLn;
  327. end;
  328. ait_real_32bit : AsmWriteLn(#9#9'DD'#9+double2str(pai_single(hp)^.value));
  329. ait_real_64bit : AsmWriteLn(#9#9'DQ'#9+double2str(pai_double(hp)^.value));
  330. ait_real_extended : AsmWriteLn(#9#9'DT'#9+extended2str(pai_extended(hp)^.value));
  331. ait_comp : AsmWriteLn(#9#9'DQ'#9+comp2str(pai_extended(hp)^.value));
  332. ait_string : begin
  333. counter := 0;
  334. lines := pai_string(hp)^.len div line_length;
  335. { separate lines in different parts }
  336. if pai_string(hp)^.len > 0 then
  337. Begin
  338. for j := 0 to lines-1 do
  339. begin
  340. AsmWrite(#9#9'DB'#9);
  341. quoted:=false;
  342. for i:=counter to counter+line_length do
  343. begin
  344. { it is an ascii character. }
  345. if (ord(pai_string(hp)^.str[i])>31) and
  346. (ord(pai_string(hp)^.str[i])<128) and
  347. (pai_string(hp)^.str[i]<>'"') then
  348. begin
  349. if not(quoted) then
  350. begin
  351. if i>counter then
  352. AsmWrite(',');
  353. AsmWrite('"');
  354. end;
  355. AsmWrite(pai_string(hp)^.str[i]);
  356. quoted:=true;
  357. end { if > 31 and < 128 and ord('"') }
  358. else
  359. begin
  360. if quoted then
  361. AsmWrite('"');
  362. if i>counter then
  363. AsmWrite(',');
  364. quoted:=false;
  365. AsmWrite(tostr(ord(pai_string(hp)^.str[i])));
  366. end;
  367. end; { end for i:=0 to... }
  368. if quoted then AsmWrite('"');
  369. AsmWrite(target_os.newline);
  370. counter := counter+line_length;
  371. end; { end for j:=0 ... }
  372. { do last line of lines }
  373. AsmWrite(#9#9'DB'#9);
  374. quoted:=false;
  375. for i:=counter to pai_string(hp)^.len-1 do
  376. begin
  377. { it is an ascii character. }
  378. if (ord(pai_string(hp)^.str[i])>31) and
  379. (ord(pai_string(hp)^.str[i])<128) and
  380. (pai_string(hp)^.str[i]<>'"') then
  381. begin
  382. if not(quoted) then
  383. begin
  384. if i>counter then
  385. AsmWrite(',');
  386. AsmWrite('"');
  387. end;
  388. AsmWrite(pai_string(hp)^.str[i]);
  389. quoted:=true;
  390. end { if > 31 and < 128 and " }
  391. else
  392. begin
  393. if quoted then
  394. AsmWrite('"');
  395. if i>counter then
  396. AsmWrite(',');
  397. quoted:=false;
  398. AsmWrite(tostr(ord(pai_string(hp)^.str[i])));
  399. end;
  400. end; { end for i:=0 to... }
  401. if quoted then
  402. AsmWrite('"');
  403. end;
  404. AsmLn;
  405. end;
  406. ait_label : begin
  407. if pai_label(hp)^.l^.is_used then
  408. begin
  409. AsmWrite(lab2str(pai_label(hp)^.l));
  410. if (assigned(hp^.next) and not(pai(hp^.next)^.typ in
  411. [ait_const_32bit,ait_const_16bit,ait_const_8bit,
  412. ait_const_symbol,ait_const_symbol_offset,
  413. ait_real_32bit,ait_real_64bit,ait_real_extended,ait_string])) then
  414. AsmWriteLn(':');
  415. end;
  416. end;
  417. ait_direct : begin
  418. AsmWritePChar(pai_direct(hp)^.str);
  419. AsmLn;
  420. end;
  421. ait_labeled_instruction : AsmWriteLn(#9#9+int_op2str[pai_labeled(hp)^._operator]+#9+lab2str(pai_labeled(hp)^.lab));
  422. ait_symbol : begin
  423. if pai_symbol(hp)^.is_global then
  424. AsmWriteLn(#9'PUBLIC'#9+StrPas(pai_symbol(hp)^.name));
  425. AsmWritePChar(pai_symbol(hp)^.name);
  426. if assigned(hp^.next) and not(pai(hp^.next)^.typ in
  427. [ait_const_32bit,ait_const_16bit,ait_const_8bit,
  428. ait_const_symbol,ait_const_symbol_offset,
  429. ait_real_64bit,ait_real_extended,ait_string]) then
  430. AsmWriteLn(':')
  431. end;
  432. ait_instruction : begin
  433. suffix:='';
  434. prefix:= '';
  435. { added prefix instructions, must be on same line as opcode }
  436. if (pai386(hp)^.op1t = top_none) and
  437. ((pai386(hp)^._operator = A_REP) or
  438. (pai386(hp)^._operator = A_LOCK) or
  439. (pai386(hp)^._operator = A_REPE) or
  440. (pai386(hp)^._operator = A_REPNE)) then
  441. Begin
  442. prefix:=int_op2str[pai386(hp)^._operator]+#9;
  443. hp:=Pai(hp^.next);
  444. { this is theorically impossible... }
  445. if hp=nil then
  446. begin
  447. s:=#9#9+prefix;
  448. AsmWriteLn(s);
  449. break;
  450. end;
  451. end
  452. else
  453. prefix:= '';
  454. if pai386(hp)^.op1t<>top_none then
  455. begin
  456. if pai386(hp)^._operator in [A_CALL] then
  457. begin
  458. { with tasm call near ptr [edi+12] does not
  459. work but call near [edi+12] works ?? (PM)
  460. It works with call dword ptr [], but you
  461. need /m2 (2 passes) with tasm (PFV)
  462. }
  463. { if pai386(hp)^.op1t=top_ref then
  464. s:='near '+getopstr_jmp(pai386(hp)^.op1t,pai386(hp)^.op1)
  465. else
  466. s:='near ptr '+getopstr_jmp(pai386(hp)^.op1t,pai386(hp)^.op1);}
  467. s:='dword ptr '+getopstr_jmp(pai386(hp)^.op1t,pai386(hp)^.op1);
  468. end
  469. else
  470. begin
  471. s:=getopstr(pai386(hp)^.op1t,pai386(hp)^.op1,pai386(hp)^.size,pai386(hp)^._operator,false);
  472. if pai386(hp)^.op3t<>top_none then
  473. begin
  474. if pai386(hp)^.op2t<>top_none then
  475. s:=getopstr(pai386(hp)^.op2t,pointer(longint(twowords(pai386(hp)^.op2).word1)),
  476. pai386(hp)^.size,pai386(hp)^._operator,true)+','+s;
  477. s:=getopstr(pai386(hp)^.op3t,pointer(longint(twowords(pai386(hp)^.op2).word2)),
  478. pai386(hp)^.size,pai386(hp)^._operator,false)+','+s;
  479. end
  480. else
  481. if pai386(hp)^.op2t<>top_none then
  482. s:=getopstr(pai386(hp)^.op2t,pai386(hp)^.op2,pai386(hp)^.size,
  483. pai386(hp)^._operator,true)+','+s;
  484. end;
  485. s:=#9+s;
  486. end
  487. else
  488. begin
  489. { check if string instruction }
  490. { long form, otherwise may give range check errors }
  491. { in turbo pascal... }
  492. if ((pai386(hp)^._operator = A_CMPS) or
  493. (pai386(hp)^._operator = A_INS) or
  494. (pai386(hp)^._operator = A_OUTS) or
  495. (pai386(hp)^._operator = A_SCAS) or
  496. (pai386(hp)^._operator = A_STOS) or
  497. (pai386(hp)^._operator = A_MOVS) or
  498. (pai386(hp)^._operator = A_LODS) or
  499. (pai386(hp)^._operator = A_XLAT)) then
  500. Begin
  501. case pai386(hp)^.size of
  502. S_B: suffix:='b';
  503. S_W: suffix:='w';
  504. S_L: suffix:='d';
  505. else
  506. Message(assem_f_invalid_suffix_intel);
  507. end;
  508. end;
  509. s:='';
  510. end;
  511. AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^._operator]+suffix+s);
  512. end;
  513. {$ifdef GDB}
  514. ait_stabn,
  515. ait_stabs,
  516. ait_force_line,
  517. ait_stab_function_name : ;
  518. {$endif GDB}
  519. ait_marker: ;
  520. else
  521. internalerror(10000);
  522. end;
  523. hp:=pai(hp^.next);
  524. end;
  525. end;
  526. procedure ti386intasmlist.WriteAsmList;
  527. begin
  528. {$ifdef EXTDEBUG}
  529. if assigned(current_module^.mainsource) then
  530. comment(v_info,'Start writing intel-styled assembler output for '+current_module^.mainsource^);
  531. {$endif}
  532. LastSec:=sec_none;
  533. AsmWriteLn(#9'.386p');
  534. AsmWriteLn(#9'LOCALS '+target_asm.labelprefix);
  535. AsmWriteLn('DGROUP'#9'GROUP'#9'_BSS,_DATA');
  536. AsmWriteLn(#9'ASSUME'#9'CS:_CODE,ES:DGROUP,DS:DGROUP,SS:DGROUP');
  537. AsmLn;
  538. countlabelref:=false;
  539. WriteTree(externals);
  540. { INTEL ASM doesn't support stabs
  541. WriteTree(debuglist);}
  542. WriteTree(codesegment);
  543. WriteTree(datasegment);
  544. WriteTree(consts);
  545. WriteTree(rttilist);
  546. WriteTree(bsssegment);
  547. countlabelref:=true;
  548. AsmWriteLn(#9'END');
  549. AsmLn;
  550. {$ifdef EXTDEBUG}
  551. if assigned(current_module^.mainsource) then
  552. comment(v_info,'Done writing intel-styled assembler output for '+current_module^.mainsource^);
  553. {$endif EXTDEBUG}
  554. end;
  555. end.
  556. {
  557. $Log$
  558. Revision 1.20 1998-11-17 00:26:09 peter
  559. * fixed for $H+
  560. Revision 1.19 1998/11/16 12:38:05 jonas
  561. + readded ait_marker support
  562. Revision 1.18 1998/11/12 11:19:33 pierre
  563. * fix for first line of function break
  564. Revision 1.17 1998/10/12 12:20:40 pierre
  565. + added tai_const_symbol_offset
  566. for r : pointer = @var.field;
  567. * better message for different arg names on implementation
  568. of function
  569. Revision 1.16 1998/10/06 17:16:33 pierre
  570. * some memory leaks fixed (thanks to Peter for heaptrc !)
  571. Revision 1.15 1998/10/01 20:19:06 jonas
  572. + ait_marker support
  573. Revision 1.14 1998/09/20 17:11:21 jonas
  574. * released REGALLOC
  575. Revision 1.13 1998/08/10 15:49:38 peter
  576. * small fixes for 0.99.5
  577. Revision 1.12 1998/08/08 10:19:17 florian
  578. * small fixes to write the extended type correct
  579. Revision 1.11 1998/06/05 17:46:02 peter
  580. * tp doesn't like comp() typecast
  581. Revision 1.10 1998/05/25 17:11:36 pierre
  582. * firstpasscount bug fixed
  583. now all is already set correctly the first time
  584. under EXTDEBUG try -gp to skip all other firstpasses
  585. it works !!
  586. * small bug fixes
  587. - for smallsets with -dTESTSMALLSET
  588. - some warnings removed (by correcting code !)
  589. Revision 1.9 1998/05/23 01:20:55 peter
  590. + aktasmmode, aktoptprocessor, aktoutputformat
  591. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  592. + $LIBNAME to set the library name where the unit will be put in
  593. * splitted cgi386 a bit (codeseg to large for bp7)
  594. * nasm, tasm works again. nasm moved to ag386nsm.pas
  595. Revision 1.8 1998/05/06 18:36:53 peter
  596. * tai_section extended with code,data,bss sections and enumerated type
  597. * ident 'compiled by FPC' moved to pmodules
  598. * small fix for smartlink
  599. Revision 1.7 1998/05/06 08:38:32 pierre
  600. * better position info with UseTokenInfo
  601. UseTokenInfo greatly simplified
  602. + added check for changed tree after first time firstpass
  603. (if we could remove all the cases were it happen
  604. we could skip all firstpass if firstpasscount > 1)
  605. Only with ExtDebug
  606. Revision 1.6 1998/05/04 17:54:24 peter
  607. + smartlinking works (only case jumptable left todo)
  608. * redesign of systems.pas to support assemblers and linkers
  609. + Unitname is now also in the PPU-file, increased version to 14
  610. Revision 1.5 1998/05/01 07:43:52 florian
  611. + basics for rtti implemented
  612. + switch $m (generate rtti for published sections)
  613. Revision 1.4 1998/04/29 10:33:41 pierre
  614. + added some code for ansistring (not complete nor working yet)
  615. * corrected operator overloading
  616. * corrected nasm output
  617. + started inline procedures
  618. + added starstarn : use ** for exponentiation (^ gave problems)
  619. + started UseTokenInfo cond to get accurate positions
  620. Revision 1.3 1998/04/08 16:58:01 pierre
  621. * several bugfixes
  622. ADD ADC and AND are also sign extended
  623. nasm output OK (program still crashes at end
  624. and creates wrong assembler files !!)
  625. procsym types sym in tdef removed !!
  626. Revision 1.2 1998/04/08 11:34:17 peter
  627. * nasm works (linux only tested)
  628. }