ncon.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781
  1. {
  2. $Id$
  3. Copyright (c) 2000-2002 by Florian Klaempfl
  4. Type checking and register allocation for constants
  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 ncon;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. globtype,widestr,
  23. node,
  24. aasmbase,aasmtai,cpuinfo,globals,
  25. symconst,symtype,symdef,symsym;
  26. type
  27. trealconstnode = class(tnode)
  28. restype : ttype;
  29. value_real : bestreal;
  30. lab_real : tasmlabel;
  31. constructor create(v : bestreal;const t:ttype);virtual;
  32. function getcopy : tnode;override;
  33. function pass_1 : tnode;override;
  34. function det_resulttype:tnode;override;
  35. function docompare(p: tnode) : boolean; override;
  36. end;
  37. trealconstnodeclass = class of trealconstnode;
  38. tordconstnode = class(tnode)
  39. restype : ttype;
  40. value : TConstExprInt;
  41. constructor create(v : tconstexprint;const t:ttype);virtual;
  42. function getcopy : tnode;override;
  43. function pass_1 : tnode;override;
  44. function det_resulttype:tnode;override;
  45. function docompare(p: tnode) : boolean; override;
  46. {$ifdef extdebug}
  47. procedure dowrite;override;
  48. {$endif}
  49. end;
  50. tordconstnodeclass = class of tordconstnode;
  51. tpointerconstnode = class(tnode)
  52. restype : ttype;
  53. value : TConstPtrUInt;
  54. constructor create(v : TConstPtrUInt;const t:ttype);virtual;
  55. function getcopy : tnode;override;
  56. function pass_1 : tnode;override;
  57. function det_resulttype:tnode;override;
  58. function docompare(p: tnode) : boolean; override;
  59. end;
  60. tpointerconstnodeclass = class of tpointerconstnode;
  61. tstringconstnode = class(tnode)
  62. value_str : pchar;
  63. len : longint;
  64. lab_str : tasmlabel;
  65. st_type : tstringtype;
  66. constructor createstr(const s : string;st:tstringtype);virtual;
  67. constructor createpchar(s : pchar;l : longint);virtual;
  68. constructor createwstr(w : pcompilerwidestring);virtual;
  69. destructor destroy;override;
  70. function getcopy : tnode;override;
  71. function pass_1 : tnode;override;
  72. function det_resulttype:tnode;override;
  73. function getpcharcopy : pchar;
  74. function docompare(p: tnode) : boolean; override;
  75. end;
  76. tstringconstnodeclass = class of tstringconstnode;
  77. tsetconstnode = class(tunarynode)
  78. restype : ttype;
  79. value_set : pconstset;
  80. lab_set : tasmlabel;
  81. constructor create(s : pconstset;const t:ttype);virtual;
  82. destructor destroy;override;
  83. function getcopy : tnode;override;
  84. function pass_1 : tnode;override;
  85. function det_resulttype:tnode;override;
  86. function docompare(p: tnode) : boolean; override;
  87. end;
  88. tsetconstnodeclass = class of tsetconstnode;
  89. tnilnode = class(tnode)
  90. constructor create;virtual;
  91. function pass_1 : tnode;override;
  92. function det_resulttype:tnode;override;
  93. end;
  94. tnilnodeclass = class of tnilnode;
  95. tguidconstnode = class(tnode)
  96. value : tguid;
  97. constructor create(const g:tguid);virtual;
  98. function getcopy : tnode;override;
  99. function pass_1 : tnode;override;
  100. function det_resulttype:tnode;override;
  101. function docompare(p: tnode) : boolean; override;
  102. end;
  103. tguidconstnodeclass = class of tguidconstnode;
  104. var
  105. crealconstnode : trealconstnodeclass;
  106. cordconstnode : tordconstnodeclass;
  107. cpointerconstnode : tpointerconstnodeclass;
  108. cstringconstnode : tstringconstnodeclass;
  109. csetconstnode : tsetconstnodeclass;
  110. cguidconstnode : tguidconstnodeclass;
  111. cnilnode : tnilnodeclass;
  112. function genintconstnode(v : TConstExprInt) : tordconstnode;
  113. function genenumnode(v : tenumsym) : tordconstnode;
  114. { some helper routines }
  115. {$ifdef INT64FUNCRESOK}
  116. function get_ordinal_value(p : tnode) : TConstExprInt;
  117. {$else INT64FUNCRESOK}
  118. function get_ordinal_value(p : tnode) : longint;
  119. {$endif INT64FUNCRESOK}
  120. function is_constnode(p : tnode) : boolean;
  121. function is_constintnode(p : tnode) : boolean;
  122. function is_constcharnode(p : tnode) : boolean;
  123. function is_constrealnode(p : tnode) : boolean;
  124. function is_constboolnode(p : tnode) : boolean;
  125. function is_constresourcestringnode(p : tnode) : boolean;
  126. function is_constwidecharnode(p : tnode) : boolean;
  127. function str_length(p : tnode) : longint;
  128. function is_emptyset(p : tnode):boolean;
  129. function genconstsymtree(p : tconstsym) : tnode;
  130. implementation
  131. uses
  132. cutils,verbose,systems,
  133. defbase,cpubase,nld;
  134. function genintconstnode(v : TConstExprInt) : tordconstnode;
  135. var
  136. i,i2 : TConstExprInt;
  137. begin
  138. { we need to bootstrap this code, so it's a little bit messy }
  139. i:=2147483647;
  140. { maxcardinal }
  141. i2 := i+i+1;
  142. if (v<=i) and (v>=-i-1) then
  143. genintconstnode:=cordconstnode.create(v,s32bittype)
  144. else if (v > i) and (v <= i2) then
  145. genintconstnode:=cordconstnode.create(v,u32bittype)
  146. else
  147. genintconstnode:=cordconstnode.create(v,cs64bittype);
  148. end;
  149. function genenumnode(v : tenumsym) : tordconstnode;
  150. var
  151. htype : ttype;
  152. begin
  153. htype.setdef(v.definition);
  154. genenumnode:=cordconstnode.create(v.value,htype);
  155. end;
  156. {$ifdef INT64FUNCRESOK}
  157. function get_ordinal_value(p : tnode) : TConstExprInt;
  158. {$else INT64FUNCRESOK}
  159. function get_ordinal_value(p : tnode) : longint;
  160. {$endif INT64FUNCRESOK}
  161. begin
  162. if p.nodetype=ordconstn then
  163. get_ordinal_value:=tordconstnode(p).value
  164. else
  165. begin
  166. Message(type_e_ordinal_expr_expected);
  167. get_ordinal_value:=0;
  168. end;
  169. end;
  170. function is_constnode(p : tnode) : boolean;
  171. begin
  172. is_constnode:=(p.nodetype in [ordconstn,realconstn,stringconstn,setconstn,guidconstn]);
  173. end;
  174. function is_constintnode(p : tnode) : boolean;
  175. begin
  176. is_constintnode:=(p.nodetype=ordconstn) and is_integer(p.resulttype.def);
  177. end;
  178. function is_constcharnode(p : tnode) : boolean;
  179. begin
  180. is_constcharnode:=(p.nodetype=ordconstn) and is_char(p.resulttype.def);
  181. end;
  182. function is_constwidecharnode(p : tnode) : boolean;
  183. begin
  184. is_constwidecharnode:=(p.nodetype=ordconstn) and is_widechar(p.resulttype.def);
  185. end;
  186. function is_constrealnode(p : tnode) : boolean;
  187. begin
  188. is_constrealnode:=(p.nodetype=realconstn);
  189. end;
  190. function is_constboolnode(p : tnode) : boolean;
  191. begin
  192. is_constboolnode:=(p.nodetype=ordconstn) and is_boolean(p.resulttype.def);
  193. end;
  194. function is_constresourcestringnode(p : tnode) : boolean;
  195. begin
  196. is_constresourcestringnode:=(p.nodetype=loadn) and
  197. (tloadnode(p).symtableentry.typ=constsym) and
  198. (tconstsym(tloadnode(p).symtableentry).consttyp=constresourcestring);
  199. end;
  200. function str_length(p : tnode) : longint;
  201. begin
  202. str_length:=tstringconstnode(p).len;
  203. end;
  204. function is_emptyset(p : tnode):boolean;
  205. begin
  206. is_emptyset:=(p.nodetype=setconstn) and
  207. (Tsetconstnode(p).value_set^=[]);
  208. end;
  209. function genconstsymtree(p : tconstsym) : tnode;
  210. var
  211. p1 : tnode;
  212. len : longint;
  213. pc : pchar;
  214. begin
  215. p1:=nil;
  216. case p.consttyp of
  217. constint :
  218. p1:=genintconstnode(p.valueord);
  219. conststring :
  220. begin
  221. len:=p.len;
  222. if not(cs_ansistrings in aktlocalswitches) and (len>255) then
  223. len:=255;
  224. getmem(pc,len+1);
  225. move(pchar(p.valueptr)^,pc^,len);
  226. pc[len]:=#0;
  227. p1:=cstringconstnode.createpchar(pc,len);
  228. end;
  229. constchar :
  230. p1:=cordconstnode.create(p.valueord,cchartype);
  231. constreal :
  232. p1:=crealconstnode.create(pbestreal(p.valueptr)^,pbestrealtype^);
  233. constbool :
  234. p1:=cordconstnode.create(p.valueord,booltype);
  235. constset :
  236. p1:=csetconstnode.create(pconstset(p.valueptr),p.consttype);
  237. constord :
  238. p1:=cordconstnode.create(p.valueord,p.consttype);
  239. constpointer :
  240. p1:=cpointerconstnode.create(p.valueordptr,p.consttype);
  241. constnil :
  242. p1:=cnilnode.create;
  243. else
  244. internalerror(200205103);
  245. end;
  246. genconstsymtree:=p1;
  247. end;
  248. {*****************************************************************************
  249. TREALCONSTNODE
  250. *****************************************************************************}
  251. { generic code }
  252. { overridden by: }
  253. { i386 }
  254. constructor trealconstnode.create(v : bestreal;const t:ttype);
  255. begin
  256. inherited create(realconstn);
  257. restype:=t;
  258. value_real:=v;
  259. lab_real:=nil;
  260. end;
  261. function trealconstnode.getcopy : tnode;
  262. var
  263. n : trealconstnode;
  264. begin
  265. n:=trealconstnode(inherited getcopy);
  266. n.value_real:=value_real;
  267. n.lab_real:=lab_real;
  268. getcopy:=n;
  269. end;
  270. function trealconstnode.det_resulttype:tnode;
  271. begin
  272. result:=nil;
  273. resulttype:=restype;
  274. end;
  275. function trealconstnode.pass_1 : tnode;
  276. begin
  277. result:=nil;
  278. location.loc:=LOC_CREFERENCE;
  279. { needs to be loaded into an FPU register }
  280. registersfpu:=1;
  281. end;
  282. function trealconstnode.docompare(p: tnode): boolean;
  283. begin
  284. docompare :=
  285. inherited docompare(p) and
  286. (value_real = trealconstnode(p).value_real);
  287. end;
  288. {*****************************************************************************
  289. TORDCONSTNODE
  290. *****************************************************************************}
  291. constructor tordconstnode.create(v : tconstexprint;const t:ttype);
  292. begin
  293. inherited create(ordconstn);
  294. value:=v;
  295. restype:=t;
  296. end;
  297. function tordconstnode.getcopy : tnode;
  298. var
  299. n : tordconstnode;
  300. begin
  301. n:=tordconstnode(inherited getcopy);
  302. n.value:=value;
  303. n.restype := restype;
  304. getcopy:=n;
  305. end;
  306. function tordconstnode.det_resulttype:tnode;
  307. begin
  308. result:=nil;
  309. resulttype:=restype;
  310. testrange(resulttype.def,value,false);
  311. end;
  312. function tordconstnode.pass_1 : tnode;
  313. begin
  314. result:=nil;
  315. if is_64bitint(resulttype.def) then
  316. location.loc:=LOC_CREFERENCE
  317. else
  318. location.loc:=LOC_CONSTANT;
  319. end;
  320. function tordconstnode.docompare(p: tnode): boolean;
  321. begin
  322. docompare :=
  323. inherited docompare(p) and
  324. (value = tordconstnode(p).value);
  325. end;
  326. {$ifdef extdebug}
  327. procedure Tordconstnode.dowrite;
  328. begin
  329. inherited dowrite;
  330. write('[',value,']');
  331. end;
  332. {$endif}
  333. {*****************************************************************************
  334. TPOINTERCONSTNODE
  335. *****************************************************************************}
  336. constructor tpointerconstnode.create(v : TConstPtrUInt;const t:ttype);
  337. begin
  338. inherited create(pointerconstn);
  339. value:=v;
  340. restype:=t;
  341. end;
  342. function tpointerconstnode.getcopy : tnode;
  343. var
  344. n : tpointerconstnode;
  345. begin
  346. n:=tpointerconstnode(inherited getcopy);
  347. n.value:=value;
  348. n.restype := restype;
  349. getcopy:=n;
  350. end;
  351. function tpointerconstnode.det_resulttype:tnode;
  352. begin
  353. result:=nil;
  354. resulttype:=restype;
  355. end;
  356. function tpointerconstnode.pass_1 : tnode;
  357. begin
  358. result:=nil;
  359. location.loc:=LOC_CONSTANT;
  360. end;
  361. function tpointerconstnode.docompare(p: tnode): boolean;
  362. begin
  363. docompare :=
  364. inherited docompare(p) and
  365. (value = tpointerconstnode(p).value);
  366. end;
  367. {*****************************************************************************
  368. TSTRINGCONSTNODE
  369. *****************************************************************************}
  370. constructor tstringconstnode.createstr(const s : string;st:tstringtype);
  371. var
  372. l : longint;
  373. begin
  374. inherited create(stringconstn);
  375. l:=length(s);
  376. len:=l;
  377. { stringdup write even past a #0 }
  378. getmem(value_str,l+1);
  379. move(s[1],value_str^,l);
  380. value_str[l]:=#0;
  381. lab_str:=nil;
  382. if st=st_default then
  383. begin
  384. if cs_ansistrings in aktlocalswitches then
  385. st_type:=st_ansistring
  386. else
  387. st_type:=st_shortstring;
  388. end
  389. else
  390. st_type:=st;
  391. end;
  392. constructor tstringconstnode.createwstr(w : pcompilerwidestring);
  393. begin
  394. inherited create(stringconstn);
  395. len:=getlengthwidestring(w);
  396. initwidestring(pcompilerwidestring(value_str));
  397. copywidestring(w,pcompilerwidestring(value_str));
  398. lab_str:=nil;
  399. st_type:=st_widestring;
  400. end;
  401. constructor tstringconstnode.createpchar(s : pchar;l : longint);
  402. begin
  403. inherited create(stringconstn);
  404. len:=l;
  405. value_str:=s;
  406. if (cs_ansistrings in aktlocalswitches) or
  407. (len>255) then
  408. st_type:=st_ansistring
  409. else
  410. st_type:=st_shortstring;
  411. lab_str:=nil;
  412. end;
  413. destructor tstringconstnode.destroy;
  414. begin
  415. if st_type=st_widestring then
  416. donewidestring(pcompilerwidestring(value_str))
  417. else
  418. ansistringdispose(value_str,len);
  419. inherited destroy;
  420. end;
  421. function tstringconstnode.getcopy : tnode;
  422. var
  423. n : tstringconstnode;
  424. begin
  425. n:=tstringconstnode(inherited getcopy);
  426. n.st_type:=st_type;
  427. n.len:=len;
  428. n.lab_str:=lab_str;
  429. if st_type=st_widestring then
  430. begin
  431. initwidestring(pcompilerwidestring(n.value_str));
  432. copywidestring(pcompilerwidestring(value_str),pcompilerwidestring(n.value_str));
  433. end
  434. else
  435. n.value_str:=getpcharcopy;
  436. getcopy:=n;
  437. end;
  438. function tstringconstnode.det_resulttype:tnode;
  439. begin
  440. result:=nil;
  441. case st_type of
  442. st_shortstring :
  443. resulttype:=cshortstringtype;
  444. st_ansistring :
  445. resulttype:=cansistringtype;
  446. st_widestring :
  447. resulttype:=cwidestringtype;
  448. st_longstring :
  449. resulttype:=clongstringtype;
  450. end;
  451. end;
  452. function tstringconstnode.pass_1 : tnode;
  453. begin
  454. result:=nil;
  455. location.loc:=LOC_CREFERENCE;
  456. end;
  457. function tstringconstnode.getpcharcopy : pchar;
  458. var
  459. pc : pchar;
  460. begin
  461. pc:=nil;
  462. getmem(pc,len+1);
  463. if pc=nil then
  464. Message(general_f_no_memory_left);
  465. move(value_str^,pc^,len+1);
  466. getpcharcopy:=pc;
  467. end;
  468. function tstringconstnode.docompare(p: tnode): boolean;
  469. begin
  470. docompare :=
  471. inherited docompare(p) and
  472. (len = tstringconstnode(p).len) and
  473. { Don't compare the pchars, since they may contain null chars }
  474. { Since all equal constant strings are replaced by the same }
  475. { label, the following compare should be enough (JM) }
  476. (lab_str = tstringconstnode(p).lab_str);
  477. end;
  478. {*****************************************************************************
  479. TSETCONSTNODE
  480. *****************************************************************************}
  481. constructor tsetconstnode.create(s : pconstset;const t:ttype);
  482. begin
  483. inherited create(setconstn,nil);
  484. restype:=t;
  485. if assigned(s) then
  486. begin
  487. new(value_set);
  488. value_set^:=s^;
  489. end
  490. else
  491. value_set:=nil;
  492. end;
  493. destructor tsetconstnode.destroy;
  494. begin
  495. if assigned(value_set) then
  496. dispose(value_set);
  497. inherited destroy;
  498. end;
  499. function tsetconstnode.getcopy : tnode;
  500. var
  501. n : tsetconstnode;
  502. begin
  503. n:=tsetconstnode(inherited getcopy);
  504. if assigned(value_set) then
  505. begin
  506. new(n.value_set);
  507. n.value_set^:=value_set^
  508. end
  509. else
  510. n.value_set:=nil;
  511. n.restype := restype;
  512. n.lab_set:=lab_set;
  513. getcopy:=n;
  514. end;
  515. function tsetconstnode.det_resulttype:tnode;
  516. begin
  517. result:=nil;
  518. resulttype:=restype;
  519. end;
  520. function tsetconstnode.pass_1 : tnode;
  521. begin
  522. result:=nil;
  523. if tsetdef(resulttype.def).settype=smallset then
  524. location.loc:=LOC_CONSTANT
  525. else
  526. location.loc:=LOC_CREFERENCE;
  527. end;
  528. function tsetconstnode.docompare(p: tnode): boolean;
  529. begin
  530. docompare:=(inherited docompare(p))
  531. and (value_set^=Tsetconstnode(p).value_set^);
  532. end;
  533. {*****************************************************************************
  534. TNILNODE
  535. *****************************************************************************}
  536. constructor tnilnode.create;
  537. begin
  538. inherited create(niln);
  539. end;
  540. function tnilnode.det_resulttype:tnode;
  541. begin
  542. result:=nil;
  543. resulttype:=voidpointertype;
  544. end;
  545. function tnilnode.pass_1 : tnode;
  546. begin
  547. result:=nil;
  548. location.loc:=LOC_CONSTANT;
  549. end;
  550. {*****************************************************************************
  551. TGUIDCONSTNODE
  552. *****************************************************************************}
  553. constructor tguidconstnode.create(const g:tguid);
  554. begin
  555. inherited create(guidconstn);
  556. value:=g;
  557. end;
  558. function tguidconstnode.getcopy : tnode;
  559. var
  560. n : tguidconstnode;
  561. begin
  562. n:=tguidconstnode(inherited getcopy);
  563. n.value:=value;
  564. getcopy:=n;
  565. end;
  566. function tguidconstnode.det_resulttype:tnode;
  567. begin
  568. result:=nil;
  569. resulttype.setdef(rec_tguid);
  570. end;
  571. function tguidconstnode.pass_1 : tnode;
  572. begin
  573. result:=nil;
  574. location.loc:=LOC_CREFERENCE;
  575. end;
  576. function tguidconstnode.docompare(p: tnode): boolean;
  577. begin
  578. docompare :=
  579. inherited docompare(p) and
  580. (guid2string(value) = guid2string(tguidconstnode(p).value));
  581. end;
  582. begin
  583. crealconstnode:=trealconstnode;
  584. cordconstnode:=tordconstnode;
  585. cpointerconstnode:=tpointerconstnode;
  586. cstringconstnode:=tstringconstnode;
  587. csetconstnode:=tsetconstnode;
  588. cnilnode:=tnilnode;
  589. cguidconstnode:=tguidconstnode;
  590. end.
  591. {
  592. $Log$
  593. Revision 1.36 2002-07-22 11:48:04 daniel
  594. * Sets are now internally sets.
  595. Revision 1.35 2002/07/20 11:57:54 florian
  596. * types.pas renamed to defbase.pas because D6 contains a types
  597. unit so this would conflicts if D6 programms are compiled
  598. + Willamette/SSE2 instructions to assembler added
  599. Revision 1.34 2002/07/14 18:00:43 daniel
  600. + Added the beginning of a state tracker. This will track the values of
  601. variables through procedures and optimize things away.
  602. Revision 1.33 2002/07/01 18:46:23 peter
  603. * internal linker
  604. * reorganized aasm layer
  605. Revision 1.32 2002/05/18 13:34:09 peter
  606. * readded missing revisions
  607. Revision 1.31 2002/05/16 19:46:37 carl
  608. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  609. + try to fix temp allocation (still in ifdef)
  610. + generic constructor calls
  611. + start of tassembler / tmodulebase class cleanup
  612. Revision 1.29 2002/05/12 16:53:07 peter
  613. * moved entry and exitcode to ncgutil and cgobj
  614. * foreach gets extra argument for passing local data to the
  615. iterator function
  616. * -CR checks also class typecasts at runtime by changing them
  617. into as
  618. * fixed compiler to cycle with the -CR option
  619. * fixed stabs with elf writer, finally the global variables can
  620. be watched
  621. * removed a lot of routines from cga unit and replaced them by
  622. calls to cgobj
  623. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  624. u32bit then the other is typecasted also to u32bit without giving
  625. a rangecheck warning/error.
  626. * fixed pascal calling method with reversing also the high tree in
  627. the parast, detected by tcalcst3 test
  628. Revision 1.28 2002/04/07 13:25:20 carl
  629. + change unit use
  630. Revision 1.27 2002/04/04 19:05:58 peter
  631. * removed unused units
  632. * use tlocation.size in cg.a_*loc*() routines
  633. Revision 1.26 2002/04/02 17:11:29 peter
  634. * tlocation,treference update
  635. * LOC_CONSTANT added for better constant handling
  636. * secondadd splitted in multiple routines
  637. * location_force_reg added for loading a location to a register
  638. of a specified size
  639. * secondassignment parses now first the right and then the left node
  640. (this is compatible with Kylix). This saves a lot of push/pop especially
  641. with string operations
  642. * adapted some routines to use the new cg methods
  643. Revision 1.25 2002/03/04 19:10:11 peter
  644. * removed compiler warnings
  645. }