ncon.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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. var
  206. i : longint;
  207. begin
  208. i:=0;
  209. if p.nodetype=setconstn then
  210. begin
  211. while (i<32) and (tsetconstnode(p).value_set^[i]=0) do
  212. inc(i);
  213. end;
  214. is_emptyset:=(i=32);
  215. end;
  216. function genconstsymtree(p : tconstsym) : tnode;
  217. var
  218. p1 : tnode;
  219. len : longint;
  220. pc : pchar;
  221. begin
  222. p1:=nil;
  223. case p.consttyp of
  224. constint :
  225. p1:=genintconstnode(p.valueord);
  226. conststring :
  227. begin
  228. len:=p.len;
  229. if not(cs_ansistrings in aktlocalswitches) and (len>255) then
  230. len:=255;
  231. getmem(pc,len+1);
  232. move(pchar(p.valueptr)^,pc^,len);
  233. pc[len]:=#0;
  234. p1:=cstringconstnode.createpchar(pc,len);
  235. end;
  236. constchar :
  237. p1:=cordconstnode.create(p.valueord,cchartype);
  238. constreal :
  239. p1:=crealconstnode.create(pbestreal(p.valueptr)^,pbestrealtype^);
  240. constbool :
  241. p1:=cordconstnode.create(p.valueord,booltype);
  242. constset :
  243. p1:=csetconstnode.create(pconstset(p.valueptr),p.consttype);
  244. constord :
  245. p1:=cordconstnode.create(p.valueord,p.consttype);
  246. constpointer :
  247. p1:=cpointerconstnode.create(p.valueordptr,p.consttype);
  248. constnil :
  249. p1:=cnilnode.create;
  250. else
  251. internalerror(200205103);
  252. end;
  253. genconstsymtree:=p1;
  254. end;
  255. {*****************************************************************************
  256. TREALCONSTNODE
  257. *****************************************************************************}
  258. { generic code }
  259. { overridden by: }
  260. { i386 }
  261. constructor trealconstnode.create(v : bestreal;const t:ttype);
  262. begin
  263. inherited create(realconstn);
  264. restype:=t;
  265. value_real:=v;
  266. lab_real:=nil;
  267. end;
  268. function trealconstnode.getcopy : tnode;
  269. var
  270. n : trealconstnode;
  271. begin
  272. n:=trealconstnode(inherited getcopy);
  273. n.value_real:=value_real;
  274. n.lab_real:=lab_real;
  275. getcopy:=n;
  276. end;
  277. function trealconstnode.det_resulttype:tnode;
  278. begin
  279. result:=nil;
  280. resulttype:=restype;
  281. end;
  282. function trealconstnode.pass_1 : tnode;
  283. begin
  284. result:=nil;
  285. location.loc:=LOC_CREFERENCE;
  286. { needs to be loaded into an FPU register }
  287. registersfpu:=1;
  288. end;
  289. function trealconstnode.docompare(p: tnode): boolean;
  290. begin
  291. docompare :=
  292. inherited docompare(p) and
  293. (value_real = trealconstnode(p).value_real);
  294. end;
  295. {*****************************************************************************
  296. TORDCONSTNODE
  297. *****************************************************************************}
  298. constructor tordconstnode.create(v : tconstexprint;const t:ttype);
  299. begin
  300. inherited create(ordconstn);
  301. value:=v;
  302. restype:=t;
  303. end;
  304. function tordconstnode.getcopy : tnode;
  305. var
  306. n : tordconstnode;
  307. begin
  308. n:=tordconstnode(inherited getcopy);
  309. n.value:=value;
  310. n.restype := restype;
  311. getcopy:=n;
  312. end;
  313. function tordconstnode.det_resulttype:tnode;
  314. begin
  315. result:=nil;
  316. resulttype:=restype;
  317. testrange(resulttype.def,value,false);
  318. end;
  319. function tordconstnode.pass_1 : tnode;
  320. begin
  321. result:=nil;
  322. if is_64bitint(resulttype.def) then
  323. location.loc:=LOC_CREFERENCE
  324. else
  325. location.loc:=LOC_CONSTANT;
  326. end;
  327. function tordconstnode.docompare(p: tnode): boolean;
  328. begin
  329. docompare :=
  330. inherited docompare(p) and
  331. (value = tordconstnode(p).value);
  332. end;
  333. {$ifdef extdebug}
  334. procedure Tordconstnode.dowrite;
  335. begin
  336. inherited dowrite;
  337. write('[',value,']');
  338. end;
  339. {$endif}
  340. {*****************************************************************************
  341. TPOINTERCONSTNODE
  342. *****************************************************************************}
  343. constructor tpointerconstnode.create(v : TConstPtrUInt;const t:ttype);
  344. begin
  345. inherited create(pointerconstn);
  346. value:=v;
  347. restype:=t;
  348. end;
  349. function tpointerconstnode.getcopy : tnode;
  350. var
  351. n : tpointerconstnode;
  352. begin
  353. n:=tpointerconstnode(inherited getcopy);
  354. n.value:=value;
  355. n.restype := restype;
  356. getcopy:=n;
  357. end;
  358. function tpointerconstnode.det_resulttype:tnode;
  359. begin
  360. result:=nil;
  361. resulttype:=restype;
  362. end;
  363. function tpointerconstnode.pass_1 : tnode;
  364. begin
  365. result:=nil;
  366. location.loc:=LOC_CONSTANT;
  367. end;
  368. function tpointerconstnode.docompare(p: tnode): boolean;
  369. begin
  370. docompare :=
  371. inherited docompare(p) and
  372. (value = tpointerconstnode(p).value);
  373. end;
  374. {*****************************************************************************
  375. TSTRINGCONSTNODE
  376. *****************************************************************************}
  377. constructor tstringconstnode.createstr(const s : string;st:tstringtype);
  378. var
  379. l : longint;
  380. begin
  381. inherited create(stringconstn);
  382. l:=length(s);
  383. len:=l;
  384. { stringdup write even past a #0 }
  385. getmem(value_str,l+1);
  386. move(s[1],value_str^,l);
  387. value_str[l]:=#0;
  388. lab_str:=nil;
  389. if st=st_default then
  390. begin
  391. if cs_ansistrings in aktlocalswitches then
  392. st_type:=st_ansistring
  393. else
  394. st_type:=st_shortstring;
  395. end
  396. else
  397. st_type:=st;
  398. end;
  399. constructor tstringconstnode.createwstr(w : pcompilerwidestring);
  400. begin
  401. inherited create(stringconstn);
  402. len:=getlengthwidestring(w);
  403. initwidestring(pcompilerwidestring(value_str));
  404. copywidestring(w,pcompilerwidestring(value_str));
  405. lab_str:=nil;
  406. st_type:=st_widestring;
  407. end;
  408. constructor tstringconstnode.createpchar(s : pchar;l : longint);
  409. begin
  410. inherited create(stringconstn);
  411. len:=l;
  412. value_str:=s;
  413. if (cs_ansistrings in aktlocalswitches) or
  414. (len>255) then
  415. st_type:=st_ansistring
  416. else
  417. st_type:=st_shortstring;
  418. lab_str:=nil;
  419. end;
  420. destructor tstringconstnode.destroy;
  421. begin
  422. if st_type=st_widestring then
  423. donewidestring(pcompilerwidestring(value_str))
  424. else
  425. ansistringdispose(value_str,len);
  426. inherited destroy;
  427. end;
  428. function tstringconstnode.getcopy : tnode;
  429. var
  430. n : tstringconstnode;
  431. begin
  432. n:=tstringconstnode(inherited getcopy);
  433. n.st_type:=st_type;
  434. n.len:=len;
  435. n.lab_str:=lab_str;
  436. if st_type=st_widestring then
  437. begin
  438. initwidestring(pcompilerwidestring(n.value_str));
  439. copywidestring(pcompilerwidestring(value_str),pcompilerwidestring(n.value_str));
  440. end
  441. else
  442. n.value_str:=getpcharcopy;
  443. getcopy:=n;
  444. end;
  445. function tstringconstnode.det_resulttype:tnode;
  446. begin
  447. result:=nil;
  448. case st_type of
  449. st_shortstring :
  450. resulttype:=cshortstringtype;
  451. st_ansistring :
  452. resulttype:=cansistringtype;
  453. st_widestring :
  454. resulttype:=cwidestringtype;
  455. st_longstring :
  456. resulttype:=clongstringtype;
  457. end;
  458. end;
  459. function tstringconstnode.pass_1 : tnode;
  460. begin
  461. result:=nil;
  462. location.loc:=LOC_CREFERENCE;
  463. end;
  464. function tstringconstnode.getpcharcopy : pchar;
  465. var
  466. pc : pchar;
  467. begin
  468. pc:=nil;
  469. getmem(pc,len+1);
  470. if pc=nil then
  471. Message(general_f_no_memory_left);
  472. move(value_str^,pc^,len+1);
  473. getpcharcopy:=pc;
  474. end;
  475. function tstringconstnode.docompare(p: tnode): boolean;
  476. begin
  477. docompare :=
  478. inherited docompare(p) and
  479. (len = tstringconstnode(p).len) and
  480. { Don't compare the pchars, since they may contain null chars }
  481. { Since all equal constant strings are replaced by the same }
  482. { label, the following compare should be enough (JM) }
  483. (lab_str = tstringconstnode(p).lab_str);
  484. end;
  485. {*****************************************************************************
  486. TSETCONSTNODE
  487. *****************************************************************************}
  488. constructor tsetconstnode.create(s : pconstset;const t:ttype);
  489. begin
  490. inherited create(setconstn,nil);
  491. restype:=t;
  492. if assigned(s) then
  493. begin
  494. new(value_set);
  495. value_set^:=s^;
  496. end
  497. else
  498. value_set:=nil;
  499. end;
  500. destructor tsetconstnode.destroy;
  501. begin
  502. if assigned(value_set) then
  503. dispose(value_set);
  504. inherited destroy;
  505. end;
  506. function tsetconstnode.getcopy : tnode;
  507. var
  508. n : tsetconstnode;
  509. begin
  510. n:=tsetconstnode(inherited getcopy);
  511. if assigned(value_set) then
  512. begin
  513. new(n.value_set);
  514. n.value_set^:=value_set^
  515. end
  516. else
  517. n.value_set:=nil;
  518. n.restype := restype;
  519. n.lab_set:=lab_set;
  520. getcopy:=n;
  521. end;
  522. function tsetconstnode.det_resulttype:tnode;
  523. begin
  524. result:=nil;
  525. resulttype:=restype;
  526. end;
  527. function tsetconstnode.pass_1 : tnode;
  528. begin
  529. result:=nil;
  530. if tsetdef(resulttype.def).settype=smallset then
  531. location.loc:=LOC_CONSTANT
  532. else
  533. location.loc:=LOC_CREFERENCE;
  534. end;
  535. function tsetconstnode.docompare(p: tnode): boolean;
  536. var
  537. i: 0..31;
  538. begin
  539. if inherited docompare(p) then
  540. begin
  541. for i := 0 to 31 do
  542. if (value_set^[i] <> tsetconstnode(p).value_set^[i]) then
  543. begin
  544. docompare := false;
  545. exit
  546. end;
  547. docompare := true;
  548. end
  549. else
  550. docompare := false;
  551. end;
  552. {*****************************************************************************
  553. TNILNODE
  554. *****************************************************************************}
  555. constructor tnilnode.create;
  556. begin
  557. inherited create(niln);
  558. end;
  559. function tnilnode.det_resulttype:tnode;
  560. begin
  561. result:=nil;
  562. resulttype:=voidpointertype;
  563. end;
  564. function tnilnode.pass_1 : tnode;
  565. begin
  566. result:=nil;
  567. location.loc:=LOC_CONSTANT;
  568. end;
  569. {*****************************************************************************
  570. TGUIDCONSTNODE
  571. *****************************************************************************}
  572. constructor tguidconstnode.create(const g:tguid);
  573. begin
  574. inherited create(guidconstn);
  575. value:=g;
  576. end;
  577. function tguidconstnode.getcopy : tnode;
  578. var
  579. n : tguidconstnode;
  580. begin
  581. n:=tguidconstnode(inherited getcopy);
  582. n.value:=value;
  583. getcopy:=n;
  584. end;
  585. function tguidconstnode.det_resulttype:tnode;
  586. begin
  587. result:=nil;
  588. resulttype.setdef(rec_tguid);
  589. end;
  590. function tguidconstnode.pass_1 : tnode;
  591. begin
  592. result:=nil;
  593. location.loc:=LOC_CREFERENCE;
  594. end;
  595. function tguidconstnode.docompare(p: tnode): boolean;
  596. begin
  597. docompare :=
  598. inherited docompare(p) and
  599. (guid2string(value) = guid2string(tguidconstnode(p).value));
  600. end;
  601. begin
  602. crealconstnode:=trealconstnode;
  603. cordconstnode:=tordconstnode;
  604. cpointerconstnode:=tpointerconstnode;
  605. cstringconstnode:=tstringconstnode;
  606. csetconstnode:=tsetconstnode;
  607. cnilnode:=tnilnode;
  608. cguidconstnode:=tguidconstnode;
  609. end.
  610. {
  611. $Log$
  612. Revision 1.35 2002-07-20 11:57:54 florian
  613. * types.pas renamed to defbase.pas because D6 contains a types
  614. unit so this would conflicts if D6 programms are compiled
  615. + Willamette/SSE2 instructions to assembler added
  616. Revision 1.34 2002/07/14 18:00:43 daniel
  617. + Added the beginning of a state tracker. This will track the values of
  618. variables through procedures and optimize things away.
  619. Revision 1.33 2002/07/01 18:46:23 peter
  620. * internal linker
  621. * reorganized aasm layer
  622. Revision 1.32 2002/05/18 13:34:09 peter
  623. * readded missing revisions
  624. Revision 1.31 2002/05/16 19:46:37 carl
  625. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  626. + try to fix temp allocation (still in ifdef)
  627. + generic constructor calls
  628. + start of tassembler / tmodulebase class cleanup
  629. Revision 1.29 2002/05/12 16:53:07 peter
  630. * moved entry and exitcode to ncgutil and cgobj
  631. * foreach gets extra argument for passing local data to the
  632. iterator function
  633. * -CR checks also class typecasts at runtime by changing them
  634. into as
  635. * fixed compiler to cycle with the -CR option
  636. * fixed stabs with elf writer, finally the global variables can
  637. be watched
  638. * removed a lot of routines from cga unit and replaced them by
  639. calls to cgobj
  640. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  641. u32bit then the other is typecasted also to u32bit without giving
  642. a rangecheck warning/error.
  643. * fixed pascal calling method with reversing also the high tree in
  644. the parast, detected by tcalcst3 test
  645. Revision 1.28 2002/04/07 13:25:20 carl
  646. + change unit use
  647. Revision 1.27 2002/04/04 19:05:58 peter
  648. * removed unused units
  649. * use tlocation.size in cg.a_*loc*() routines
  650. Revision 1.26 2002/04/02 17:11:29 peter
  651. * tlocation,treference update
  652. * LOC_CONSTANT added for better constant handling
  653. * secondadd splitted in multiple routines
  654. * location_force_reg added for loading a location to a register
  655. of a specified size
  656. * secondassignment parses now first the right and then the left node
  657. (this is compatible with Kylix). This saves a lot of push/pop especially
  658. with string operations
  659. * adapted some routines to use the new cg methods
  660. Revision 1.25 2002/03/04 19:10:11 peter
  661. * removed compiler warnings
  662. }