2
0

ag386nsm.pas 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. {
  2. $Id$
  3. Copyright (c) 1996,97 by Florian Klaempfl
  4. This unit implements an asmoutput class for the Nasm assembler with
  5. Intel syntax for the i386+
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. {$ifdef TP}
  20. {$N+,E+}
  21. {$endif}
  22. unit ag386nsm;
  23. interface
  24. uses aasm,assemble;
  25. type
  26. pi386nasmasmlist=^ti386nasmasmlist;
  27. ti386nasmasmlist = object(tasmlist)
  28. procedure WriteTree(p:paasmoutput);virtual;
  29. procedure WriteAsmList;virtual;
  30. procedure WriteExternals;
  31. end;
  32. implementation
  33. uses
  34. dos,strings,
  35. globtype,globals,systems,cobjects,
  36. files,verbose
  37. ,i386base,i386asm
  38. {$ifdef GDB}
  39. ,gdb
  40. {$endif GDB}
  41. ;
  42. const
  43. line_length = 70;
  44. {$ifdef EXTTYPE}
  45. extstr : array[EXT_NEAR..EXT_ABS] of String[8] =
  46. ('NEAR','FAR','PROC','BYTE','WORD','DWORD',
  47. 'CODEPTR','DATAPTR','FWORD','PWORD','QWORD','TBYTE','ABS');
  48. {$endif}
  49. function single2str(d : single) : string;
  50. var
  51. hs : string;
  52. p : byte;
  53. begin
  54. str(d,hs);
  55. { nasm expects a lowercase e }
  56. p:=pos('E',hs);
  57. if p>0 then
  58. hs[p]:='e';
  59. p:=pos('+',hs);
  60. if p>0 then
  61. delete(hs,p,1);
  62. single2str:=lower(hs);
  63. end;
  64. function double2str(d : double) : string;
  65. var
  66. hs : string;
  67. p : byte;
  68. begin
  69. str(d,hs);
  70. { nasm expects a lowercase e }
  71. p:=pos('E',hs);
  72. if p>0 then
  73. hs[p]:='e';
  74. p:=pos('+',hs);
  75. if p>0 then
  76. delete(hs,p,1);
  77. double2str:=lower(hs);
  78. end;
  79. function extended2str(e : extended) : string;
  80. var
  81. hs : string;
  82. p : byte;
  83. begin
  84. str(e,hs);
  85. { nasm expects a lowercase e }
  86. p:=pos('E',hs);
  87. if p>0 then
  88. hs[p]:='e';
  89. p:=pos('+',hs);
  90. if p>0 then
  91. delete(hs,p,1);
  92. extended2str:=lower(hs);
  93. end;
  94. function comp2str(d : bestreal) : string;
  95. type
  96. pdouble = ^double;
  97. var
  98. c : comp;
  99. dd : pdouble;
  100. begin
  101. {$ifdef FPC}
  102. c:=comp(d);
  103. {$else}
  104. c:=d;
  105. {$endif}
  106. dd:=pdouble(@c); { this makes a bitwise copy of c into a double }
  107. comp2str:=double2str(dd^);
  108. end;
  109. function getreferencestring(const ref : treference) : string;
  110. var
  111. s : string;
  112. first : boolean;
  113. begin
  114. if ref.is_immediate then
  115. begin
  116. getreferencestring:=tostr(ref.offset);
  117. exit;
  118. end
  119. else
  120. with ref do
  121. begin
  122. first:=true;
  123. if ref.segment<>R_NO then
  124. s:='['+int_reg2str[segment]+':'
  125. else
  126. s:='[';
  127. if assigned(symbol) then
  128. begin
  129. s:=s+symbol^.name;
  130. first:=false;
  131. end;
  132. if (base<>R_NO) then
  133. begin
  134. if not(first) then
  135. s:=s+'+'
  136. else
  137. first:=false;
  138. s:=s+int_reg2str[base];
  139. end;
  140. if (index<>R_NO) then
  141. begin
  142. if not(first) then
  143. s:=s+'+'
  144. else
  145. first:=false;
  146. s:=s+int_reg2str[index];
  147. if scalefactor<>0 then
  148. s:=s+'*'+tostr(scalefactor);
  149. end;
  150. if offset<0 then
  151. s:=s+tostr(offset)
  152. else if (offset>0) then
  153. s:=s+'+'+tostr(offset);
  154. s:=s+']';
  155. end;
  156. getreferencestring:=s;
  157. end;
  158. function sizestr(s:topsize;dest:boolean):string;
  159. begin
  160. case s of
  161. S_B : sizestr:='byte ';
  162. S_W : sizestr:='word ';
  163. S_L : sizestr:='dword ';
  164. S_IS : sizestr:='word ';
  165. S_IL : sizestr:='dword ';
  166. S_IQ : sizestr:='qword ';
  167. S_FS : sizestr:='dword ';
  168. S_FL : sizestr:='qword ';
  169. S_FX : sizestr:='tword ';
  170. S_BW : if dest then
  171. sizestr:='word '
  172. else
  173. sizestr:='byte ';
  174. S_BL : if dest then
  175. sizestr:='dword '
  176. else
  177. sizestr:='byte ';
  178. S_WL : if dest then
  179. sizestr:='dword '
  180. else
  181. sizestr:='word ';
  182. end;
  183. end;
  184. function getopstr(const o:toper;s : topsize; opcode: tasmop;ops:longint;dest : boolean) : string;
  185. var
  186. hs : string;
  187. begin
  188. case o.typ of
  189. top_reg :
  190. getopstr:=int_nasmreg2str[o.reg];
  191. top_const :
  192. begin
  193. if (ops=1) and (opcode<>A_RET) then
  194. getopstr:=sizestr(s,dest)+tostr(o.val)
  195. else
  196. getopstr:=tostr(o.val);
  197. end;
  198. top_symbol :
  199. begin
  200. if assigned(o.sym) then
  201. hs:='dword '+o.sym^.name
  202. else
  203. hs:='dword ';
  204. if o.symofs>0 then
  205. hs:=hs+'+'+tostr(o.symofs)
  206. else
  207. if o.symofs<0 then
  208. hs:=hs+tostr(o.symofs)
  209. else
  210. if not(assigned(o.sym)) then
  211. hs:=hs+'0';
  212. getopstr:=hs;
  213. end;
  214. top_ref :
  215. begin
  216. hs:=getreferencestring(o.ref^);
  217. if not ((opcode = A_LEA) or (opcode = A_LGS) or
  218. (opcode = A_LSS) or (opcode = A_LFS) or
  219. (opcode = A_LES) or (opcode = A_LDS) or
  220. (opcode = A_SHR) or (opcode = A_SHL) or
  221. (opcode = A_SAR) or (opcode = A_SAL) or
  222. (opcode = A_OUT) or (opcode = A_IN)) then
  223. begin
  224. hs:=sizestr(s,dest)+hs;
  225. end;
  226. getopstr:=hs;
  227. end;
  228. else
  229. internalerror(10001);
  230. end;
  231. end;
  232. function getopstr_jmp(const o:toper) : string;
  233. var
  234. hs : string;
  235. begin
  236. case o.typ of
  237. top_reg :
  238. getopstr_jmp:=int_nasmreg2str[o.reg];
  239. top_ref :
  240. getopstr_jmp:=getreferencestring(o.ref^);
  241. top_const :
  242. getopstr_jmp:=tostr(o.val);
  243. top_symbol :
  244. begin
  245. hs:=o.sym^.name;
  246. if o.symofs>0 then
  247. hs:=hs+'+'+tostr(o.symofs)
  248. else
  249. if o.symofs<0 then
  250. hs:=hs+tostr(o.symofs);
  251. getopstr_jmp:=hs;
  252. end;
  253. else
  254. internalerror(10001);
  255. end;
  256. end;
  257. {****************************************************************************
  258. Ti386nasmasmlist
  259. ****************************************************************************}
  260. var
  261. LastSec : tsection;
  262. const
  263. ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
  264. (#9'DD'#9,#9'DW'#9,#9'DB'#9);
  265. Function PadTabs(const p:string;addch:char):string;
  266. var
  267. s : string;
  268. i : longint;
  269. begin
  270. i:=length(p);
  271. if addch<>#0 then
  272. begin
  273. inc(i);
  274. s:=p+addch;
  275. end
  276. else
  277. s:=p;
  278. if i<8 then
  279. PadTabs:=s+#9#9
  280. else
  281. PadTabs:=s+#9;
  282. end;
  283. procedure ti386nasmasmlist.WriteTree(p:paasmoutput);
  284. type
  285. twowords=record
  286. word1,word2:word;
  287. end;
  288. var
  289. s,
  290. prefix,
  291. suffix : string;
  292. hp : pai;
  293. counter,
  294. lines,
  295. i,j,l : longint;
  296. consttyp : tait;
  297. found,
  298. quoted : boolean;
  299. sep : char;
  300. begin
  301. if not assigned(p) then
  302. exit;
  303. hp:=pai(p^.first);
  304. while assigned(hp) do
  305. begin
  306. case hp^.typ of
  307. ait_comment : Begin
  308. AsmWrite(target_asm.comment);
  309. AsmWritePChar(pai_asm_comment(hp)^.str);
  310. AsmLn;
  311. End;
  312. ait_regalloc,
  313. ait_tempalloc : ;
  314. ait_section : begin
  315. if pai_section(hp)^.sec<>sec_none then
  316. begin
  317. AsmLn;
  318. AsmWriteLn('SECTION '+target_asm.secnames[pai_section(hp)^.sec]);
  319. end;
  320. LastSec:=pai_section(hp)^.sec;
  321. end;
  322. ait_align : AsmWriteLn(#9'ALIGN '+tostr(pai_align(hp)^.aligntype));
  323. ait_datablock : begin
  324. if pai_datablock(hp)^.is_global then
  325. AsmWriteLn(#9'GLOBAL '+pai_datablock(hp)^.sym^.name);
  326. AsmWriteLn(PadTabs(pai_datablock(hp)^.sym^.name,':')+'RESB'#9+tostr(pai_datablock(hp)^.size));
  327. end;
  328. ait_const_32bit,
  329. ait_const_8bit,
  330. ait_const_16bit : begin
  331. AsmWrite(ait_const2str[hp^.typ]+tostr(pai_const(hp)^.value));
  332. consttyp:=hp^.typ;
  333. l:=0;
  334. repeat
  335. found:=(not (Pai(hp^.next)=nil)) and (Pai(hp^.next)^.typ=consttyp);
  336. if found then
  337. begin
  338. hp:=Pai(hp^.next);
  339. s:=','+tostr(pai_const(hp)^.value);
  340. AsmWrite(s);
  341. inc(l,length(s));
  342. end;
  343. until (not found) or (l>line_length);
  344. AsmLn;
  345. end;
  346. ait_const_symbol : begin
  347. AsmWriteLn(#9#9'DD'#9+pai_const_symbol(hp)^.sym^.name);
  348. if pai_const_symbol(hp)^.offset>0 then
  349. AsmWrite('+'+tostr(pai_const_symbol(hp)^.offset))
  350. else if pai_const_symbol(hp)^.offset<0 then
  351. AsmWrite(tostr(pai_const_symbol(hp)^.offset));
  352. AsmLn;
  353. end;
  354. ait_const_rva : begin
  355. AsmWriteLn(#9#9'RVA'#9+pai_const_symbol(hp)^.sym^.name);
  356. end;
  357. ait_real_32bit : AsmWriteLn(#9#9'DD'#9+single2str(pai_real_32bit(hp)^.value));
  358. ait_real_64bit : AsmWriteLn(#9#9'DQ'#9+double2str(pai_real_64bit(hp)^.value));
  359. ait_real_80bit : AsmWriteLn(#9#9'DT'#9+extended2str(pai_real_80bit(hp)^.value));
  360. ait_comp_64bit : AsmWriteLn(#9#9'DQ'#9+comp2str(pai_real_80bit(hp)^.value));
  361. ait_string : begin
  362. counter := 0;
  363. lines := pai_string(hp)^.len div line_length;
  364. { separate lines in different parts }
  365. if pai_string(hp)^.len > 0 then
  366. Begin
  367. for j := 0 to lines-1 do
  368. begin
  369. AsmWrite(#9#9'DB'#9);
  370. quoted:=false;
  371. for i:=counter to counter+line_length 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 ord('"') }
  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 AsmWrite('"');
  398. AsmWrite(target_os.newline);
  399. counter := counter+line_length;
  400. end; { end for j:=0 ... }
  401. { do last line of lines }
  402. AsmWrite(#9#9'DB'#9);
  403. quoted:=false;
  404. for i:=counter to pai_string(hp)^.len-1 do
  405. begin
  406. { it is an ascii character. }
  407. if (ord(pai_string(hp)^.str[i])>31) and
  408. (ord(pai_string(hp)^.str[i])<128) and
  409. (pai_string(hp)^.str[i]<>'"') then
  410. begin
  411. if not(quoted) then
  412. begin
  413. if i>counter then
  414. AsmWrite(',');
  415. AsmWrite('"');
  416. end;
  417. AsmWrite(pai_string(hp)^.str[i]);
  418. quoted:=true;
  419. end { if > 31 and < 128 and " }
  420. else
  421. begin
  422. if quoted then
  423. AsmWrite('"');
  424. if i>counter then
  425. AsmWrite(',');
  426. quoted:=false;
  427. AsmWrite(tostr(ord(pai_string(hp)^.str[i])));
  428. end;
  429. end; { end for i:=0 to... }
  430. if quoted then
  431. AsmWrite('"');
  432. end;
  433. AsmLn;
  434. end;
  435. ait_label : begin
  436. if pai_label(hp)^.l^.is_used then
  437. AsmWriteLn(pai_label(hp)^.l^.name+':');
  438. end;
  439. ait_direct : begin
  440. AsmWritePChar(pai_direct(hp)^.str);
  441. AsmLn;
  442. end;
  443. ait_symbol : begin
  444. if pai_symbol(hp)^.is_global then
  445. AsmWriteLn(#9'GLOBAL '+pai_symbol(hp)^.sym^.name);
  446. AsmWrite(pai_symbol(hp)^.sym^.name);
  447. if assigned(hp^.next) and not(pai(hp^.next)^.typ in
  448. [ait_const_32bit,ait_const_16bit,ait_const_8bit,
  449. ait_const_symbol,ait_const_rva,
  450. ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_comp_64bit,ait_string]) then
  451. AsmWriteLn(':')
  452. end;
  453. ait_instruction : begin
  454. { We need intel order, no At&t }
  455. pai386(hp)^.SwapOperands;
  456. { Reset }
  457. suffix:='';
  458. prefix:='';
  459. s:='';
  460. if pai386(hp)^.ops<>0 then
  461. begin
  462. if is_calljmp(pai386(hp)^.opcode) then
  463. s:=#9+getopstr_jmp(pai386(hp)^.oper[0])
  464. else
  465. begin
  466. for i:=0to pai386(hp)^.ops-1 do
  467. begin
  468. if i=0 then
  469. sep:=#9
  470. else
  471. sep:=',';
  472. s:=s+sep+getopstr(pai386(hp)^.oper[i],pai386(hp)^.opsize,pai386(hp)^.opcode,pai386(hp)^.ops,(i=2));
  473. end;
  474. end;
  475. end;
  476. if pai386(hp)^.opcode=A_FWAIT then
  477. AsmWriteln(#9#9'DB'#9'09bh')
  478. else
  479. AsmWriteLn(#9#9+prefix+int_op2str[pai386(hp)^.opcode]+
  480. cond2str[pai386(hp)^.condition]+suffix+s);
  481. end;
  482. {$ifdef GDB}
  483. ait_stabn,
  484. ait_stabs,
  485. ait_force_line,
  486. ait_stab_function_name : ;
  487. {$endif GDB}
  488. ait_cut : begin
  489. { only reset buffer if nothing has changed }
  490. if AsmSize=AsmStartSize then
  491. AsmClear
  492. else
  493. begin
  494. AsmClose;
  495. DoAssemble;
  496. if pai_cut(hp)^.EndName then
  497. IsEndFile:=true;
  498. AsmCreate;
  499. end;
  500. { avoid empty files }
  501. while assigned(hp^.next) and (pai(hp^.next)^.typ in [ait_cut,ait_section,ait_comment]) do
  502. begin
  503. if pai(hp^.next)^.typ=ait_section then
  504. lastsec:=pai_section(hp^.next)^.sec;
  505. hp:=pai(hp^.next);
  506. end;
  507. if lastsec<>sec_none then
  508. AsmWriteLn('SECTION '+target_asm.secnames[lastsec]);
  509. AsmStartSize:=AsmSize;
  510. end;
  511. ait_marker : ;
  512. else
  513. internalerror(10000);
  514. end;
  515. hp:=pai(hp^.next);
  516. end;
  517. end;
  518. var
  519. currentasmlist : PAsmList;
  520. procedure writeexternal(p:pasmsymbol);{$ifndef FPC}far;{$endif}
  521. begin
  522. if p^.typ=AS_EXTERNAL then
  523. currentasmlist^.AsmWriteln('EXTERN'#9+p^.name);
  524. end;
  525. procedure ti386nasmasmlist.WriteExternals;
  526. begin
  527. currentasmlist:=@self;
  528. AsmSymbolList^.foreach({$ifndef TP}@{$endif}writeexternal);
  529. end;
  530. procedure ti386nasmasmlist.WriteAsmList;
  531. begin
  532. {$ifdef EXTDEBUG}
  533. if assigned(current_module^.mainsource) then
  534. comment(v_info,'Start writing nasm-styled assembler output for '+current_module^.mainsource^);
  535. {$endif}
  536. LastSec:=sec_none;
  537. AsmWriteLn('BITS 32');
  538. AsmLn;
  539. countlabelref:=false;
  540. WriteExternals;
  541. { Nasm doesn't support stabs
  542. WriteTree(debuglist);}
  543. WriteTree(codesegment);
  544. WriteTree(datasegment);
  545. WriteTree(consts);
  546. WriteTree(rttilist);
  547. WriteTree(bsssegment);
  548. countlabelref:=true;
  549. AsmLn;
  550. {$ifdef EXTDEBUG}
  551. if assigned(current_module^.mainsource) then
  552. comment(v_info,'Done writing nasm-styled assembler output for '+current_module^.mainsource^);
  553. {$endif EXTDEBUG}
  554. end;
  555. end.
  556. {
  557. $Log$
  558. Revision 1.43 1999-06-02 22:44:02 pierre
  559. * previous wrong log corrected
  560. Revision 1.42 1999/06/02 22:25:27 pierre
  561. * changed $ifdef FPC @ into $ifndef TP
  562. Revision 1.41 1999/06/01 14:45:44 peter
  563. * @procvar is now always needed for FPC
  564. Revision 1.40 1999/05/27 19:44:02 peter
  565. * removed oldasm
  566. * plabel -> pasmlabel
  567. * -a switches to source writing automaticly
  568. * assembler readers OOPed
  569. * asmsymbol automaticly external
  570. * jumptables and other label fixes for asm readers
  571. Revision 1.39 1999/05/23 18:41:57 florian
  572. * better error recovering in typed constants
  573. * some problems with arrays of const fixed, some problems
  574. due my previous
  575. - the location type of array constructor is now LOC_MEM
  576. - the pushing of high fixed
  577. - parameter copying fixed
  578. - zero temp. allocation removed
  579. * small problem in the assembler writers fixed:
  580. ref to nil wasn't written correctly
  581. Revision 1.38 1999/05/21 13:54:43 peter
  582. * NEWLAB for label as symbol
  583. Revision 1.37 1999/05/12 00:19:39 peter
  584. * removed R_DEFAULT_SEG
  585. * uniform float names
  586. Revision 1.36 1999/05/11 16:28:16 peter
  587. * long lines fixed
  588. Revision 1.35 1999/05/10 15:18:16 peter
  589. * fixed condition writing
  590. Revision 1.34 1999/05/08 19:52:34 peter
  591. + MessagePos() which is enhanced Message() function but also gets the
  592. position info
  593. * Removed comp warnings
  594. Revision 1.33 1999/05/07 00:08:48 pierre
  595. * AG386BIN cond -> OLDASM, only cosmetic
  596. Revision 1.32 1999/05/06 09:05:11 peter
  597. * generic write_float and str_float
  598. * fixed constant float conversions
  599. Revision 1.31 1999/05/04 21:44:32 florian
  600. * changes to compile it with Delphi 4.0
  601. Revision 1.30 1999/05/02 22:41:50 peter
  602. * moved section names to systems
  603. * fixed nasm,intel writer
  604. Revision 1.29 1999/05/01 13:23:59 peter
  605. * merged nasm compiler
  606. * old asm moved to oldasm/
  607. Revision 1.28 1999/04/17 22:17:06 pierre
  608. * ifdef USE_OP3 released (changed into ifndef NO_OP3)
  609. * SHRD and SHLD first operand (ATT syntax) can only be CL reg or immediate const
  610. Revision 1.27 1999/04/16 11:49:40 peter
  611. + tempalloc
  612. + -at to show temp alloc info in .s file
  613. Revision 1.26 1999/04/16 10:00:56 pierre
  614. + ifdef USE_OP3 code :
  615. added all missing op_... constructors for tai386 needed
  616. for SHRD,SHLD and IMUL code in assembler readers
  617. (check in tests/tbs0123.pp)
  618. Revision 1.25 1999/03/29 16:05:44 peter
  619. * optimizer working for ag386bin
  620. Revision 1.24 1999/03/10 13:25:44 pierre
  621. section order changed to get closer output from coff writer
  622. Revision 1.23 1999/03/04 13:55:39 pierre
  623. * some m68k fixes (still not compilable !)
  624. * new(tobj) does not give warning if tobj has no VMT !
  625. Revision 1.22 1999/03/02 02:56:11 peter
  626. + stabs support for binary writers
  627. * more fixes and missing updates from the previous commit :(
  628. Revision 1.21 1999/03/01 15:46:17 peter
  629. * ag386bin finally make cycles correct
  630. * prefixes are now also normal opcodes
  631. Revision 1.20 1999/02/26 00:48:14 peter
  632. * assembler writers fixed for ag386bin
  633. Revision 1.19 1999/02/25 21:02:19 peter
  634. * ag386bin updates
  635. + coff writer
  636. Revision 1.18 1999/02/22 02:15:00 peter
  637. * updates for ag386bin
  638. Revision 1.17 1998/12/20 16:21:23 peter
  639. * smartlinking doesn't crash anymore
  640. Revision 1.16 1998/12/16 00:27:18 peter
  641. * removed some obsolete version checks
  642. Revision 1.15 1998/12/01 11:19:39 peter
  643. * fixed range problem with in [tasmop]
  644. Revision 1.14 1998/11/30 09:42:56 pierre
  645. * some range check bugs fixed (still not working !)
  646. + added DLL writing support for win32 (also accepts variables)
  647. + TempAnsi for code that could be used for Temporary ansi strings
  648. handling
  649. Revision 1.13 1998/11/17 00:26:10 peter
  650. * fixed for $H+
  651. Revision 1.12 1998/11/12 11:19:34 pierre
  652. * fix for first line of function break
  653. Revision 1.11 1998/10/12 12:20:42 pierre
  654. + added tai_const_symbol_offset
  655. for r : pointer = @var.field;
  656. * better message for different arg names on implementation
  657. of function
  658. Revision 1.10 1998/10/06 17:16:34 pierre
  659. * some memory leaks fixed (thanks to Peter for heaptrc !)
  660. Revision 1.9 1998/10/01 20:19:07 jonas
  661. + ait_marker support
  662. Revision 1.8 1998/09/20 17:11:22 jonas
  663. * released REGALLOC
  664. Revision 1.7 1998/08/11 14:01:43 peter
  665. * fixed fwait bug using direct opcode
  666. Revision 1.6 1998/08/10 15:49:39 peter
  667. * small fixes for 0.99.5
  668. Revision 1.5 1998/08/08 10:19:18 florian
  669. * small fixes to write the extended type correct
  670. Revision 1.4 1998/06/05 17:46:03 peter
  671. * tp doesn't like comp() typecast
  672. Revision 1.3 1998/05/28 17:24:27 peter
  673. - $R- for tp to solve range errors with in[]
  674. Revision 1.2 1998/05/25 17:11:37 pierre
  675. * firstpasscount bug fixed
  676. now all is already set correctly the first time
  677. under EXTDEBUG try -gp to skip all other firstpasses
  678. it works !!
  679. * small bug fixes
  680. - for smallsets with -dTESTSMALLSET
  681. - some warnings removed (by correcting code !)
  682. Revision 1.1 1998/05/23 01:20:56 peter
  683. + aktasmmode, aktoptprocessor, aktoutputformat
  684. + smartlink per module $SMARTLINK-/+ (like MMX) and moved to aktswitches
  685. + $LIBNAME to set the library name where the unit will be put in
  686. * splitted cgi386 a bit (codeseg to large for bp7)
  687. * nasm, tasm works again. nasm moved to ag386nsm.pas
  688. }