ag68kgas.pas 27 KB

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