ncgbas.pas 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. {
  2. $Id$
  3. Copyright (c) 2000-2002 by Florian Klaempfl
  4. This unit implements some basic nodes
  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 ncgbas;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. cpubase,
  23. node,nbas;
  24. type
  25. tcgnothingnode = class(tnothingnode)
  26. procedure pass_2;override;
  27. end;
  28. tcgasmnode = class(tasmnode)
  29. procedure pass_2;override;
  30. end;
  31. tcgstatementnode = class(tstatementnode)
  32. procedure pass_2;override;
  33. end;
  34. tcgblocknode = class(tblocknode)
  35. procedure pass_2;override;
  36. end;
  37. tcgtempcreatenode = class(ttempcreatenode)
  38. procedure pass_2;override;
  39. end;
  40. tcgtemprefnode = class(ttemprefnode)
  41. procedure pass_2;override;
  42. { Changes the location of this temp to ref. Useful when assigning }
  43. { another temp to this one. The current location will be freed. }
  44. { Can only be called in pass 2 (since earlier, the temp location }
  45. { isn't known yet) }
  46. procedure changelocation(const ref: treference);
  47. end;
  48. tcgtempdeletenode = class(ttempdeletenode)
  49. procedure pass_2;override;
  50. end;
  51. implementation
  52. uses
  53. globtype,systems,
  54. cutils,verbose,cpuinfo,
  55. aasmbase,aasmtai,aasmcpu,symsym,
  56. defutil,
  57. nflw,pass_2,
  58. cgbase,procinfo,cgobj,tgobj
  59. ;
  60. {*****************************************************************************
  61. TNOTHING
  62. *****************************************************************************}
  63. procedure tcgnothingnode.pass_2;
  64. begin
  65. location_reset(location,LOC_VOID,OS_NO);
  66. { avoid an abstract rte }
  67. end;
  68. {*****************************************************************************
  69. TSTATEMENTNODE
  70. *****************************************************************************}
  71. procedure tcgstatementnode.pass_2;
  72. var
  73. hp : tstatementnode;
  74. begin
  75. location_reset(location,LOC_VOID,OS_NO);
  76. hp:=self;
  77. while assigned(hp) do
  78. begin
  79. if assigned(hp.left) then
  80. begin
  81. secondpass(hp.left);
  82. { Compiler inserted blocks can return values }
  83. location_copy(hp.location,hp.left.location);
  84. end;
  85. hp:=tstatementnode(hp.right);
  86. end;
  87. end;
  88. {*****************************************************************************
  89. TASMNODE
  90. *****************************************************************************}
  91. procedure tcgasmnode.pass_2;
  92. procedure ReLabel(var p:tasmsymbol);
  93. begin
  94. { Only relabel local tasmlabels }
  95. if (p.defbind = AB_LOCAL) and
  96. (p is tasmlabel) then
  97. begin
  98. if not assigned(p.altsymbol) then
  99. objectlibrary.GenerateAltSymbol(p);
  100. p:=p.altsymbol;
  101. p.increfs;
  102. end;
  103. end;
  104. procedure ResolveRef(var op:toper);
  105. var
  106. sym : tvarsym;
  107. {$ifdef x86}
  108. scale : byte;
  109. {$endif x86}
  110. getoffset : boolean;
  111. indexreg : tregister;
  112. sofs : longint;
  113. begin
  114. if (op.typ=top_local) then
  115. begin
  116. sofs:=op.localsymofs;
  117. indexreg:=op.localindexreg;
  118. {$ifdef x86}
  119. scale:=op.localscale;
  120. {$endif x86}
  121. getoffset:=op.localgetoffset;
  122. sym:=tvarsym(pointer(op.localsym));
  123. case sym.localloc.loc of
  124. LOC_REFERENCE :
  125. begin
  126. if getoffset then
  127. begin
  128. if indexreg=NR_NO then
  129. begin
  130. op.typ:=top_const;
  131. op.val:=aword(sym.localloc.reference.offset+sofs);
  132. end
  133. else
  134. begin
  135. op.typ:=top_ref;
  136. new(op.ref);
  137. reference_reset_base(op.ref^,indexreg,
  138. sym.localloc.reference.offset+sofs);
  139. end;
  140. end
  141. else
  142. begin
  143. op.typ:=top_ref;
  144. new(op.ref);
  145. reference_reset_base(op.ref^,sym.localloc.reference.index,
  146. sym.localloc.reference.offset+sofs);
  147. op.ref^.index:=indexreg;
  148. {$ifdef x86}
  149. op.ref^.scalefactor:=scale;
  150. {$endif x86}
  151. end;
  152. end;
  153. LOC_REGISTER :
  154. begin
  155. if getoffset then
  156. Message(asmr_e_invalid_reference_syntax);
  157. { Subscribed access }
  158. if sofs<>0 then
  159. begin
  160. op.typ:=top_ref;
  161. new(op.ref);
  162. reference_reset_base(op.ref^,sym.localloc.register,sofs);
  163. end
  164. else
  165. begin
  166. op.typ:=top_reg;
  167. op.reg:=sym.localloc.register;
  168. end;
  169. end;
  170. end;
  171. end;
  172. end;
  173. var
  174. hp,hp2 : tai;
  175. i : longint;
  176. skipnode : boolean;
  177. begin
  178. location_reset(location,LOC_VOID,OS_NO);
  179. if getposition then
  180. begin
  181. { Add a marker, to be sure the list is not empty }
  182. exprasmlist.concat(tai_marker.create(marker_position));
  183. currenttai:=tai(exprasmlist.last);
  184. exit;
  185. end;
  186. { Allocate registers used in the assembler block }
  187. cg.allocexplicitregisters(exprasmlist,R_INTREGISTER,used_regs_int);
  188. if (current_procinfo.procdef.proccalloption=pocall_inline) then
  189. begin
  190. objectlibrary.CreateUsedAsmSymbolList;
  191. hp:=tai(p_asm.first);
  192. while assigned(hp) do
  193. begin
  194. hp2:=tai(hp.getcopy);
  195. skipnode:=false;
  196. case hp2.typ of
  197. ait_label :
  198. ReLabel(tasmsymbol(tai_label(hp2).l));
  199. ait_const_rva,
  200. ait_const_symbol :
  201. ReLabel(tai_const_symbol(hp2).sym);
  202. ait_instruction :
  203. begin
  204. { remove cached insentry, because the new code can
  205. require an other less optimized instruction }
  206. {$ifdef i386}
  207. {$ifndef NOAG386BIN}
  208. taicpu(hp2).ResetPass1;
  209. {$endif}
  210. {$endif}
  211. { fixup the references }
  212. for i:=1 to taicpu(hp2).ops do
  213. begin
  214. ResolveRef(taicpu(hp2).oper[i-1]^);
  215. with taicpu(hp2).oper[i-1]^ do
  216. begin
  217. case typ of
  218. top_ref :
  219. if assigned(ref^.symbol) then
  220. ReLabel(ref^.symbol);
  221. top_symbol :
  222. ReLabel(sym);
  223. end;
  224. end;
  225. end;
  226. end;
  227. ait_marker :
  228. begin
  229. { it's not an assembler block anymore }
  230. if (tai_marker(hp2).kind in [AsmBlockStart, AsmBlockEnd]) then
  231. skipnode:=true;
  232. end;
  233. end;
  234. if not skipnode then
  235. exprasmList.concat(hp2)
  236. else
  237. hp2.free;
  238. hp:=tai(hp.next);
  239. end;
  240. { restore used symbols }
  241. objectlibrary.UsedAsmSymbolListResetAltSym;
  242. objectlibrary.DestroyUsedAsmSymbolList;
  243. end
  244. else
  245. begin
  246. hp:=tai(p_asm.first);
  247. while assigned(hp) do
  248. begin
  249. case hp.typ of
  250. ait_instruction :
  251. begin
  252. { remove cached insentry, because the new code can
  253. require an other less optimized instruction }
  254. {$ifdef i386}
  255. {$ifndef NOAG386BIN}
  256. taicpu(hp).ResetPass1;
  257. {$endif}
  258. {$endif}
  259. { fixup the references }
  260. for i:=1 to taicpu(hp).ops do
  261. ResolveRef(taicpu(hp).oper[i-1]^);
  262. end;
  263. end;
  264. hp:=tai(hp.next);
  265. end;
  266. { insert the list }
  267. exprasmList.concatlist(p_asm);
  268. end;
  269. { Release register used in the assembler block }
  270. cg.deallocexplicitregisters(exprasmlist,R_INTREGISTER,used_regs_int);
  271. end;
  272. {*****************************************************************************
  273. TBLOCKNODE
  274. *****************************************************************************}
  275. procedure tcgblocknode.pass_2;
  276. var
  277. hp : tstatementnode;
  278. begin
  279. location_reset(location,LOC_VOID,OS_NO);
  280. { do second pass on left node }
  281. if assigned(left) then
  282. begin
  283. hp:=tstatementnode(left);
  284. while assigned(hp) do
  285. begin
  286. if assigned(hp.left) then
  287. begin
  288. secondpass(hp.left);
  289. location_copy(hp.location,hp.left.location);
  290. end;
  291. location_copy(location,hp.location);
  292. hp:=tstatementnode(hp.right);
  293. end;
  294. end;
  295. end;
  296. {*****************************************************************************
  297. TTEMPCREATENODE
  298. *****************************************************************************}
  299. procedure tcgtempcreatenode.pass_2;
  300. var
  301. cgsize: tcgsize;
  302. begin
  303. location_reset(location,LOC_VOID,OS_NO);
  304. { if we're secondpassing the same tcgtempcreatenode twice, we have a bug }
  305. if tempinfo^.valid then
  306. internalerror(200108222);
  307. { get a (persistent) temp }
  308. if tempinfo^.restype.def.needs_inittable then
  309. begin
  310. tg.GetTempTyped(exprasmlist,tempinfo^.restype.def,tempinfo^.temptype,tempinfo^.loc.ref);
  311. tempinfo^.loc.loc := LOC_REFERENCE;
  312. end
  313. else if may_be_in_reg then
  314. begin
  315. cgsize := def_cgsize(tempinfo^.restype.def);
  316. if (TCGSize2Size[cgsize]>TCGSize2Size[OS_INT]) then
  317. internalerror(2004020202);
  318. tempinfo^.loc.reg := cg.getintregister(exprasmlist,cgsize);
  319. if (tempinfo^.temptype = tt_persistent) then
  320. begin
  321. { !!tell rgobj this register is now a regvar, so it can't be freed!! }
  322. tempinfo^.loc.loc := LOC_CREGISTER
  323. end
  324. else
  325. tempinfo^.loc.loc := LOC_REGISTER;
  326. end
  327. else
  328. begin
  329. tg.GetTemp(exprasmlist,size,tempinfo^.temptype,tempinfo^.loc.ref);
  330. tempinfo^.loc.loc := LOC_REFERENCE;
  331. end;
  332. tempinfo^.valid := true;
  333. end;
  334. {*****************************************************************************
  335. TTEMPREFNODE
  336. *****************************************************************************}
  337. procedure tcgtemprefnode.pass_2;
  338. begin
  339. { check if the temp is valid }
  340. if not tempinfo^.valid then
  341. internalerror(200108231);
  342. case tempinfo^.loc.loc of
  343. LOC_REFERENCE:
  344. begin
  345. { set the temp's location }
  346. location_reset(location,LOC_REFERENCE,def_cgsize(tempinfo^.restype.def));
  347. location.reference := tempinfo^.loc.ref;
  348. inc(location.reference.offset,offset);
  349. end;
  350. LOC_REGISTER,
  351. LOC_CREGISTER:
  352. begin
  353. if offset <> 0 then
  354. internalerror(2004020205);
  355. { LOC_CREGISTER, not LOC_REGISTER, otherwise we can't assign anything to it }
  356. location_reset(location,tempinfo^.loc.loc,def_cgsize(tempinfo^.restype.def));
  357. location.register := tempinfo^.loc.reg;
  358. end;
  359. else
  360. internalerror(2004020204);
  361. end;
  362. end;
  363. procedure tcgtemprefnode.changelocation(const ref: treference);
  364. begin
  365. { check if the temp is valid }
  366. if not tempinfo^.valid then
  367. internalerror(200306081);
  368. if (tempinfo^.loc.loc = LOC_REGISTER) then
  369. internalerror(2004020203);
  370. if (tempinfo^.temptype = tt_persistent) then
  371. tg.ChangeTempType(exprasmlist,tempinfo^.loc.ref,tt_normal);
  372. tg.ungettemp(exprasmlist,tempinfo^.loc.ref);
  373. tempinfo^.loc.ref := ref;
  374. tg.ChangeTempType(exprasmlist,tempinfo^.loc.ref,tempinfo^.temptype);
  375. { adapt location }
  376. location.reference := ref;
  377. inc(location.reference.offset,offset);
  378. end;
  379. {*****************************************************************************
  380. TTEMPDELETENODE
  381. *****************************************************************************}
  382. procedure tcgtempdeletenode.pass_2;
  383. begin
  384. location_reset(location,LOC_VOID,OS_NO);
  385. case tempinfo^.loc.loc of
  386. LOC_REFERENCE:
  387. begin
  388. if release_to_normal then
  389. tg.ChangeTempType(exprasmlist,tempinfo^.loc.ref,tt_normal)
  390. else
  391. tg.UnGetTemp(exprasmlist,tempinfo^.loc.ref);
  392. end;
  393. LOC_CREGISTER,
  394. LOC_REGISTER:
  395. begin
  396. { make sure the register allocator doesn't reuse the }
  397. { register e.g. in the middle of a loop }
  398. cg.a_load_reg_reg(exprasmlist,OS_INT,OS_INT,tempinfo^.loc.reg,
  399. tempinfo^.loc.reg);
  400. if release_to_normal then
  401. tempinfo^.loc.loc := LOC_REGISTER
  402. else
  403. { !!tell rgobj this register is no longer a regvar!! }
  404. cg.ungetregister(exprasmlist,tempinfo^.loc.reg);
  405. end;
  406. end;
  407. end;
  408. begin
  409. cnothingnode:=tcgnothingnode;
  410. casmnode:=tcgasmnode;
  411. cstatementnode:=tcgstatementnode;
  412. cblocknode:=tcgblocknode;
  413. ctempcreatenode:=tcgtempcreatenode;
  414. ctemprefnode:=tcgtemprefnode;
  415. ctempdeletenode:=tcgtempdeletenode;
  416. end.
  417. {
  418. $Log$
  419. Revision 1.55 2004-02-04 18:45:29 jonas
  420. + some more usage of register temps
  421. Revision 1.54 2004/02/03 19:48:06 jonas
  422. * fixed and re-enabled temps in registers
  423. Revision 1.53 2004/02/03 17:55:50 jonas
  424. * cleanup
  425. Revision 1.52 2004/02/03 16:46:51 jonas
  426. + support to store ttempcreate/ref/deletenodes in registers
  427. * put temps for withnodes and some newnodes in registers
  428. Note: this currently only works because calling ungetregister()
  429. multiple times for the same register doesn't matter. We need again
  430. a way to specify that a register is currently a regvar and as such
  431. should not be freed when you call ungetregister() on it.
  432. Revision 1.51 2003/11/07 15:58:32 florian
  433. * Florian's culmutative nr. 1; contains:
  434. - invalid calling conventions for a certain cpu are rejected
  435. - arm softfloat calling conventions
  436. - -Sp for cpu dependend code generation
  437. - several arm fixes
  438. - remaining code for value open array paras on heap
  439. Revision 1.50 2003/11/04 15:35:13 peter
  440. * fix for referencecounted temps
  441. Revision 1.49 2003/11/02 13:30:05 jonas
  442. * fixed ppc compilation
  443. Revision 1.48 2003/10/30 19:59:00 peter
  444. * support scalefactor for opr_local
  445. * support reference with opr_local set, fixes tw2631
  446. Revision 1.47 2003/10/29 15:40:20 peter
  447. * support indexing and offset retrieval for locals
  448. Revision 1.46 2003/10/24 17:39:41 peter
  449. * asmnode.get_position now inserts a marker
  450. Revision 1.45 2003/10/21 15:15:36 peter
  451. * taicpu_abstract.oper[] changed to pointers
  452. Revision 1.44 2003/10/10 17:48:13 peter
  453. * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
  454. * tregisteralloctor renamed to trgobj
  455. * removed rgobj from a lot of units
  456. * moved location_* and reference_* to cgobj
  457. * first things for mmx register allocation
  458. Revision 1.43 2003/10/09 21:31:37 daniel
  459. * Register allocator splitted, ans abstract now
  460. Revision 1.42 2003/10/07 18:18:16 peter
  461. * fix register calling for assembler procedures
  462. * fix result loading for assembler procedures
  463. Revision 1.41 2003/10/01 20:34:48 peter
  464. * procinfo unit contains tprocinfo
  465. * cginfo renamed to cgbase
  466. * moved cgmessage to verbose
  467. * fixed ppc and sparc compiles
  468. Revision 1.40 2003/09/23 17:56:05 peter
  469. * locals and paras are allocated in the code generation
  470. * tvarsym.localloc contains the location of para/local when
  471. generating code for the current procedure
  472. Revision 1.39 2003/09/07 22:09:35 peter
  473. * preparations for different default calling conventions
  474. * various RA fixes
  475. Revision 1.38 2003/09/03 15:55:00 peter
  476. * NEWRA branch merged
  477. Revision 1.37.2.1 2003/08/27 20:23:55 peter
  478. * remove old ra code
  479. Revision 1.37 2003/06/13 21:19:30 peter
  480. * current_procdef removed, use current_procinfo.procdef instead
  481. Revision 1.36 2003/06/09 18:26:46 peter
  482. * remove temptype, use tempinfo.temptype instead
  483. Revision 1.35 2003/06/09 12:20:47 peter
  484. * getposition added to retrieve the the current tai item
  485. Revision 1.34 2003/05/17 13:30:08 jonas
  486. * changed tt_persistant to tt_persistent :)
  487. * tempcreatenode now doesn't accept a boolean anymore for persistent
  488. temps, but a ttemptype, so you can also create ansistring temps etc
  489. Revision 1.33 2003/04/27 11:21:33 peter
  490. * aktprocdef renamed to current_procinfo.procdef
  491. * procinfo renamed to current_procinfo
  492. * procinfo will now be stored in current_module so it can be
  493. cleaned up properly
  494. * gen_main_procsym changed to create_main_proc and release_main_proc
  495. to also generate a tprocinfo structure
  496. * fixed unit implicit initfinal
  497. Revision 1.32 2002/04/25 20:15:39 florian
  498. * block nodes within expressions shouldn't release the used registers,
  499. fixed using a flag till the new rg is ready
  500. Revision 1.31 2003/04/22 23:50:22 peter
  501. * firstpass uses expectloc
  502. * checks if there are differences between the expectloc and
  503. location.loc from secondpass in EXTDEBUG
  504. Revision 1.30 2003/04/17 07:50:24 daniel
  505. * Some work on interference graph construction
  506. Revision 1.29 2003/03/28 19:16:56 peter
  507. * generic constructor working for i386
  508. * remove fixed self register
  509. * esi added as address register for i386
  510. Revision 1.28 2002/11/27 15:33:19 peter
  511. * fixed relabeling to relabel only tasmlabel (formerly proclocal)
  512. Revision 1.27 2002/11/27 02:37:13 peter
  513. * case statement inlining added
  514. * fixed inlining of write()
  515. * switched statementnode left and right parts so the statements are
  516. processed in the correct order when getcopy is used. This is
  517. required for tempnodes
  518. Revision 1.26 2002/11/17 16:31:56 carl
  519. * memory optimization (3-4%) : cleanup of tai fields,
  520. cleanup of tdef and tsym fields.
  521. * make it work for m68k
  522. Revision 1.25 2002/11/15 16:29:30 peter
  523. * made tasmsymbol.refs private (merged)
  524. Revision 1.24 2002/11/15 01:58:51 peter
  525. * merged changes from 1.0.7 up to 04-11
  526. - -V option for generating bug report tracing
  527. - more tracing for option parsing
  528. - errors for cdecl and high()
  529. - win32 import stabs
  530. - win32 records<=8 are returned in eax:edx (turned off by default)
  531. - heaptrc update
  532. - more info for temp management in .s file with EXTDEBUG
  533. Revision 1.23 2002/08/23 16:14:48 peter
  534. * tempgen cleanup
  535. * tt_noreuse temp type added that will be used in genentrycode
  536. Revision 1.22 2002/08/11 14:32:26 peter
  537. * renamed current_library to objectlibrary
  538. Revision 1.21 2002/08/11 13:24:11 peter
  539. * saving of asmsymbols in ppu supported
  540. * asmsymbollist global is removed and moved into a new class
  541. tasmlibrarydata that will hold the info of a .a file which
  542. corresponds with a single module. Added librarydata to tmodule
  543. to keep the library info stored for the module. In the future the
  544. objectfiles will also be stored to the tasmlibrarydata class
  545. * all getlabel/newasmsymbol and friends are moved to the new class
  546. Revision 1.20 2002/07/01 18:46:22 peter
  547. * internal linker
  548. * reorganized aasm layer
  549. Revision 1.19 2002/05/18 13:34:09 peter
  550. * readded missing revisions
  551. Revision 1.18 2002/05/16 19:46:37 carl
  552. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  553. + try to fix temp allocation (still in ifdef)
  554. + generic constructor calls
  555. + start of tassembler / tmodulebase class cleanup
  556. Revision 1.16 2002/05/13 19:54:37 peter
  557. * removed n386ld and n386util units
  558. * maybe_save/maybe_restore added instead of the old maybe_push
  559. Revision 1.15 2002/05/12 16:53:07 peter
  560. * moved entry and exitcode to ncgutil and cgobj
  561. * foreach gets extra argument for passing local data to the
  562. iterator function
  563. * -CR checks also class typecasts at runtime by changing them
  564. into as
  565. * fixed compiler to cycle with the -CR option
  566. * fixed stabs with elf writer, finally the global variables can
  567. be watched
  568. * removed a lot of routines from cga unit and replaced them by
  569. calls to cgobj
  570. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  571. u32bit then the other is typecasted also to u32bit without giving
  572. a rangecheck warning/error.
  573. * fixed pascal calling method with reversing also the high tree in
  574. the parast, detected by tcalcst3 test
  575. Revision 1.14 2002/04/23 19:16:34 peter
  576. * add pinline unit that inserts compiler supported functions using
  577. one or more statements
  578. * moved finalize and setlength from ninl to pinline
  579. Revision 1.13 2002/04/21 19:02:03 peter
  580. * removed newn and disposen nodes, the code is now directly
  581. inlined from pexpr
  582. * -an option that will write the secondpass nodes to the .s file, this
  583. requires EXTDEBUG define to actually write the info
  584. * fixed various internal errors and crashes due recent code changes
  585. Revision 1.12 2002/04/04 19:05:57 peter
  586. * removed unused units
  587. * use tlocation.size in cg.a_*loc*() routines
  588. Revision 1.11 2002/03/31 20:26:34 jonas
  589. + a_loadfpu_* and a_loadmm_* methods in tcg
  590. * register allocation is now handled by a class and is mostly processor
  591. independent (+rgobj.pas and i386/rgcpu.pas)
  592. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  593. * some small improvements and fixes to the optimizer
  594. * some register allocation fixes
  595. * some fpuvaroffset fixes in the unary minus node
  596. * push/popusedregisters is now called rg.save/restoreusedregisters and
  597. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  598. also better optimizable)
  599. * fixed and optimized register saving/restoring for new/dispose nodes
  600. * LOC_FPU locations now also require their "register" field to be set to
  601. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  602. - list field removed of the tnode class because it's not used currently
  603. and can cause hard-to-find bugs
  604. }