n386mem.pas 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Generate i386 assembler for in memory related 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 n386mem;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. node,nmem,ncgmem;
  23. type
  24. ti386addrnode = class(tcgaddrnode)
  25. procedure pass_2;override;
  26. end;
  27. ti386derefnode = class(tcgderefnode)
  28. procedure pass_2;override;
  29. end;
  30. ti386vecnode = class(tvecnode)
  31. procedure pass_2;override;
  32. end;
  33. implementation
  34. uses
  35. {$ifdef delphi}
  36. sysutils,
  37. {$endif}
  38. globtype,systems,
  39. cutils,verbose,globals,
  40. symconst,symtype,symdef,symsym,symtable,types,
  41. aasmbase,aasmtai,aasmcpu,
  42. cginfo,cgbase,pass_2,
  43. pass_1,nld,ncon,nadd,
  44. cpubase,
  45. cgobj,cga,tgobj,rgobj,ncgutil;
  46. {*****************************************************************************
  47. TI386ADDRNODE
  48. *****************************************************************************}
  49. procedure ti386addrnode.pass_2;
  50. begin
  51. inherited pass_2;
  52. { for use of other segments }
  53. if left.location.reference.segment<>R_NO then
  54. location.segment:=left.location.reference.segment;
  55. end;
  56. {*****************************************************************************
  57. TI386DEREFNODE
  58. *****************************************************************************}
  59. procedure ti386derefnode.pass_2;
  60. var
  61. oldglobalswitches : tglobalswitches;
  62. begin
  63. oldglobalswitches:=aktglobalswitches;
  64. exclude(aktglobalswitches,cs_checkpointer);
  65. inherited pass_2;
  66. aktglobalswitches:=oldglobalswitches;
  67. if tpointerdef(left.resulttype.def).is_far then
  68. location.reference.segment:=R_FS;
  69. if not tpointerdef(left.resulttype.def).is_far and
  70. (cs_gdb_heaptrc in aktglobalswitches) and
  71. (cs_checkpointer in aktglobalswitches) then
  72. begin
  73. cg.a_param_reg(exprasmlist, OS_ADDR,location.reference.base,1);
  74. cg.a_call_name(exprasmlist,'FPC_CHECKPOINTER');
  75. end;
  76. end;
  77. {*****************************************************************************
  78. TI386VECNODE
  79. *****************************************************************************}
  80. procedure ti386vecnode.pass_2;
  81. function get_mul_size:longint;
  82. begin
  83. if nf_memindex in flags then
  84. get_mul_size:=1
  85. else
  86. begin
  87. if (left.resulttype.def.deftype=arraydef) then
  88. get_mul_size:=tarraydef(left.resulttype.def).elesize
  89. else
  90. get_mul_size:=resulttype.def.size;
  91. end
  92. end;
  93. procedure calc_emit_mul;
  94. var
  95. l1,l2 : longint;
  96. begin
  97. l1:=get_mul_size;
  98. case l1 of
  99. 1,2,4,8 : location.reference.scalefactor:=l1;
  100. else
  101. begin
  102. if ispowerof2(l1,l2) then
  103. emit_const_reg(A_SHL,S_L,l2,right.location.register)
  104. else
  105. emit_const_reg(A_IMUL,S_L,l1,right.location.register);
  106. end;
  107. end;
  108. end;
  109. var
  110. extraoffset : longint;
  111. { rl stores the resulttype.def of the left node, this is necessary }
  112. { to detect if it is an ansistring }
  113. { because in constant nodes which constant index }
  114. { the left tree is removed }
  115. t : tnode;
  116. href : treference;
  117. srsym : tsym;
  118. pushed : tpushedsaved;
  119. hightree : tnode;
  120. isjump : boolean;
  121. otl,ofl : tasmlabel;
  122. newsize : tcgsize;
  123. pushedregs : tmaybesave;
  124. begin
  125. newsize:=def_cgsize(resulttype.def);
  126. location_reset(location,LOC_REFERENCE,newsize);
  127. secondpass(left);
  128. { we load the array reference to location }
  129. { an ansistring needs to be dereferenced }
  130. if is_ansistring(left.resulttype.def) or
  131. is_widestring(left.resulttype.def) then
  132. begin
  133. if nf_callunique in flags then
  134. begin
  135. if left.location.loc<>LOC_REFERENCE then
  136. begin
  137. CGMessage(cg_e_illegal_expression);
  138. exit;
  139. end;
  140. rg.saveusedregisters(exprasmlist,pushed,all_registers);
  141. cg.a_paramaddr_ref(exprasmlist,left.location.reference,1);
  142. rg.saveregvars(exprasmlist,all_registers);
  143. cg.a_call_name(exprasmlist,'FPC_'+Upper(tstringdef(left.resulttype.def).stringtypname)+'_UNIQUE');
  144. cg.g_maybe_loadself(exprasmlist);
  145. rg.restoreusedregisters(exprasmlist,pushed);
  146. end;
  147. case left.location.loc of
  148. LOC_REGISTER,
  149. LOC_CREGISTER :
  150. location.reference.base:=left.location.register;
  151. LOC_CREFERENCE,
  152. LOC_REFERENCE :
  153. begin
  154. location_release(exprasmlist,left.location);
  155. location.reference.base:=rg.getregisterint(exprasmlist);
  156. cg.a_load_ref_reg(exprasmlist,OS_ADDR,left.location.reference,location.reference.base);
  157. end;
  158. else
  159. internalerror(2002032218);
  160. end;
  161. { check for a zero length string,
  162. we can use the ansistring routine here }
  163. if (cs_check_range in aktlocalswitches) then
  164. begin
  165. rg.saveusedregisters(exprasmlist,pushed,all_registers);
  166. cg.a_param_reg(exprasmlist,OS_ADDR,location.reference.base,1);
  167. rg.saveregvars(exprasmlist,all_registers);
  168. cg.a_call_name(exprasmlist,'FPC_'+Upper(tstringdef(left.resulttype.def).stringtypname)+'_CHECKZERO');
  169. cg.g_maybe_loadself(exprasmlist);
  170. rg.restoreusedregisters(exprasmlist,pushed);
  171. end;
  172. { in ansistrings/widestrings S[1] is p<w>char(S)[0] !! }
  173. if is_ansistring(left.resulttype.def) then
  174. dec(location.reference.offset)
  175. else
  176. dec(location.reference.offset,2);
  177. { we've also to keep left up-to-date, because it is used }
  178. { if a constant array index occurs, subject to change (FK) }
  179. location_copy(left.location,location);
  180. end
  181. else if is_dynamic_array(left.resulttype.def) then
  182. { ... also a dynamic string }
  183. begin
  184. case left.location.loc of
  185. LOC_REGISTER,
  186. LOC_CREGISTER :
  187. location.reference.base:=left.location.register;
  188. LOC_REFERENCE,
  189. LOC_CREFERENCE :
  190. begin
  191. location_release(exprasmlist,left.location);
  192. location.reference.base:=rg.getregisterint(exprasmlist);
  193. emit_ref_reg(A_MOV,S_L,
  194. left.location.reference,location.reference.base);
  195. end;
  196. else
  197. internalerror(2002032219);
  198. end;
  199. {$warning FIXME}
  200. { check for a zero length string,
  201. we can use the ansistring routine here }
  202. if (cs_check_range in aktlocalswitches) then
  203. begin
  204. rg.saveusedregisters(exprasmlist,pushed,all_registers);
  205. emit_reg(A_PUSH,S_L,location.reference.base);
  206. rg.saveregvars(exprasmlist,all_registers);
  207. cg.a_call_name(exprasmlist,'FPC_ANSISTR_CHECKZERO');
  208. cg.g_maybe_loadself(exprasmlist);
  209. rg.restoreusedregisters(exprasmlist,pushed);
  210. end;
  211. { we've also to keep left up-to-date, because it is used }
  212. { if a constant array index occurs, subject to change (FK) }
  213. location_copy(left.location,location);
  214. end
  215. else
  216. location_copy(location,left.location);
  217. { offset can only differ from 0 if arraydef }
  218. if (left.resulttype.def.deftype=arraydef) and
  219. not(is_dynamic_array(left.resulttype.def)) then
  220. dec(location.reference.offset,
  221. get_mul_size*tarraydef(left.resulttype.def).lowrange);
  222. if right.nodetype=ordconstn then
  223. begin
  224. { offset can only differ from 0 if arraydef }
  225. if (left.resulttype.def.deftype=arraydef) then
  226. begin
  227. if not(is_open_array(left.resulttype.def)) and
  228. not(is_array_of_const(left.resulttype.def)) and
  229. not(is_dynamic_array(left.resulttype.def)) then
  230. begin
  231. if (tordconstnode(right).value>tarraydef(left.resulttype.def).highrange) or
  232. (tordconstnode(right).value<tarraydef(left.resulttype.def).lowrange) then
  233. begin
  234. if (cs_check_range in aktlocalswitches) then
  235. CGMessage(parser_e_range_check_error)
  236. else
  237. CGMessage(parser_w_range_check_error);
  238. end;
  239. dec(left.location.reference.offset,
  240. get_mul_size*tarraydef(left.resulttype.def).lowrange);
  241. end
  242. else
  243. begin
  244. { range checking for open and dynamic arrays !!!! }
  245. {$warning FIXME}
  246. {!!!!!!!!!!!!!!!!!}
  247. end;
  248. end
  249. else if (left.resulttype.def.deftype=stringdef) then
  250. begin
  251. if (tordconstnode(right).value=0) and
  252. not(is_shortstring(left.resulttype.def)) then
  253. CGMessage(cg_e_can_access_element_zero);
  254. if (cs_check_range in aktlocalswitches) then
  255. begin
  256. case tstringdef(left.resulttype.def).string_typ of
  257. { it's the same for ansi- and wide strings }
  258. st_widestring,
  259. st_ansistring:
  260. begin
  261. rg.saveusedregisters(exprasmlist,pushed,all_registers);
  262. cg.a_param_const(exprasmlist,OS_INT,tordconstnode(right).value,2);
  263. href:=location.reference;
  264. dec(href.offset,7);
  265. cg.a_param_ref(exprasmlist,OS_INT,href,1);
  266. rg.saveregvars(exprasmlist,all_registers);
  267. cg.a_call_name(exprasmlist,'FPC_'+Upper(tstringdef(left.resulttype.def).stringtypname)+'_RANGECHECK');
  268. rg.restoreusedregisters(exprasmlist,pushed);
  269. cg.g_maybe_loadself(exprasmlist);
  270. end;
  271. st_shortstring:
  272. begin
  273. {!!!!!!!!!!!!!!!!!}
  274. end;
  275. st_longstring:
  276. begin
  277. {!!!!!!!!!!!!!!!!!}
  278. end;
  279. end;
  280. end;
  281. end;
  282. inc(left.location.reference.offset,
  283. get_mul_size*tordconstnode(right).value);
  284. if nf_memseg in flags then
  285. left.location.reference.segment:=R_FS;
  286. location_copy(location,left.location);
  287. end
  288. else
  289. { not nodetype=ordconstn }
  290. begin
  291. if (cs_regalloc in aktglobalswitches) and
  292. { if we do range checking, we don't }
  293. { need that fancy code (it would be }
  294. { buggy) }
  295. not(cs_check_range in aktlocalswitches) and
  296. (left.resulttype.def.deftype=arraydef) then
  297. begin
  298. extraoffset:=0;
  299. if (right.nodetype=addn) then
  300. begin
  301. if taddnode(right).right.nodetype=ordconstn then
  302. begin
  303. extraoffset:=tordconstnode(taddnode(right).right).value;
  304. t:=taddnode(right).left;
  305. { First pass processed this with the assumption }
  306. { that there was an add node which may require an }
  307. { extra register. Fake it or die with IE10 (JM) }
  308. t.registers32 := taddnode(right).registers32;
  309. taddnode(right).left:=nil;
  310. right.free;
  311. right:=t;
  312. end
  313. else if taddnode(right).left.nodetype=ordconstn then
  314. begin
  315. extraoffset:=tordconstnode(taddnode(right).left).value;
  316. t:=taddnode(right).right;
  317. t.registers32 := right.registers32;
  318. taddnode(right).right:=nil;
  319. right.free;
  320. right:=t;
  321. end;
  322. end
  323. else if (right.nodetype=subn) then
  324. begin
  325. if taddnode(right).right.nodetype=ordconstn then
  326. begin
  327. { this was "extraoffset:=right.right.value;" Looks a bit like
  328. copy-paste bug :) (JM) }
  329. extraoffset:=-tordconstnode(taddnode(right).right).value;
  330. t:=taddnode(right).left;
  331. t.registers32 := right.registers32;
  332. taddnode(right).left:=nil;
  333. right.free;
  334. right:=t;
  335. end
  336. { You also have to negate right.right in this case! I can't add an
  337. unaryminusn without causing a crash, so I've disabled it (JM)
  338. else if right.left.nodetype=ordconstn then
  339. begin
  340. extraoffset:=right.left.value;
  341. t:=right.right;
  342. t^.registers32 := right.registers32;
  343. putnode(right);
  344. putnode(right.left);
  345. right:=t;
  346. end;}
  347. end;
  348. inc(location.reference.offset,
  349. get_mul_size*extraoffset);
  350. end;
  351. { calculate from left to right }
  352. if not(location.loc in [LOC_CREFERENCE,LOC_REFERENCE]) then
  353. CGMessage(cg_e_illegal_expression);
  354. isjump:=(right.location.loc=LOC_JUMP);
  355. if isjump then
  356. begin
  357. otl:=truelabel;
  358. getlabel(truelabel);
  359. ofl:=falselabel;
  360. getlabel(falselabel);
  361. end;
  362. maybe_save(exprasmlist,right.registers32,location,pushedregs);
  363. secondpass(right);
  364. maybe_restore(exprasmlist,location,pushedregs);
  365. { here we change the location of right
  366. and the update was forgotten so it
  367. led to wrong code in emitrangecheck later PM
  368. so make range check before }
  369. if cs_check_range in aktlocalswitches then
  370. begin
  371. if left.resulttype.def.deftype=arraydef then
  372. begin
  373. if is_open_array(left.resulttype.def) or
  374. is_array_of_const(left.resulttype.def) then
  375. begin
  376. tarraydef(left.resulttype.def).genrangecheck;
  377. srsym:=searchsymonlyin(tloadnode(left).symtable,
  378. 'high'+tvarsym(tloadnode(left).symtableentry).name);
  379. hightree:=cloadnode.create(tvarsym(srsym),tloadnode(left).symtable);
  380. firstpass(hightree);
  381. secondpass(hightree);
  382. location_release(exprasmlist,hightree.location);
  383. reference_reset_symbol(href,newasmsymbol(tarraydef(left.resulttype.def).getrangecheckstring),4);
  384. cg.a_load_loc_ref(exprasmlist,hightree.location,href);
  385. hightree.free;
  386. hightree:=nil;
  387. end;
  388. cg.g_rangecheck(exprasmlist,right,left.resulttype.def);
  389. end;
  390. end;
  391. location_force_reg(exprasmlist,right.location,OS_32,false);
  392. if isjump then
  393. begin
  394. truelabel:=otl;
  395. falselabel:=ofl;
  396. end;
  397. { produce possible range check code: }
  398. if cs_check_range in aktlocalswitches then
  399. begin
  400. if left.resulttype.def.deftype=arraydef then
  401. begin
  402. { done defore (PM) }
  403. end
  404. else if (left.resulttype.def.deftype=stringdef) then
  405. begin
  406. case tstringdef(left.resulttype.def).string_typ of
  407. { it's the same for ansi- and wide strings }
  408. st_widestring,
  409. st_ansistring:
  410. begin
  411. rg.saveusedregisters(exprasmlist,pushed,all_registers);
  412. cg.a_param_reg(exprasmlist,OS_INT,right.location.register,1);
  413. href:=location.reference;
  414. dec(href.offset,7);
  415. cg.a_param_ref(exprasmlist,OS_INT,href,1);
  416. rg.saveregvars(exprasmlist,all_registers);
  417. cg.a_call_name(exprasmlist,'FPC_'+Upper(tstringdef(left.resulttype.def).stringtypname)+'_RANGECHECK');
  418. rg.restoreusedregisters(exprasmlist,pushed);
  419. cg.g_maybe_loadself(exprasmlist);
  420. end;
  421. st_shortstring:
  422. begin
  423. {!!!!!!!!!!!!!!!!!}
  424. end;
  425. st_longstring:
  426. begin
  427. {!!!!!!!!!!!!!!!!!}
  428. end;
  429. end;
  430. end;
  431. end;
  432. if location.reference.index=R_NO then
  433. begin
  434. location.reference.index:=right.location.register;
  435. calc_emit_mul;
  436. end
  437. else
  438. begin
  439. if location.reference.base=R_NO then
  440. begin
  441. case location.reference.scalefactor of
  442. 2 : emit_const_reg(A_SHL,S_L,1,location.reference.index);
  443. 4 : emit_const_reg(A_SHL,S_L,2,location.reference.index);
  444. 8 : emit_const_reg(A_SHL,S_L,3,location.reference.index);
  445. end;
  446. calc_emit_mul;
  447. location.reference.base:=location.reference.index;
  448. location.reference.index:=right.location.register;
  449. end
  450. else
  451. begin
  452. emit_ref_reg(A_LEA,S_L,location.reference,location.reference.index);
  453. rg.ungetregisterint(exprasmlist,location.reference.base);
  454. { the symbol offset is loaded, }
  455. { so release the symbol name and set symbol }
  456. { to nil }
  457. location.reference.symbol:=nil;
  458. location.reference.offset:=0;
  459. calc_emit_mul;
  460. location.reference.base:=location.reference.index;
  461. location.reference.index:=right.location.register;
  462. end;
  463. end;
  464. if nf_memseg in flags then
  465. location.reference.segment:=R_FS;
  466. end;
  467. location.size:=newsize;
  468. end;
  469. begin
  470. caddrnode:=ti386addrnode;
  471. cderefnode:=ti386derefnode;
  472. cvecnode:=ti386vecnode;
  473. end.
  474. {
  475. $Log$
  476. Revision 1.35 2002-07-01 18:46:33 peter
  477. * internal linker
  478. * reorganized aasm layer
  479. Revision 1.34 2002/06/24 12:43:01 jonas
  480. * fixed errors found with new -CR code from Peter when cycling with -O2p3r
  481. Revision 1.33 2002/05/18 13:34:25 peter
  482. * readded missing revisions
  483. Revision 1.32 2002/05/16 19:46:51 carl
  484. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  485. + try to fix temp allocation (still in ifdef)
  486. + generic constructor calls
  487. + start of tassembler / tmodulebase class cleanup
  488. Revision 1.30 2002/05/13 19:54:38 peter
  489. * removed n386ld and n386util units
  490. * maybe_save/maybe_restore added instead of the old maybe_push
  491. Revision 1.29 2002/05/12 16:53:17 peter
  492. * moved entry and exitcode to ncgutil and cgobj
  493. * foreach gets extra argument for passing local data to the
  494. iterator function
  495. * -CR checks also class typecasts at runtime by changing them
  496. into as
  497. * fixed compiler to cycle with the -CR option
  498. * fixed stabs with elf writer, finally the global variables can
  499. be watched
  500. * removed a lot of routines from cga unit and replaced them by
  501. calls to cgobj
  502. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  503. u32bit then the other is typecasted also to u32bit without giving
  504. a rangecheck warning/error.
  505. * fixed pascal calling method with reversing also the high tree in
  506. the parast, detected by tcalcst3 test
  507. Revision 1.28 2002/04/21 19:02:07 peter
  508. * removed newn and disposen nodes, the code is now directly
  509. inlined from pexpr
  510. * -an option that will write the secondpass nodes to the .s file, this
  511. requires EXTDEBUG define to actually write the info
  512. * fixed various internal errors and crashes due recent code changes
  513. Revision 1.27 2002/04/20 21:37:07 carl
  514. + generic FPC_CHECKPOINTER
  515. + first parameter offset in stack now portable
  516. * rename some constants
  517. + move some cpu stuff to other units
  518. - remove unused constents
  519. * fix stacksize for some targets
  520. * fix generic size problems which depend now on EXTEND_SIZE constant
  521. * removing frame pointer in routines is only available for : i386,m68k and vis targets
  522. Revision 1.26 2002/04/19 15:39:35 peter
  523. * removed some more routines from cga
  524. * moved location_force_reg/mem to ncgutil
  525. * moved arrayconstructnode secondpass to ncgld
  526. Revision 1.25 2002/04/15 19:12:09 carl
  527. + target_info.size_of_pointer -> pointer_size
  528. + some cleanup of unused types/variables
  529. * move several constants from cpubase to their specific units
  530. (where they are used)
  531. + att_Reg2str -> gas_reg2str
  532. + int_reg2str -> std_reg2str
  533. Revision 1.24 2002/04/04 19:06:12 peter
  534. * removed unused units
  535. * use tlocation.size in cg.a_*loc*() routines
  536. Revision 1.23 2002/04/02 17:11:36 peter
  537. * tlocation,treference update
  538. * LOC_CONSTANT added for better constant handling
  539. * secondadd splitted in multiple routines
  540. * location_force_reg added for loading a location to a register
  541. of a specified size
  542. * secondassignment parses now first the right and then the left node
  543. (this is compatible with Kylix). This saves a lot of push/pop especially
  544. with string operations
  545. * adapted some routines to use the new cg methods
  546. Revision 1.22 2002/04/01 09:44:04 jonas
  547. * better fix for new/dispose bug with init/final data
  548. Revision 1.21 2002/03/31 20:26:39 jonas
  549. + a_loadfpu_* and a_loadmm_* methods in tcg
  550. * register allocation is now handled by a class and is mostly processor
  551. independent (+rgobj.pas and i386/rgcpu.pas)
  552. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  553. * some small improvements and fixes to the optimizer
  554. * some register allocation fixes
  555. * some fpuvaroffset fixes in the unary minus node
  556. * push/popusedregisters is now called rg.save/restoreusedregisters and
  557. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  558. also better optimizable)
  559. * fixed and optimized register saving/restoring for new/dispose nodes
  560. * LOC_FPU locations now also require their "register" field to be set to
  561. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  562. - list field removed of the tnode class because it's not used currently
  563. and can cause hard-to-find bugs
  564. Revision 1.20 2002/03/04 19:10:14 peter
  565. * removed compiler warnings
  566. }