regvars.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. {
  2. $Id$
  3. Copyright (c) 1998-2000 by Florian Klaempfl and Jonas Maebe
  4. This unit handles register variable allocation
  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 regvars;
  19. {$i defines.inc}
  20. interface
  21. uses
  22. aasm,
  23. node,
  24. symsym,
  25. cpubase, cginfo, tgobj, rgobj;
  26. procedure assign_regvars(p: tnode);
  27. procedure load_regvars(asml: TAAsmoutput; p: tnode);
  28. procedure cleanup_regvars(asml: TAAsmoutput);
  29. procedure store_regvar(asml: TAAsmoutput; reg: tregister);
  30. procedure load_regvar(asml: TAAsmoutput; vsym: tvarsym);
  31. procedure load_regvar_reg(asml: TAAsmoutput; reg: tregister);
  32. procedure load_all_regvars(asml: TAAsmoutput);
  33. procedure sync_regvars(list1, list2: taasmoutput; const regvarsloaded1,
  34. regvarsloaded2: regvar_booleanarray);
  35. implementation
  36. uses
  37. globtype,systems,comphook,
  38. cutils,cclasses,verbose,globals,
  39. symconst,symbase,symtype,symdef,types,
  40. tainst,cgbase,cpuasm,cgobj,cgcpu,cga,rgcpu;
  41. var
  42. parasym : boolean;
  43. {$ifndef i386}
  44. function makereg32(const reg: tregister): tregister;
  45. begin
  46. makereg32 := reg;
  47. end;
  48. {$endif i386}
  49. procedure searchregvars(p : tnamedindexitem);
  50. var
  51. i,j,k : longint;
  52. begin
  53. if (tsym(p).typ=varsym) and (vo_regable in tvarsym(p).varoptions) then
  54. begin
  55. j:=tvarsym(p).refs;
  56. { parameter get a less value }
  57. if parasym then
  58. begin
  59. if cs_littlesize in aktglobalswitches then
  60. dec(j,1)
  61. else
  62. dec(j,100);
  63. end;
  64. { walk through all momentary register variables }
  65. for i:=1 to maxvarregs do
  66. begin
  67. with pregvarinfo(aktprocdef.regvarinfo)^ do
  68. if ((regvars[i]=nil) or (j>regvars_refs[i])) and (j>0) then
  69. begin
  70. for k:=maxvarregs-1 downto i do
  71. begin
  72. regvars[k+1]:=regvars[k];
  73. regvars_para[k+1]:=regvars_para[k];
  74. regvars_refs[k+1]:=regvars_refs[k];
  75. end;
  76. { calc the new refs
  77. tvarsym(p).refs:=j; }
  78. regvars[i]:=tvarsym(p);
  79. regvars_para[i]:=parasym;
  80. regvars_refs[i]:=j;
  81. break;
  82. end;
  83. end;
  84. end;
  85. end;
  86. procedure searchfpuregvars(p : tnamedindexitem);
  87. var
  88. i,j,k : longint;
  89. begin
  90. if (tsym(p).typ=varsym) and (vo_fpuregable in tvarsym(p).varoptions) then
  91. begin
  92. j:=tvarsym(p).refs;
  93. { parameter get a less value }
  94. if parasym then
  95. begin
  96. if cs_littlesize in aktglobalswitches then
  97. dec(j,1)
  98. else
  99. dec(j,100);
  100. end;
  101. { walk through all momentary register variables }
  102. for i:=1 to maxfpuvarregs do
  103. begin
  104. with pregvarinfo(aktprocdef.regvarinfo)^ do
  105. if ((fpuregvars[i]=nil) or (j>fpuregvars_refs[i])) and (j>0) then
  106. begin
  107. for k:=maxfpuvarregs-1 downto i do
  108. begin
  109. fpuregvars[k+1]:=fpuregvars[k];
  110. fpuregvars_para[k+1]:=fpuregvars_para[k];
  111. fpuregvars_refs[k+1]:=fpuregvars_refs[k];
  112. end;
  113. { calc the new refs
  114. tvarsym(p).refs:=j; }
  115. fpuregvars[i]:=tvarsym(p);
  116. fpuregvars_para[i]:=parasym;
  117. fpuregvars_refs[i]:=j;
  118. break;
  119. end;
  120. end;
  121. end;
  122. end;
  123. procedure assign_regvars(p: tnode);
  124. { register variables }
  125. var
  126. regvarinfo: pregvarinfo;
  127. i: longint;
  128. begin
  129. { max. optimizations }
  130. { only if no asm is used }
  131. { and no try statement }
  132. if (cs_regalloc in aktglobalswitches) and
  133. ((procinfo^.flags and (pi_uses_asm or pi_uses_exceptions))=0) then
  134. begin
  135. new(regvarinfo);
  136. fillchar(regvarinfo^,sizeof(regvarinfo^),0);
  137. aktprocdef.regvarinfo := regvarinfo;
  138. if (p.registers32<4) then
  139. begin
  140. parasym:=false;
  141. symtablestack.foreach_static({$ifdef FPCPROCVAR}@{$endif}searchregvars);
  142. { copy parameter into a register ? }
  143. parasym:=true;
  144. symtablestack.next.foreach_static({$ifdef FPCPROCVAR}@{$endif}searchregvars);
  145. { hold needed registers free }
  146. for i:=maxvarregs downto maxvarregs-p.registers32+1 do
  147. begin
  148. regvarinfo^.regvars[i]:=nil;
  149. regvarinfo^.regvars_para[i] := false;
  150. end;
  151. { now assign register }
  152. for i:=1 to maxvarregs-p.registers32 do
  153. begin
  154. if assigned(regvarinfo^.regvars[i]) and
  155. (rg.reg_pushes[varregs[i]] < regvarinfo^.regvars[i].refs) then
  156. begin
  157. { register is no longer available for }
  158. { expressions }
  159. { search the register which is the most }
  160. { unused }
  161. rg.makeregvar(varregs[i]);
  162. { possibly no 32 bit register are needed }
  163. { call by reference/const ? }
  164. if (regvarinfo^.regvars[i].varspez in [vs_var,vs_out]) or
  165. ((regvarinfo^.regvars[i].varspez=vs_const) and
  166. push_addr_param(regvarinfo^.regvars[i].vartype.def)) then
  167. begin
  168. regvarinfo^.regvars[i].reg:=varregs[i];
  169. end
  170. else
  171. {$ifdef i386}
  172. if (regvarinfo^.regvars[i].vartype.def.deftype in [orddef,enumdef]) and
  173. (torddef(regvarinfo^.regvars[i].vartype.def).size=1) then
  174. begin
  175. regvarinfo^.regvars[i].reg:=reg32toreg8(varregs[i]);
  176. end
  177. else
  178. if (regvarinfo^.regvars[i].vartype.def.deftype in [orddef,enumdef]) and
  179. (torddef(regvarinfo^.regvars[i].vartype.def).size=2) then
  180. begin
  181. regvarinfo^.regvars[i].reg:=reg32toreg16(varregs[i]);
  182. end
  183. else
  184. {$endif i386}
  185. begin
  186. regvarinfo^.regvars[i].reg:=varregs[i];
  187. end;
  188. { procedure uses this register }
  189. include(rg.usedinproc,varregs[i]);
  190. end
  191. else
  192. begin
  193. regvarinfo^.regvars[i] := nil;
  194. regvarinfo^.regvars_para[i] := false;
  195. end;
  196. end;
  197. end;
  198. if ((p.registersfpu+1)<maxfpuvarregs) then
  199. begin
  200. parasym:=false;
  201. symtablestack.foreach_static({$ifdef FPCPROCVAR}@{$endif}searchfpuregvars);
  202. {$ifdef dummy}
  203. { copy parameter into a register ? }
  204. parasym:=true;
  205. symtablestack.next.foreach_static({$ifdef FPCPROCVAR}@{$endif}searchregvars);
  206. {$endif dummy}
  207. { hold needed registers free }
  208. { in non leaf procedures we must be very careful }
  209. { with assigning registers }
  210. if aktmaxfpuregisters=-1 then
  211. begin
  212. if (procinfo^.flags and pi_do_call)<>0 then
  213. begin
  214. for i:=maxfpuvarregs downto 2 do
  215. regvarinfo^.fpuregvars[i]:=nil;
  216. end
  217. else
  218. begin
  219. for i:=maxfpuvarregs downto maxfpuvarregs-p.registersfpu do
  220. regvarinfo^.fpuregvars[i]:=nil;
  221. end;
  222. end
  223. else
  224. begin
  225. for i:=aktmaxfpuregisters+1 to maxfpuvarregs do
  226. regvarinfo^.fpuregvars[i]:=nil;
  227. end;
  228. { now assign register }
  229. for i:=1 to maxfpuvarregs do
  230. begin
  231. if assigned(regvarinfo^.fpuregvars[i]) then
  232. begin
  233. {$ifdef i386}
  234. { reserve place on the FPU stack }
  235. regvarinfo^.fpuregvars[i].reg:=trgcpu(rg).correct_fpuregister(R_ST0,i);
  236. {$else i386}
  237. rg.makeregvar(regvarinfo^.fpuregvars[i].reg);
  238. {$endif i386}
  239. end;
  240. end;
  241. end;
  242. end;
  243. end;
  244. procedure store_regvar(asml: TAAsmoutput; reg: tregister);
  245. var
  246. i: longint;
  247. hr: treference;
  248. regvarinfo: pregvarinfo;
  249. vsym: tvarsym;
  250. begin
  251. regvarinfo := pregvarinfo(aktprocdef.regvarinfo);
  252. if not assigned(regvarinfo) then
  253. exit;
  254. for i := 1 to maxvarregs do
  255. if assigned(regvarinfo^.regvars[i]) and
  256. (makereg32(regvarinfo^.regvars[i].reg) = reg) then
  257. begin
  258. if rg.regvar_loaded[makereg32(reg)] then
  259. begin
  260. vsym := tvarsym(regvarinfo^.regvars[i]);
  261. { we only have to store the regvar back to memory if it's }
  262. { possible that it's been modified (JM) }
  263. if not(vsym.varspez in [vs_const,vs_var,vs_out]) then
  264. begin
  265. reference_reset(hr);
  266. if vsym.owner.symtabletype in [inlinelocalsymtable,localsymtable] then
  267. hr.offset:=-vsym.address+vsym.owner.address_fixup
  268. else hr.offset:=vsym.address+vsym.owner.address_fixup;
  269. hr.base:=procinfo^.framepointer;
  270. cg.a_load_reg_ref(asml,def_cgsize(vsym.vartype.def),vsym.reg,hr);
  271. end;
  272. asml.concat(Tairegalloc.dealloc(makereg32(reg)));
  273. rg.regvar_loaded[makereg32(reg)] := false;
  274. end;
  275. break;
  276. end;
  277. end;
  278. procedure load_regvar(asml: TAAsmoutput; vsym: tvarsym);
  279. var
  280. hr: treference;
  281. opsize: tcgsize;
  282. begin
  283. if not rg.regvar_loaded[makereg32(vsym.reg)] then
  284. begin
  285. asml.concat(Tairegalloc.alloc(makereg32(vsym.reg)));
  286. reference_reset(hr);
  287. if vsym.owner.symtabletype in [inlinelocalsymtable,localsymtable] then
  288. hr.offset:=-vsym.address+vsym.owner.address_fixup
  289. else hr.offset:=vsym.address+vsym.owner.address_fixup;
  290. hr.base:=procinfo^.framepointer;
  291. if (vsym.varspez in [vs_var,vs_out]) or
  292. ((vsym.varspez=vs_const) and
  293. push_addr_param(vsym.vartype.def)) then
  294. opsize := OS_ADDR
  295. else
  296. opsize := def_cgsize(vsym.vartype.def);
  297. cg.a_load_ref_reg(asml,opsize,hr,makereg32(vsym.reg));
  298. rg.regvar_loaded[makereg32(vsym.reg)] := true;
  299. end;
  300. end;
  301. procedure load_regvar_reg(asml: TAAsmoutput; reg: tregister);
  302. var
  303. i: longint;
  304. regvarinfo: pregvarinfo;
  305. begin
  306. regvarinfo := pregvarinfo(aktprocdef.regvarinfo);
  307. if not assigned(regvarinfo) then
  308. exit;
  309. reg := makereg32(reg);
  310. for i := 1 to maxvarregs do
  311. if assigned(regvarinfo^.regvars[i]) and
  312. (makereg32(regvarinfo^.regvars[i].reg) = reg) then
  313. load_regvar(asml,tvarsym(regvarinfo^.regvars[i]))
  314. end;
  315. procedure load_all_regvars(asml: TAAsmoutput);
  316. var
  317. i: longint;
  318. regvarinfo: pregvarinfo;
  319. begin
  320. regvarinfo := pregvarinfo(aktprocdef.regvarinfo);
  321. if not assigned(regvarinfo) then
  322. exit;
  323. for i := 1 to maxvarregs do
  324. if assigned(regvarinfo^.regvars[i]) {and
  325. (makereg32(regvarinfo^.regvars[i].reg) in [R_EAX,R_EBX,R_ECX,R_EDX])} then
  326. load_regvar(asml,tvarsym(regvarinfo^.regvars[i]))
  327. end;
  328. procedure load_regvars(asml: TAAsmoutput; p: tnode);
  329. var
  330. i: longint;
  331. regvarinfo: pregvarinfo;
  332. begin
  333. if (cs_regalloc in aktglobalswitches) and
  334. ((procinfo^.flags and (pi_uses_asm or pi_uses_exceptions))=0) then
  335. begin
  336. regvarinfo := pregvarinfo(aktprocdef.regvarinfo);
  337. { can happen when inlining assembler procedures (JM) }
  338. if not assigned(regvarinfo) then
  339. exit;
  340. for i:=1 to maxvarregs do
  341. begin
  342. if assigned(regvarinfo^.regvars[i]) then
  343. begin
  344. if cs_asm_source in aktglobalswitches then
  345. asml.insert(Tai_asm_comment.Create(strpnew(regvarinfo^.regvars[i].name+
  346. ' with weight '+tostr(regvarinfo^.regvars[i].refs)+' assigned to register '+
  347. reg2str(regvarinfo^.regvars[i].reg))));
  348. if (status.verbosity and v_debug)=v_debug then
  349. Message3(cg_d_register_weight,reg2str(regvarinfo^.regvars[i].reg),
  350. tostr(regvarinfo^.regvars[i].refs),regvarinfo^.regvars[i].name);
  351. end;
  352. end;
  353. for i:=1 to maxfpuvarregs do
  354. begin
  355. if assigned(regvarinfo^.fpuregvars[i]) then
  356. begin
  357. {$ifdef i386}
  358. { reserve place on the FPU stack }
  359. regvarinfo^.fpuregvars[i].reg:=trgcpu(rg).correct_fpuregister(R_ST0,i-1);
  360. asml.concat(Taicpu.op_none(A_FLDZ,S_NO));
  361. {$endif i386}
  362. end;
  363. end;
  364. {$ifdef i386}
  365. if assigned(p) then
  366. if cs_asm_source in aktglobalswitches then
  367. asml.insert(Tai_asm_comment.Create(strpnew(tostr(p.registersfpu)+
  368. ' registers on FPU stack used by temp. expressions')));
  369. {$endif i386}
  370. for i:=1 to maxfpuvarregs do
  371. begin
  372. if assigned(regvarinfo^.fpuregvars[i]) then
  373. begin
  374. if cs_asm_source in aktglobalswitches then
  375. asml.insert(Tai_asm_comment.Create(strpnew(regvarinfo^.fpuregvars[i].name+
  376. ' with weight '+tostr(regvarinfo^.fpuregvars[i].refs)+' assigned to register '+
  377. reg2str(regvarinfo^.fpuregvars[i].reg))));
  378. if (status.verbosity and v_debug)=v_debug then
  379. Message3(cg_d_register_weight,reg2str(regvarinfo^.fpuregvars[i].reg),
  380. tostr(regvarinfo^.fpuregvars[i].refs),regvarinfo^.fpuregvars[i].name);
  381. end;
  382. end;
  383. if cs_asm_source in aktglobalswitches then
  384. asml.insert(Tai_asm_comment.Create(strpnew('Register variable assignment:')));
  385. end;
  386. end;
  387. procedure sync_regvars(list1, list2: taasmoutput; const regvarsloaded1,
  388. regvarsloaded2: regvar_booleanarray);
  389. var
  390. counter: tregister;
  391. begin
  392. for counter := low(rg.regvar_loaded) to high(rg.regvar_loaded) do
  393. begin
  394. rg.regvar_loaded[counter] := regvarsloaded1[counter] and
  395. regvarsloaded2[counter];
  396. if regvarsloaded1[counter] xor regvarsloaded2[counter] then
  397. if regvarsloaded1[counter] then
  398. load_regvar_reg(list2,counter)
  399. else
  400. load_regvar_reg(list1,counter);
  401. end;
  402. end;
  403. procedure cleanup_regvars(asml: TAAsmoutput);
  404. var
  405. i: longint;
  406. begin
  407. { can happen when inlining assembler procedures (JM) }
  408. if not assigned(aktprocdef.regvarinfo) then
  409. exit;
  410. if (cs_regalloc in aktglobalswitches) and
  411. ((procinfo^.flags and (pi_uses_asm or pi_uses_exceptions))=0) then
  412. with pregvarinfo(aktprocdef.regvarinfo)^ do
  413. begin
  414. {$ifdef i386}
  415. for i:=1 to maxfpuvarregs do
  416. if assigned(fpuregvars[i]) then
  417. { ... and clean it up }
  418. asml.concat(Taicpu.op_reg(A_FSTP,S_NO,R_ST0));
  419. {$endif i386}
  420. for i := 1 to maxvarregs do
  421. if assigned(regvars[i]) and
  422. (rg.regvar_loaded[makereg32(regvars[i].reg)]) then
  423. asml.concat(Tairegalloc.dealloc(makereg32(regvars[i].reg)));
  424. end;
  425. end;
  426. end.
  427. {
  428. $Log$
  429. Revision 1.25 2002-04-06 18:13:01 jonas
  430. * several powerpc-related additions and fixes
  431. Revision 1.24 2002/04/02 17:11:29 peter
  432. * tlocation,treference update
  433. * LOC_CONSTANT added for better constant handling
  434. * secondadd splitted in multiple routines
  435. * location_force_reg added for loading a location to a register
  436. of a specified size
  437. * secondassignment parses now first the right and then the left node
  438. (this is compatible with Kylix). This saves a lot of push/pop especially
  439. with string operations
  440. * adapted some routines to use the new cg methods
  441. Revision 1.23 2002/03/31 20:26:36 jonas
  442. + a_loadfpu_* and a_loadmm_* methods in tcg
  443. * register allocation is now handled by a class and is mostly processor
  444. independent (+rgobj.pas and i386/rgcpu.pas)
  445. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  446. * some small improvements and fixes to the optimizer
  447. * some register allocation fixes
  448. * some fpuvaroffset fixes in the unary minus node
  449. * push/popusedregisters is now called rg.save/restoreusedregisters and
  450. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  451. also better optimizable)
  452. * fixed and optimized register saving/restoring for new/dispose nodes
  453. * LOC_FPU locations now also require their "register" field to be set to
  454. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  455. - list field removed of the tnode class because it's not used currently
  456. and can cause hard-to-find bugs
  457. Revision 1.22 2001/12/29 15:32:13 jonas
  458. * powerpc/cgcpu.pas compiles :)
  459. * several powerpc-related fixes
  460. * cpuasm unit is now based on common tainst unit
  461. + nppcmat unit for powerpc (almost complete)
  462. Revision 1.21 2001/12/03 12:17:02 jonas
  463. * forgot to commit yesterday :( (less unnecessary loading of regvars with
  464. if-statements)
  465. Revision 1.20 2001/11/05 16:49:32 jonas
  466. * constant regvars (addresses of var/out para's and const para's) aren't
  467. saved to memory anymore when their register will be destroyed
  468. * unit has been made mostly processor independent
  469. Revision 1.19 2001/11/02 22:58:06 peter
  470. * procsym definition rewrite
  471. Revision 1.18 2001/08/26 13:36:49 florian
  472. * some cg reorganisation
  473. * some PPC updates
  474. Revision 1.17 2001/04/21 12:03:12 peter
  475. * m68k updates merged from fixes branch
  476. Revision 1.16 2001/04/13 01:22:13 peter
  477. * symtable change to classes
  478. * range check generation and errors fixed, make cycle DEBUG=1 works
  479. * memory leaks fixed
  480. Revision 1.15 2000/12/25 00:07:28 peter
  481. + new tlinkedlist class (merge of old tstringqueue,tcontainer and
  482. tlinkedlist objects)
  483. Revision 1.14 2000/12/05 11:44:32 jonas
  484. + new integer regvar handling, should be much more efficient
  485. Revision 1.13 2000/11/29 00:30:39 florian
  486. * unused units removed from uses clause
  487. * some changes for widestrings
  488. Revision 1.12 2000/11/04 14:25:21 florian
  489. + merged Attila's changes for interfaces, not tested yet
  490. Revision 1.11 2000/10/31 22:02:51 peter
  491. * symtable splitted, no real code changes
  492. Revision 1.10 2000/10/14 10:14:52 peter
  493. * moehrendorf oct 2000 rewrite
  494. Revision 1.9 2000/10/01 19:48:25 peter
  495. * lot of compile updates for cg11
  496. Revision 1.8 2000/09/30 16:08:45 peter
  497. * more cg11 updates
  498. Revision 1.7 2000/09/30 13:08:16 jonas
  499. * regvars are now zeroed at the start of their life if they contain an 8
  500. or 16bit var/parameter, because the full 32bits are used if they are
  501. necessary for a btrl instruction
  502. Revision 1.6 2000/09/24 15:06:27 peter
  503. * use defines.inc
  504. Revision 1.5 2000/08/27 16:11:52 peter
  505. * moved some util functions from globals,cobjects to cutils
  506. * splitted files into finput,fmodule
  507. Revision 1.4 2000/08/17 11:07:51 jonas
  508. * fixed crash when inlining assembler procedures with -Or
  509. Revision 1.3 2000/08/04 05:52:00 jonas
  510. * correct version (I also had a regvars.pp locally, which was used
  511. instead of the regvars.pas on CVS, so I didn't notice the errors :( )
  512. Revision 1.2 2000/08/03 14:36:47 jonas
  513. * fixed inserting of allocated register for regvars (only those for
  514. parameters were done, and sometimes even the wrong ones)
  515. Revision 1.1 2000/08/03 13:17:25 jonas
  516. + allow regvars to be used inside inlined procs, which required the
  517. following changes:
  518. + load regvars in genentrycode/free them in genexitcode (cgai386)
  519. * moved all regvar related code to new regvars unit
  520. + added pregvarinfo type to hcodegen
  521. + added regvarinfo field to tprocinfo (symdef/symdefh)
  522. * deallocate the regvars of the caller in secondprocinline before
  523. inlining the called procedure and reallocate them afterwards
  524. }