tgeni386.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758
  1. {
  2. $Id$
  3. Copyright (C) 1993-98 by Florian Klaempfl
  4. This unit handles the temporary variables stuff for i386
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. ****************************************************************************
  17. }
  18. unit tgeni386;
  19. interface
  20. uses
  21. cobjects,globals,tree,hcodegen,verbose,files,aasm,
  22. cpubase,cpuasm
  23. ;
  24. type
  25. tregisterset = set of tregister;
  26. tpushed = array[R_EAX..R_MM6] of boolean;
  27. tsaved = array[R_EAX..R_MM6] of longint;
  28. const
  29. usablereg32 : byte = 4;
  30. { this value is used in tsaved, if the register isn't saved }
  31. reg_not_saved = $7fffffff;
  32. {$ifdef SUPPORT_MMX}
  33. usableregmmx : byte = 8;
  34. {$endif SUPPORT_MMX}
  35. {$ifdef TEMPREGDEBUG}
  36. procedure testregisters32;
  37. {$endif TEMPREGDEBUG}
  38. function getregister32 : tregister;
  39. procedure ungetregister32(r : tregister);
  40. { tries to allocate the passed register, if possible }
  41. function getexplicitregister32(r : tregister) : tregister;
  42. {$ifdef SUPPORT_MMX}
  43. function getregistermmx : tregister;
  44. procedure ungetregistermmx(r : tregister);
  45. {$endif SUPPORT_MMX}
  46. procedure ungetregister(r : tregister);
  47. procedure cleartempgen;
  48. procedure del_reference(const ref : treference);
  49. procedure del_locref(const location : tlocation);
  50. procedure del_location(const l : tlocation);
  51. { pushs and restores registers }
  52. procedure pushusedregisters(var pushed : tpushed;b : byte);
  53. procedure popusedregisters(const pushed : tpushed);
  54. { saves and restores used registers to temp. values }
  55. procedure saveusedregisters(var saved : tsaved;b : byte);
  56. procedure restoreusedregisters(const saved : tsaved);
  57. procedure clearregistercount;
  58. procedure resetusableregisters;
  59. { corrects the fpu stack register by ofs }
  60. function correct_fpuregister(r : tregister;ofs : byte) : tregister;
  61. var
  62. unused,usableregs : tregisterset;
  63. c_usableregs : longint;
  64. { uses only 1 byte while a set uses in FPC 32 bytes }
  65. usedinproc : byte;
  66. fpuvaroffset : byte;
  67. { count, how much a register must be pushed if it is used as register }
  68. { variable }
  69. {$ifdef SUPPORT_MMX}
  70. reg_pushes : array[R_EAX..R_MM6] of longint;
  71. is_reg_var : array[R_EAX..R_MM6] of boolean;
  72. {$ifdef TEMPREGDEBUG}
  73. reg_user : array[R_EAX..R_MM6] of ptree;
  74. reg_releaser : array[R_EAX..R_MM6] of ptree;
  75. {$endif TEMPREGDEBUG}
  76. {$else SUPPORT_MMX}
  77. reg_pushes : array[R_EAX..R_EDI] of longint;
  78. is_reg_var : array[R_EAX..R_EDI] of boolean;
  79. {$ifdef TEMPREGDEBUG}
  80. reg_user : array[R_EAX..R_EDI] of ptree;
  81. reg_releaser : array[R_EAX..R_EDI] of ptree;
  82. {$endif TEMPREGDEBUG}
  83. {$endif SUPPORT_MMX}
  84. implementation
  85. uses
  86. globtype,temp_gen;
  87. procedure pushusedregisters(var pushed : tpushed;b : byte);
  88. var
  89. r : tregister;
  90. hr : preference;
  91. begin
  92. usedinproc:=usedinproc or b;
  93. for r:=R_EAX to R_EBX do
  94. begin
  95. pushed[r]:=false;
  96. { if the register is used by the calling subroutine }
  97. if ((b and ($80 shr byte(r)))<>0) then
  98. begin
  99. { and is present in use }
  100. if not(r in unused) then
  101. begin
  102. { then save it }
  103. exprasmlist^.concat(new(paicpu,op_reg(A_PUSH,S_L,r)));
  104. { here was a big problem !!!!!}
  105. { you cannot do that for a register that is
  106. globally assigned to a var
  107. this also means that you must push it much more
  108. often, but there must be a better way
  109. maybe by putting the value back to the stack !! }
  110. if not(is_reg_var[r]) then
  111. begin
  112. unused:=unused+[r];
  113. {$ifdef TEMPREGDEBUG}
  114. inc(usablereg32);
  115. {$endif TEMPREGDEBUG}
  116. end;
  117. pushed[r]:=true;
  118. end;
  119. end;
  120. end;
  121. {$ifdef SUPPORT_MMX}
  122. for r:=R_MM0 to R_MM6 do
  123. begin
  124. pushed[r]:=false;
  125. { if the mmx register is in use, save it }
  126. if not(r in unused) then
  127. begin
  128. exprasmlist^.concat(new(paicpu,op_const_reg(
  129. A_SUB,S_L,8,R_ESP)));
  130. new(hr);
  131. reset_reference(hr^);
  132. hr^.base:=R_ESP;
  133. exprasmlist^.concat(new(paicpu,op_reg_ref(
  134. A_MOVQ,S_NO,r,hr)));
  135. if not(is_reg_var[r]) then
  136. begin
  137. unused:=unused+[r];
  138. {$ifdef TEMPREGDEBUG}
  139. inc(usableregmmx);
  140. {$endif TEMPREGDEBUG}
  141. end;
  142. pushed[r]:=true;
  143. end;
  144. end;
  145. {$endif SUPPORT_MMX}
  146. {$ifdef TEMPREGDEBUG}
  147. testregisters32;
  148. {$endif TEMPREGDEBUG}
  149. end;
  150. procedure saveusedregisters(var saved : tsaved;b : byte);
  151. var
  152. r : tregister;
  153. hr : treference;
  154. begin
  155. usedinproc:=usedinproc or b;
  156. for r:=R_EAX to R_EBX do
  157. begin
  158. saved[r]:=reg_not_saved;
  159. { if the register is used by the calling subroutine }
  160. if ((b and ($80 shr byte(r)))<>0) then
  161. begin
  162. { and is present in use }
  163. if not(r in unused) then
  164. begin
  165. { then save it }
  166. gettempofsizereference(4,hr);
  167. saved[r]:=hr.offset;
  168. exprasmlist^.concat(new(paicpu,op_reg_ref(A_MOV,S_L,r,newreference(hr))));
  169. { here was a big problem !!!!!}
  170. { you cannot do that for a register that is
  171. globally assigned to a var
  172. this also means that you must push it much more
  173. often, but there must be a better way
  174. maybe by putting the value back to the stack !! }
  175. if not(is_reg_var[r]) then
  176. begin
  177. unused:=unused+[r];
  178. {$ifdef TEMPREGDEBUG}
  179. inc(usablereg32);
  180. {$endif TEMPREGDEBUG}
  181. end;
  182. end;
  183. end;
  184. end;
  185. {$ifdef SUPPORT_MMX}
  186. for r:=R_MM0 to R_MM6 do
  187. begin
  188. saved[r]:=reg_not_saved;
  189. { if the mmx register is in use, save it }
  190. if not(r in unused) then
  191. begin
  192. gettempofsizereference(8,hr);
  193. exprasmlist^.concat(new(paicpu,op_reg_ref(
  194. A_MOVQ,S_NO,r,newreference(hr))));
  195. if not(is_reg_var[r]) then
  196. begin
  197. unused:=unused+[r];
  198. {$ifdef TEMPREGDEBUG}
  199. inc(usableregmmx);
  200. {$endif TEMPREGDEBUG}
  201. end;
  202. saved[r]:=hr.offset;
  203. end;
  204. end;
  205. {$endif SUPPORT_MMX}
  206. {$ifdef TEMPREGDEBUG}
  207. testregisters32;
  208. {$endif TEMPREGDEBUG}
  209. end;
  210. procedure popusedregisters(const pushed : tpushed);
  211. var
  212. r : tregister;
  213. {$ifdef SUPPORT_MMX}
  214. hr : preference;
  215. {$endif SUPPORT_MMX}
  216. begin
  217. { restore in reverse order: }
  218. {$ifdef SUPPORT_MMX}
  219. for r:=R_MM6 downto R_MM0 do
  220. begin
  221. if pushed[r] then
  222. begin
  223. new(hr);
  224. reset_reference(hr^);
  225. hr^.base:=R_ESP;
  226. exprasmlist^.concat(new(paicpu,op_ref_reg(
  227. A_MOVQ,S_NO,hr,r)));
  228. exprasmlist^.concat(new(paicpu,op_const_reg(
  229. A_ADD,S_L,8,R_ESP)));
  230. unused:=unused-[r];
  231. {$ifdef TEMPREGDEBUG}
  232. dec(usableregmmx);
  233. {$endif TEMPREGDEBUG}
  234. end;
  235. end;
  236. {$endif SUPPORT_MMX}
  237. for r:=R_EBX downto R_EAX do
  238. if pushed[r] then
  239. begin
  240. exprasmlist^.concat(new(paicpu,op_reg(A_POP,S_L,r)));
  241. {$ifdef TEMPREGDEBUG}
  242. if not (r in unused) then
  243. { internalerror(10)
  244. in cg386cal we always restore regs
  245. that appear as used
  246. due to a unused tmep storage PM }
  247. else
  248. dec(usablereg32);
  249. {$endif TEMPREGDEBUG}
  250. unused:=unused-[r];
  251. end;
  252. {$ifdef TEMPREGDEBUG}
  253. testregisters32;
  254. {$endif TEMPREGDEBUG}
  255. end;
  256. procedure restoreusedregisters(const saved : tsaved);
  257. var
  258. r : tregister;
  259. hr : treference;
  260. begin
  261. { restore in reverse order: }
  262. {$ifdef SUPPORT_MMX}
  263. for r:=R_MM6 downto R_MM0 do
  264. begin
  265. if saved[r]<>reg_not_saved then
  266. begin
  267. reset_reference(hr);
  268. hr.base:=frame_pointer;
  269. hr.offset:=saved[r];
  270. exprasmlist^.concat(new(paicpu,op_ref_reg(
  271. A_MOVQ,S_NO,newreference(hr),r)));
  272. unused:=unused-[r];
  273. {$ifdef TEMPREGDEBUG}
  274. dec(usableregmmx);
  275. {$endif TEMPREGDEBUG}
  276. ungetiftemp(hr);
  277. end;
  278. end;
  279. {$endif SUPPORT_MMX}
  280. for r:=R_EBX downto R_EAX do
  281. if saved[r]<>reg_not_saved then
  282. begin
  283. reset_reference(hr);
  284. hr.base:=frame_pointer;
  285. hr.offset:=saved[r];
  286. exprasmlist^.concat(new(paicpu,op_ref_reg(A_MOV,S_L,newreference(hr),r)));
  287. {$ifdef TEMPREGDEBUG}
  288. if not (r in unused) then
  289. internalerror(10)
  290. else
  291. dec(usablereg32);
  292. {$endif TEMPREGDEBUG}
  293. unused:=unused-[r];
  294. ungetiftemp(hr);
  295. end;
  296. {$ifdef TEMPREGDEBUG}
  297. testregisters32;
  298. {$endif TEMPREGDEBUG}
  299. end;
  300. procedure ungetregister(r : tregister);
  301. begin
  302. if r in [R_EAX,R_ECX,R_EDX,R_EBX,R_ESP,R_EBP,R_ESI,R_EDI] then
  303. ungetregister32(r)
  304. else if r in [R_AX,R_CX,R_DX,R_BX,R_SP,R_BP,R_SI,R_DI] then
  305. ungetregister32(reg16toreg32(r))
  306. else if r in [R_AL,R_BL,R_CL,R_DL] then
  307. ungetregister32(reg8toreg32(r))
  308. {$ifdef SUPPORT_MMX}
  309. else if r in [R_MM0..R_MM6] then
  310. ungetregistermmx(r)
  311. {$endif SUPPORT_MMX}
  312. else internalerror(18);
  313. end;
  314. procedure ungetregister32(r : tregister);
  315. begin
  316. if cs_regalloc in aktglobalswitches then
  317. begin
  318. { takes much time }
  319. if not(r in usableregs) then
  320. exit;
  321. unused:=unused+[r];
  322. inc(usablereg32);
  323. end
  324. else
  325. begin
  326. if not(r in [R_EAX,R_EBX,R_ECX,R_EDX]) then
  327. exit;
  328. {$ifdef TEMPREGDEBUG}
  329. if (r in unused) then
  330. {$ifdef EXTTEMPREGDEBUG}
  331. begin
  332. Comment(V_Debug,'register freed twice '+reg2str(r));
  333. testregisters32;
  334. exit;
  335. end
  336. {$else EXTTEMPREGDEBUG}
  337. exit
  338. {$endif EXTTEMPREGDEBUG}
  339. else
  340. {$endif TEMPREGDEBUG}
  341. inc(usablereg32);
  342. unused:=unused+[r];
  343. {$ifdef TEMPREGDEBUG}
  344. reg_releaser[r]:=curptree^;
  345. {$endif TEMPREGDEBUG}
  346. end;
  347. exprasmlist^.concat(new(pairegalloc,dealloc(r)));
  348. {$ifdef TEMPREGDEBUG}
  349. testregisters32;
  350. {$endif TEMPREGDEBUG}
  351. end;
  352. {$ifdef SUPPORT_MMX}
  353. function getregistermmx : tregister;
  354. var
  355. r : tregister;
  356. begin
  357. dec(usableregmmx);
  358. for r:=R_MM0 to R_MM6 do
  359. if r in unused then
  360. begin
  361. unused:=unused-[r];
  362. usedinproc:=usedinproc or ($80 shr byte(R_EAX));
  363. getregistermmx:=r;
  364. exit;
  365. end;
  366. internalerror(10);
  367. end;
  368. procedure ungetregistermmx(r : tregister);
  369. begin
  370. if cs_regalloc in aktglobalswitches then
  371. begin
  372. { takes much time }
  373. if not(r in usableregs) then
  374. exit;
  375. unused:=unused+[r];
  376. inc(usableregmmx);
  377. end
  378. else
  379. begin
  380. unused:=unused+[r];
  381. inc(usableregmmx);
  382. end;
  383. end;
  384. {$endif SUPPORT_MMX}
  385. procedure del_reference(const ref : treference);
  386. begin
  387. if ref.is_immediate then
  388. exit;
  389. ungetregister32(ref.base);
  390. ungetregister32(ref.index);
  391. end;
  392. procedure del_locref(const location : tlocation);
  393. begin
  394. if (location.loc<>loc_mem) and (location.loc<>loc_reference) then
  395. exit;
  396. if location.reference.is_immediate then
  397. exit;
  398. ungetregister32(location.reference.base);
  399. ungetregister32(location.reference.index);
  400. end;
  401. procedure del_location(const l : tlocation);
  402. begin
  403. case l.loc of
  404. LOC_REGISTER :
  405. ungetregister(l.register);
  406. LOC_MEM,LOC_REFERENCE :
  407. del_reference(l.reference);
  408. end;
  409. end;
  410. {$ifdef TEMPREGDEBUG}
  411. procedure testregisters32;
  412. var test : byte;
  413. begin
  414. test:=0;
  415. if R_EAX in unused then
  416. inc(test);
  417. if R_EBX in unused then
  418. inc(test);
  419. if R_ECX in unused then
  420. inc(test);
  421. if R_EDX in unused then
  422. inc(test);
  423. if test<>usablereg32 then
  424. internalerror(10);
  425. end;
  426. {$endif TEMPREGDEBUG}
  427. function getregister32 : tregister;
  428. begin
  429. if usablereg32=0 then
  430. internalerror(10);
  431. dec(usablereg32);
  432. {$ifdef TEMPREGDEBUG}
  433. if curptree^^.usableregs-usablereg32>curptree^^.registers32 then
  434. internalerror(10);
  435. {$endif TEMPREGDEBUG}
  436. {$ifdef EXTTEMPREGDEBUG}
  437. if curptree^^.usableregs-usablereg32>curptree^^.reallyusedregs then
  438. curptree^^.reallyusedregs:=curptree^^.usableregs-usablereg32;
  439. {$endif EXTTEMPREGDEBUG}
  440. if R_EAX in unused then
  441. begin
  442. unused:=unused-[R_EAX];
  443. usedinproc:=usedinproc or ($80 shr byte(R_EAX));
  444. getregister32:=R_EAX;
  445. {$ifdef TEMPREGDEBUG}
  446. reg_user[R_EAX]:=curptree^;
  447. {$endif TEMPREGDEBUG}
  448. exprasmlist^.concat(new(pairegalloc,alloc(R_EAX)));
  449. end
  450. else if R_EDX in unused then
  451. begin
  452. unused:=unused-[R_EDX];
  453. usedinproc:=usedinproc or ($80 shr byte(R_EDX));
  454. getregister32:=R_EDX;
  455. {$ifdef TEMPREGDEBUG}
  456. reg_user[R_EDX]:=curptree^;
  457. {$endif TEMPREGDEBUG}
  458. exprasmlist^.concat(new(pairegalloc,alloc(R_EDX)));
  459. end
  460. else if R_EBX in unused then
  461. begin
  462. unused:=unused-[R_EBX];
  463. usedinproc:=usedinproc or ($80 shr byte(R_EBX));
  464. getregister32:=R_EBX;
  465. {$ifdef TEMPREGDEBUG}
  466. reg_user[R_EBX]:=curptree^;
  467. {$endif TEMPREGDEBUG}
  468. exprasmlist^.concat(new(pairegalloc,alloc(R_EBX)));
  469. end
  470. else if R_ECX in unused then
  471. begin
  472. unused:=unused-[R_ECX];
  473. usedinproc:=usedinproc or ($80 shr byte(R_ECX));
  474. getregister32:=R_ECX;
  475. {$ifdef TEMPREGDEBUG}
  476. reg_user[R_ECX]:=curptree^;
  477. {$endif TEMPREGDEBUG}
  478. exprasmlist^.concat(new(pairegalloc,alloc(R_ECX)));
  479. end
  480. else internalerror(10);
  481. {$ifdef TEMPREGDEBUG}
  482. testregisters32;
  483. {$endif TEMPREGDEBUG}
  484. end;
  485. function getexplicitregister32(r : tregister) : tregister;
  486. begin
  487. if r in unused then
  488. begin
  489. dec(usablereg32);
  490. {$ifdef TEMPREGDEBUG}
  491. if curptree^^.usableregs-usablereg32>curptree^^.registers32 then
  492. internalerror(10);
  493. reg_user[r]:=curptree^;
  494. {$endif TEMPREGDEBUG}
  495. unused:=unused-[r];
  496. usedinproc:=usedinproc or ($80 shr byte(r));
  497. exprasmlist^.concat(new(pairegalloc,alloc(r)));
  498. getexplicitregister32:=r;
  499. {$ifdef TEMPREGDEBUG}
  500. testregisters32;
  501. {$endif TEMPREGDEBUG}
  502. end
  503. else
  504. getexplicitregister32:=getregister32;
  505. end;
  506. procedure cleartempgen;
  507. begin
  508. unused:=usableregs;
  509. usablereg32:=c_usableregs;
  510. {fpuvaroffset:=0;
  511. this must only be resetted at each procedure
  512. compilation start PM }
  513. end;
  514. procedure clearregistercount;
  515. var
  516. regi : tregister;
  517. begin
  518. {$ifdef SUPPORT_MMX}
  519. for regi:=R_EAX to R_MM6 do
  520. begin
  521. reg_pushes[regi]:=0;
  522. is_reg_var[regi]:=false;
  523. end;
  524. {$else SUPPORT_MMX}
  525. for regi:=R_EAX to R_EDI do
  526. begin
  527. reg_pushes[regi]:=0;
  528. is_reg_var[regi]:=false;
  529. end;
  530. {$endif SUPPORT_MMX}
  531. end;
  532. function correct_fpuregister(r : tregister;ofs : byte) : tregister;
  533. begin
  534. correct_fpuregister:=tregister(longint(r)+ofs);
  535. end;
  536. procedure resetusableregisters;
  537. begin
  538. {$ifdef SUPPORT_MMX}
  539. usableregs:=[R_EAX,R_EBX,R_ECX,R_EDX,R_MM0..R_MM6];
  540. c_usableregs:=4;
  541. usableregmmx:=8;
  542. {$else}
  543. usableregs:=[R_EAX,R_EBX,R_ECX,R_EDX];
  544. c_usableregs:=4;
  545. {$endif SUPPORT_MMX}
  546. fpuvaroffset:=0;
  547. end;
  548. begin
  549. resetusableregisters;
  550. end.
  551. {
  552. $Log$
  553. Revision 1.34 1999-08-27 10:38:32 pierre
  554. + EXTTEMPREGDEBUG code added
  555. Revision 1.33 1999/08/25 12:00:06 jonas
  556. * changed pai386, paippc and paiapha (same for tai*) to paicpu (taicpu)
  557. Revision 1.32 1999/08/23 23:25:58 pierre
  558. + TEMPREGDEBUG code, test of register allocation
  559. if a tree uses more than registers32 regs then
  560. internalerror(10) is issued
  561. + EXTTEMPREGDEBUG will also give internalerror(10) if
  562. a same register is freed twice (happens in several part
  563. of current compiler like addn for strings and sets)
  564. Revision 1.31 1999/08/10 12:47:55 pierre
  565. * fpuvaroffset problems solved
  566. Revision 1.30 1999/08/04 13:45:32 florian
  567. + floating point register variables !!
  568. * pairegalloc is now generated for register variables
  569. Revision 1.29 1999/08/04 00:23:48 florian
  570. * renamed i386asm and i386base to cpuasm and cpubase
  571. Revision 1.28 1999/08/02 17:17:11 florian
  572. * small changes for the new code generator
  573. Revision 1.27 1999/06/09 23:22:39 peter
  574. + del_location
  575. Revision 1.26 1999/05/27 19:45:27 peter
  576. * removed oldasm
  577. * plabel -> pasmlabel
  578. * -a switches to source writing automaticly
  579. * assembler readers OOPed
  580. * asmsymbol automaticly external
  581. * jumptables and other label fixes for asm readers
  582. Revision 1.25 1999/05/19 22:00:48 florian
  583. * some new routines for register management:
  584. maybe_savetotemp,restorefromtemp, saveusedregisters,
  585. restoreusedregisters
  586. Revision 1.24 1999/05/18 21:58:34 florian
  587. * fixed some bugs related to temp. ansistrings and functions results
  588. which return records/objects/arrays which need init/final.
  589. Revision 1.23 1999/05/01 13:25:01 peter
  590. * merged nasm compiler
  591. * old asm moved to oldasm/
  592. Revision 1.22 1999/04/21 16:31:48 pierre
  593. ra386att.pas
  594. Revision 1.21 1999/04/16 11:49:47 peter
  595. + tempalloc
  596. + -at to show temp alloc info in .s file
  597. Revision 1.20 1999/02/25 21:02:55 peter
  598. * ag386bin updates
  599. + coff writer
  600. Revision 1.19 1999/02/22 02:15:58 peter
  601. * updates for ag386bin
  602. Revision 1.18 1999/01/18 16:02:20 pierre
  603. * better error info with -Co
  604. Revision 1.17 1998/12/11 23:36:09 florian
  605. + again more stuff for int64/qword:
  606. - comparision operators
  607. - code generation for: str, read(ln), write(ln)
  608. Revision 1.16 1998/12/11 17:22:40 florian
  609. * fixed previous commit bug fix of getexplicitregister32
  610. (usableregs32 was decremented twice, thnaks Pierre for that hint)
  611. Revision 1.15 1998/12/11 16:10:13 florian
  612. + shifting for 64 bit ints added
  613. * bug in getexplicitregister32 fixed: usableregs wasn't decremented !!
  614. Revision 1.14 1998/12/11 00:03:59 peter
  615. + globtype,tokens,version unit splitted from globals
  616. Revision 1.13 1998/10/21 08:40:03 florian
  617. + ansistring operator +
  618. + $h and string[n] for n>255 added
  619. * small problem with TP fixed
  620. Revision 1.12 1998/09/20 17:11:24 jonas
  621. * released REGALLOC
  622. Revision 1.11 1998/09/16 17:58:33 jonas
  623. * fixed -dRegAlloc and -dDRegalloc problems
  624. Revision 1.10 1998/09/01 09:03:47 peter
  625. + resetregistercount, resetusableregisters
  626. Revision 1.9 1998/08/19 16:07:56 jonas
  627. * changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
  628. Revision 1.8 1998/08/10 14:50:34 peter
  629. + localswitches, moduleswitches, globalswitches splitting
  630. Revision 1.7 1998/06/08 13:13:47 pierre
  631. + temporary variables now in temp_gen.pas unit
  632. because it is processor independent
  633. * mppc68k.bat modified to undefine i386 and support_mmx
  634. (which are defaults for i386)
  635. Revision 1.6 1998/05/20 09:42:38 pierre
  636. + UseTokenInfo now default
  637. * unit in interface uses and implementation uses gives error now
  638. * only one error for unknown symbol (uses lastsymknown boolean)
  639. the problem came from the label code !
  640. + first inlined procedures and function work
  641. (warning there might be allowed cases were the result is still wrong !!)
  642. * UseBrower updated gives a global list of all position of all used symbols
  643. with switch -gb
  644. Revision 1.5 1998/05/11 13:07:58 peter
  645. + $ifdef NEWPPU for the new ppuformat
  646. + $define GDB not longer required
  647. * removed all warnings and stripped some log comments
  648. * no findfirst/findnext anymore to remove smartlink *.o files
  649. Revision 1.4 1998/04/29 10:34:08 pierre
  650. + added some code for ansistring (not complete nor working yet)
  651. * corrected operator overloading
  652. * corrected nasm output
  653. + started inline procedures
  654. + added starstarn : use ** for exponentiation (^ gave problems)
  655. + started UseTokenInfo cond to get accurate positions
  656. Revision 1.3 1998/04/09 22:16:36 florian
  657. * problem with previous REGALLOC solved
  658. * improved property support
  659. Revision 1.2 1998/04/09 15:46:39 florian
  660. + register allocation tracing stuff added
  661. }