ag386int.pas 27 KB

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