ag68kmit.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. {
  2. $Id$
  3. Copyright (c) 1998 by the FPC development team
  4. This unit implements an asmoutput class for MIT syntax with
  5. Motorola 68000 (for MIT syntax TEST WITH GAS v1.34)
  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. What's to do:
  19. o Verify if this actually work as indirect mode with name of variables
  20. o write lines numbers and file names to output file
  21. o generate debugging informations
  22. }
  23. unit ag68kmit;
  24. interface
  25. uses aasm,assemble;
  26. type
  27. pm68kmitasmlist=^tm68kmitasmlist;
  28. tm68kmitasmlist = object(tasmlist)
  29. procedure WriteTree(p:paasmoutput);virtual;
  30. procedure WriteAsmList;virtual;
  31. end;
  32. implementation
  33. uses
  34. dos,globals,systems,cobjects,m68k,
  35. strings,files,verbose
  36. {$ifdef GDB}
  37. ,gdb
  38. {$endif GDB}
  39. ;
  40. const
  41. line_length = 70;
  42. var
  43. infile : pextfile;
  44. includecount,lastline : longint;
  45. function getreferencestring(const ref : treference) : string;
  46. var
  47. s : string;
  48. begin
  49. s:='';
  50. if ref.isintvalue then
  51. s:='#'+tostr(ref.offset)
  52. else
  53. with ref do
  54. begin
  55. { symbol and offset }
  56. if (assigned(symbol)) and (offset<>0) then
  57. Begin
  58. s:=s+'('+tostr(offset)+symbol^;
  59. end
  60. else
  61. { symbol only }
  62. if (assigned(symbol)) and (offset=0) then
  63. Begin
  64. s:=s+'('+symbol^;
  65. end
  66. else
  67. { offset only }
  68. if (symbol=nil) and (offset<>0) then
  69. Begin
  70. s:=s+'('+tostr(offset);
  71. end
  72. else
  73. { NOTHING - put zero as offset }
  74. if (symbol=nil) and (offset=0) then
  75. Begin
  76. s:=s+'('+'0';
  77. end
  78. else
  79. InternalError(10004);
  80. if (index<>R_NO) and (base=R_NO) and (direction=dir_none) then
  81. InternalError(10004)
  82. else if (index=R_NO) and (base<>R_NO) and (direction=dir_inc) then
  83. begin
  84. if (scalefactor = 1) or (scalefactor = 0) then
  85. Begin
  86. if offset<>0 then
  87. s:=mit_reg2str[base]+'@+'+s+')'
  88. else
  89. s:=mit_reg2str[base]+'@+';
  90. end
  91. else
  92. InternalError(10002);
  93. end
  94. else if (index=R_NO) and (base<>R_NO) and (direction=dir_dec) then
  95. begin
  96. if (scalefactor = 1) or (scalefactor = 0) then
  97. Begin
  98. if offset<>0 then
  99. s:=mit_reg2str[base]+'@-'+s+')'
  100. else
  101. s:=mit_reg2str[base]+'@-';
  102. end
  103. else
  104. InternalError(10003);
  105. end
  106. else if (index=R_NO) and (base<>R_NO) and (direction=dir_none) then
  107. begin
  108. if (offset=0) and (symbol=nil) then
  109. s:=mit_reg2str[base]+'@'
  110. else
  111. s:=mit_reg2str[base]+'@'+s+')';
  112. end
  113. else if (index<>R_NO) and (base<>R_NO) and (direction=dir_none) then
  114. begin
  115. s:=mit_reg2str[base]+'@'+s+','+mit_reg2str[index]+':L';
  116. if (scalefactor = 1) or (scalefactor = 0) then
  117. s:=s+')'
  118. else
  119. s:=s+':'+tostr(scalefactor)+')';
  120. end
  121. else
  122. if assigned(symbol) then
  123. Begin
  124. s:=symbol^;
  125. if offset<>0 then
  126. s:=s+'+'+tostr(offset);
  127. end
  128. { this must be a physical address }
  129. else
  130. s:=s+')';
  131. { else if NOT assigned(symbol) then
  132. InternalError(10004);}
  133. end; { end with }
  134. getreferencestring:=s;
  135. end;
  136. function getopstr(t : byte;o : pointer) : string;
  137. var
  138. hs : string;
  139. i: tregister;
  140. begin
  141. case t of
  142. top_reg : getopstr:=mit_reg2str[tregister(o)];
  143. top_ref : getopstr:=getreferencestring(preference(o)^);
  144. top_reglist: begin
  145. hs:='';
  146. for i:=R_NO to R_FPSR do
  147. begin
  148. if i in tregisterlist(o^) then
  149. hs:=hs+mit_reg2str[i]+'/';
  150. end;
  151. delete(hs,length(hs),1);
  152. getopstr := hs;
  153. end;
  154. top_const : getopstr:='#'+tostr(longint(o));
  155. top_symbol :
  156. { compare with i386, where a symbol is considered }
  157. { a constant. }
  158. begin
  159. hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
  160. move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
  161. { inc(byte(hs[0]));}
  162. if pcsymbol(o)^.offset>0 then
  163. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  164. else if pcsymbol(o)^.offset<0 then
  165. hs:=hs+tostr(pcsymbol(o)^.offset);
  166. getopstr:=hs;
  167. end;
  168. else internalerror(10001);
  169. end;
  170. end;
  171. function getopstr_jmp(t : byte;o : pointer) : string;
  172. var
  173. hs : string;
  174. begin
  175. case t of
  176. top_reg : getopstr_jmp:=mit_reg2str[tregister(o)];
  177. top_ref : getopstr_jmp:=getreferencestring(preference(o)^);
  178. top_const : getopstr_jmp:=tostr(longint(o));
  179. top_symbol : begin
  180. hs[0]:=chr(strlen(pchar(pcsymbol(o)^.symbol)));
  181. move(pchar(pcsymbol(o)^.symbol)^,hs[1],byte(hs[0]));
  182. if pcsymbol(o)^.offset>0 then
  183. hs:=hs+'+'+tostr(pcsymbol(o)^.offset)
  184. else if pcsymbol(o)^.offset<0 then
  185. hs:=hs+tostr(pcsymbol(o)^.offset);
  186. getopstr_jmp:=hs;
  187. end;
  188. else internalerror(10001);
  189. end;
  190. end;
  191. {****************************************************************************
  192. T68kGASASMOUTPUT
  193. ****************************************************************************}
  194. var
  195. { different types of source lines }
  196. n_line : byte;
  197. const
  198. ait_const2str:array[ait_const_32bit..ait_const_8bit] of string[8]=
  199. (#9'.long'#9,'',#9'.short'#9,#9'.byte'#9);
  200. procedure tm68kmitasmlist.WriteTree(p:paasmoutput);
  201. var
  202. hp : pai;
  203. ch : char;
  204. consttyp : tait;
  205. s : string;
  206. pos,l,i : longint;
  207. found : boolean;
  208. {$ifdef GDB}
  209. funcname : pchar;
  210. linecount : longint;
  211. {$endif GDB}
  212. begin
  213. {$ifdef GDB}
  214. funcname:=nil;
  215. linecount:=1;
  216. {$endif GDB}
  217. hp:=pai(p^.first);
  218. while assigned(hp) do
  219. begin
  220. { write debugger informations }
  221. {$ifdef GDB}
  222. if cs_debuginfo in aktswitches then
  223. begin
  224. if not (hp^.typ in [ait_external,ait_stabn,ait_stabs,ait_stab_function_name]) then
  225. begin
  226. if assigned(hp^.infile) and (pextfile(hp^.infile)<>infile) then
  227. begin
  228. infile:=hp^.infile;
  229. inc(includecount);
  230. if (hp^.infile^.path^<>'') then
  231. begin
  232. AsmWriteLn(#9'.stabs "'+FixPath(hp^.infile^.path^)+'",'+tostr(n_includefile)+
  233. ',0,0,Ltext'+ToStr(IncludeCount));
  234. end;
  235. AsmWriteLn(#9'.stabs "'+FixFileName(hp^.infile^.name^+hp^.infile^.ext^)+'",'+tostr(n_includefile)+
  236. ',0,0,Ltext'+ToStr(IncludeCount));
  237. AsmWriteLn('Ltext'+ToStr(IncludeCount)+':');
  238. end;
  239. { file name must be there before line number ! }
  240. if (hp^.line<>lastline) and (hp^.line<>0) then
  241. begin
  242. if (n_line = n_textline) and assigned(funcname) and
  243. (target_info.use_function_relative_addresses) then
  244. begin
  245. AsmWriteLn(target_info.labelprefix+'l'+tostr(linecount)+':');
  246. AsmWriteLn(#9'.stabn '+tostr(n_line)+',0,'+tostr(hp^.line)+','+
  247. target_info.labelprefix+'l'+tostr(linecount)+' - '+StrPas(FuncName));
  248. inc(linecount);
  249. end
  250. else
  251. AsmWriteLn(#9'.stabd'#9+tostr(n_line)+',0,'+tostr(hp^.line));
  252. lastline:=hp^.line;
  253. end;
  254. end;
  255. end;
  256. {$endif GDB}
  257. case hp^.typ of
  258. ait_comment :
  259. Begin
  260. AsmWrite(As_comment);
  261. AsmWritePChar(pai_asm_comment(hp)^.str);
  262. AsmLn;
  263. End;
  264. ait_external : ; { external is ignored }
  265. ait_align : AsmWriteLn(#9'.align '+tostr(pai_align(hp)^.aligntype));
  266. ait_datablock : begin
  267. { ------------------------------------------------------- }
  268. { ----------- ALIGNMENT FOR ANY NON-BYTE VALUE ---------- }
  269. { ------------- REQUIREMENT FOR 680x0 ------------------- }
  270. { ------------------------------------------------------- }
  271. if pai_datablock(hp)^.size <> 1 then
  272. begin
  273. if not(cs_littlesize in aktswitches) then
  274. AsmWriteLn(#9#9'.align 4')
  275. else
  276. AsmWriteLn(#9#9'.align 2');
  277. end;
  278. if pai_datablock(hp)^.is_global then
  279. AsmWrite(#9'.comm'#9)
  280. else
  281. AsmWrite(#9'.lcomm'#9);
  282. AsmWriteLn(StrPas(pai_datablock(hp)^.name)+','+tostr(pai_datablock(hp)^.size));
  283. end;
  284. ait_const_32bit, { alignment is required for 16/32 bit data! }
  285. ait_const_16bit: begin
  286. if not(cs_littlesize in aktswitches) then
  287. AsmWriteLn(#9#9'.align 4')
  288. else
  289. AsmWriteLn(#9#9'.align 2');
  290. AsmWrite(ait_const2str[hp^.typ]+tostr(pai_const(hp)^.value));
  291. consttyp:=hp^.typ;
  292. l:=0;
  293. repeat
  294. found:=(not (Pai(hp^.next)=nil)) and (Pai(hp^.next)^.typ=consttyp);
  295. if found then
  296. begin
  297. hp:=Pai(hp^.next);
  298. s:=','+tostr(pai_const(hp)^.value);
  299. AsmWrite(s);
  300. inc(l,length(s));
  301. end;
  302. until (not found) or (l>line_length);
  303. AsmLn;
  304. end;
  305. ait_const_8bit : begin
  306. AsmWrite(ait_const2str[hp^.typ]+tostr(pai_const(hp)^.value));
  307. consttyp:=hp^.typ;
  308. l:=0;
  309. repeat
  310. found:=(not (Pai(hp^.next)=nil)) and (Pai(hp^.next)^.typ=consttyp);
  311. if found then
  312. begin
  313. hp:=Pai(hp^.next);
  314. s:=','+tostr(pai_const(hp)^.value);
  315. AsmWrite(s);
  316. inc(l,length(s));
  317. end;
  318. until (not found) or (l>line_length);
  319. AsmLn;
  320. end;
  321. ait_const_symbol : Begin
  322. if not(cs_littlesize in aktswitches) then
  323. AsmWriteLn(#9#9'.align 4')
  324. else
  325. AsmWriteLn(#9#9'.align 2');
  326. AsmWriteLn(#9'.long'#9+StrPas(pchar(pai_const(hp)^.value)));
  327. end;
  328. ait_real_64bit : Begin
  329. if not(cs_littlesize in aktswitches) then
  330. AsmWriteLn(#9#9'.align 4')
  331. else
  332. AsmWriteLn(#9#9'.align 2');
  333. AsmWriteLn(#9'.double'#9+double2str(pai_double(hp)^.value));
  334. end;
  335. ait_real_32bit : Begin
  336. if not(cs_littlesize in aktswitches) then
  337. AsmWriteLn(#9#9'.align 4')
  338. else
  339. AsmWriteLn(#9#9'.align 2');
  340. AsmWriteLn(#9'.single'#9+double2str(pai_single(hp)^.value));
  341. end;
  342. ait_real_extended : Begin
  343. if not(cs_littlesize in aktswitches) then
  344. AsmWriteLn(#9#9'.align 4')
  345. else
  346. AsmWriteLn(#9#9'.align 2');
  347. AsmWriteLn(#9'.extend'#9+double2str(pai_extended(hp)^.value));
  348. { comp type is difficult to write so use double }
  349. end;
  350. ait_comp : Begin
  351. if not(cs_littlesize in aktswitches) then
  352. AsmWriteLn(#9#9'.align 4')
  353. else
  354. AsmWriteLn(#9#9'.align 2');
  355. AsmWriteLn(#9'.double'#9+comp2str(pai_extended(hp)^.value));
  356. end;
  357. ait_direct : begin
  358. AsmWritePChar(pai_direct(hp)^.str);
  359. AsmLn;
  360. {$IfDef GDB}
  361. if strpos(pai_direct(hp)^.str,'.data')<>nil then
  362. n_line:=n_dataline
  363. else if strpos(pai_direct(hp)^.str,'.text')<>nil then
  364. n_line:=n_textline
  365. else if strpos(pai_direct(hp)^.str,'.bss')<>nil then
  366. n_line:=n_bssline;
  367. {$endif GDB}
  368. end;
  369. ait_string : begin
  370. pos:=0;
  371. for i:=1 to pai_string(hp)^.len do
  372. begin
  373. if pos=0 then
  374. begin
  375. AsmWrite(#9'.ascii'#9'"');
  376. pos:=20;
  377. end;
  378. ch:=pai_string(hp)^.str[i-1];
  379. case ch of
  380. #0, {This can't be done by range, because a bug in FPC}
  381. #1..#31,
  382. #128..#255 : s:='\'+tostr(ord(ch) shr 6)+tostr((ord(ch) and 63) shr 3)+tostr(ord(ch) and 7);
  383. '"' : s:='\"';
  384. '\' : s:='\\';
  385. else
  386. s:=ch;
  387. end;
  388. AsmWrite(s);
  389. inc(pos,length(s));
  390. if (pos>line_length) or (i=pai_string(hp)^.len) then
  391. begin
  392. AsmWriteLn('"');
  393. pos:=0;
  394. end;
  395. end;
  396. end;
  397. ait_label : begin
  398. if (pai_label(hp)^.l^.is_used) then
  399. AsmWriteLn(lab2str(pai_label(hp)^.l)+':');
  400. end;
  401. ait_labeled_instruction : begin
  402. { labeled operand }
  403. if pai_labeled(hp)^._op1 = R_NO then
  404. AsmWriteLn(#9+mot_op2str[pai_labeled(hp)^._operator]+#9+lab2str(pai_labeled(hp)^.lab))
  405. else
  406. { labeled operand with register }
  407. AsmWriteLn(#9+mot_op2str[pai_labeled(hp)^._operator]+#9+
  408. reg2str(pai_labeled(hp)^._op1)+','+lab2str(pai_labeled(hp)^.lab))
  409. end;
  410. ait_symbol : begin
  411. { ------------------------------------------------------- }
  412. { ----------- ALIGNMENT FOR ANY NON-BYTE VALUE ---------- }
  413. { ------------- REQUIREMENT FOR 680x0 ------------------- }
  414. { ------------------------------------------------------- }
  415. if assigned(hp^.next) and (pai(hp^.next)^.typ in
  416. [ait_const_32bit,ait_const_16bit,ait_const_symbol,
  417. ait_real_64bit,ait_real_32bit,ait_string]) then
  418. begin
  419. if not(cs_littlesize in aktswitches) then
  420. AsmWriteLn(#9#9'.align 4')
  421. else
  422. AsmWriteLn(#9#9'.align 2');
  423. end;
  424. if pai_symbol(hp)^.is_global then
  425. AsmWriteLn('.globl '+StrPas(pai_symbol(hp)^.name));
  426. AsmWriteLn(StrPas(pai_symbol(hp)^.name)+':');
  427. end;
  428. ait_instruction : begin
  429. { old versions of GAS don't like PEA.L and LEA.L }
  430. if (pai68k(hp)^._operator in [
  431. A_LEA,A_PEA,A_ABCD,A_BCHG,A_BCLR,A_BSET,A_BTST,
  432. A_EXG,A_NBCD,A_SBCD,A_SWAP,A_TAS,A_SCC,A_SCS,
  433. A_SEQ,A_SGE,A_SGT,A_SHI,A_SLE,A_SLS,A_SLT,A_SMI,
  434. A_SNE,A_SPL,A_ST,A_SVC,A_SVS,A_SF]) then
  435. s:=#9+mot_op2str[pai68k(hp)^._operator]
  436. else
  437. s:=#9+mot_op2str[pai68k(hp)^._operator]+mit_opsize2str[pai68k(hp)^.size];
  438. if pai68k(hp)^.op1t<>top_none then
  439. begin
  440. { call and jmp need an extra handling }
  441. { this code is only callded if jmp isn't a labeled instruction }
  442. if pai68k(hp)^._operator in [A_JSR,A_JMP] then
  443. s:=s+#9+getopstr_jmp(pai68k(hp)^.op1t,pai68k(hp)^.op1)
  444. else
  445. if pai68k(hp)^.op1t = top_reglist then
  446. s:=s+#9+getopstr(pai68k(hp)^.op1t,@(pai68k(hp)^.reglist))
  447. else
  448. s:=s+#9+getopstr(pai68k(hp)^.op1t,pai68k(hp)^.op1);
  449. if pai68k(hp)^.op2t<>top_none then
  450. begin
  451. if pai68k(hp)^.op2t = top_reglist then
  452. s:=s+','+getopstr(pai68k(hp)^.op2t,@pai68k(hp)^.reglist)
  453. else
  454. s:=s+','+getopstr(pai68k(hp)^.op2t,pai68k(hp)^.op2);
  455. { three operands }
  456. if pai68k(hp)^.op3t<>top_none then
  457. begin
  458. if (pai68k(hp)^._operator = A_DIVSL) or
  459. (pai68k(hp)^._operator = A_DIVUL) or
  460. (pai68k(hp)^._operator = A_MULU) or
  461. (pai68k(hp)^._operator = A_MULS) or
  462. (pai68k(hp)^._operator = A_DIVS) or
  463. (pai68k(hp)^._operator = A_DIVU) then
  464. s:=s+':'+getopstr(pai68k(hp)^.op3t,pai68k(hp)^.op3)
  465. else
  466. s:=s+','+getopstr(pai68k(hp)^.op3t,pai68k(hp)^.op3);
  467. end;
  468. end;
  469. end;
  470. AsmWriteLn(s);
  471. end;
  472. {$ifdef GDB}
  473. ait_stabs : begin
  474. AsmWrite(#9'.stabs ');
  475. AsmWritePChar(pai_stabs(hp)^.str);
  476. AsmLn;
  477. end;
  478. ait_stabn : begin
  479. AsmWrite(#9'.stabn ');
  480. AsmWritePChar(pai_stabn(hp)^.str);
  481. AsmLn;
  482. end;
  483. ait_stab_function_name : funcname:=pai_stab_function_name(hp)^.str;
  484. {$endif GDB}
  485. else
  486. internalerror(10000);
  487. end;
  488. hp:=pai(hp^.next);
  489. end;
  490. end;
  491. procedure tm68kmitasmlist.WriteAsmList;
  492. {$ifdef GDB}
  493. var
  494. p,n,e : string;
  495. {$endif}
  496. begin
  497. {$ifdef EXTDEBUG}
  498. if assigned(current_module^.mainsource) then
  499. comment(v_info,'Start writing gas-styled assembler output for '+current_module^.mainsource^);
  500. {$endif}
  501. infile:=nil;
  502. includecount:=0;
  503. {$ifdef GDB}
  504. if assigned(current_module^.mainsource) then
  505. fsplit(current_module^.mainsource^,p,n,e)
  506. else
  507. begin
  508. p:=inputdir;
  509. n:=inputfile;
  510. e:=inputextension;
  511. end;
  512. { to get symify to work }
  513. AsmWriteLn(#9'.file "'+FixFileName(n+e)+'"');
  514. { stabs }
  515. n_line:=n_bssline;
  516. if (cs_debuginfo in aktswitches) then
  517. begin
  518. if (p<>'') then
  519. AsmWriteLn(#9'.stabs "'+FixPath(p)+'",'+tostr(n_sourcefile)+',0,0,Ltext0');
  520. AsmWriteLn(#9'.stabs "'+FixFileName(n+e)+'",'+tostr(n_sourcefile)+',0,0,Ltext0');
  521. AsmWriteLn('Ltext0:');
  522. end;
  523. infile:=current_module^.sourcefiles.files;
  524. {$endif GDB}
  525. { main source file is last in list }
  526. while assigned(infile^._next) do
  527. infile:=infile^._next;
  528. lastline:=0;
  529. { there should be nothing but externals so we don't need to process
  530. WriteTree(externals); }
  531. WriteTree(debuglist);
  532. { code segment }
  533. AsmWriteln('.text');
  534. {$ifdef GDB}
  535. n_line:=n_textline;
  536. {$endif GDB}
  537. WriteTree(codesegment);
  538. AsmWriteLn('.data');
  539. {$ifdef EXTDEBUG}
  540. AsmWriteLn(#9'.ascii'#9'"compiled by FPC '+version_string+'\0"');
  541. AsmWriteLn(#9'.ascii'#9'"target: '+target_info.target_name+'\0"');
  542. {$endif EXTDEBUG}
  543. {$ifdef GDB}
  544. n_line:=n_dataline;
  545. {$endif GDB}
  546. DataSegment^.insert(new(pai_align,init(4)));
  547. WriteTree(datasegment);
  548. WriteTree(consts);
  549. { makes problems with old GNU ASes
  550. AsmWriteLn('.bss');
  551. bssSegment^.insert(new(pai_align,init(4))); }
  552. {$ifdef GDB}
  553. n_line:=n_bssline;
  554. {$endif GDB}
  555. WriteTree(bsssegment);
  556. AsmLn;
  557. {$ifdef EXTDEBUG}
  558. if assigned(current_module^.mainsource) then
  559. comment(v_info,'Done writing gas-styled assembler output for '+current_module^.mainsource^);
  560. {$endif EXTDEBUG}
  561. end;
  562. end.
  563. {
  564. $Log$
  565. Revision 1.2 1998-04-29 10:33:42 pierre
  566. + added some code for ansistring (not complete nor working yet)
  567. * corrected operator overloading
  568. * corrected nasm output
  569. + started inline procedures
  570. + added starstarn : use ** for exponentiation (^ gave problems)
  571. + started UseTokenInfo cond to get accurate positions
  572. Revision 1.1.1.1 1998/03/25 11:18:16 root
  573. * Restored version
  574. Revision 1.3 1998/03/22 12:45:37 florian
  575. * changes of Carl-Eric to m68k target commit:
  576. - wrong nodes because of the new string cg in intel, I had to create
  577. this under m68k also ... had to work it out to fix potential alignment
  578. problems --> this removes the crash of the m68k compiler.
  579. - added absolute addressing in m68k assembler (required for Amiga startup)
  580. - fixed alignment problems (because of byte return values, alignment
  581. would not be always valid) -- is this ok if i change the offset if odd in
  582. setfirsttemp ?? -- it seems ok...
  583. Revision 1.2 1998/03/10 04:22:45 carl
  584. - removed in because can cause range check errors in BP
  585. Revision 1.1 1998/03/10 01:26:10 peter
  586. + new uniform names
  587. Revision 1.8 1998/03/09 12:58:11 peter
  588. * FWait warning is only showed for Go32V2 and $E+
  589. * opcode tables moved to i386.pas/m68k.pas to reduce circular uses (and
  590. for m68k the same tables are removed)
  591. + $E for i386
  592. Revision 1.7 1998/03/06 00:52:25 peter
  593. * replaced all old messages from errore.msg, only ExtDebug and some
  594. Comment() calls are left
  595. * fixed options.pas
  596. Revision 1.6 1998/03/02 01:48:44 peter
  597. * renamed target_DOS to target_GO32V1
  598. + new verbose system, merged old errors and verbose units into one new
  599. verbose.pas, so errors.pas is obsolete
  600. Revision 1.5 1998/02/23 02:53:52 carl
  601. * some bugfix with $extdebug
  602. Revision 1.4 1998/02/22 23:03:19 peter
  603. * renamed msource->mainsource and name->unitname
  604. * optimized filename handling, filename is not seperate anymore with
  605. path+name+ext, this saves stackspace and a lot of fsplit()'s
  606. * recompiling of some units in libraries fixed
  607. * shared libraries are working again
  608. + $LINKLIB <lib> to support automatic linking to libraries
  609. + libraries are saved/read from the ppufile, also allows more libraries
  610. per ppufile
  611. Revision 1.3 1998/02/22 21:56:29 carl
  612. * bugfix of offset with index
  613. Revision 1.2 1998/02/21 20:20:01 carl
  614. * make it work under older versions of GAS
  615. }