n386cnv.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. {
  2. $Id$
  3. Copyright (c) 1998-2002 by Florian Klaempfl
  4. Generate i386 assembler for type converting 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 n386cnv;
  19. {$i fpcdefs.inc}
  20. interface
  21. uses
  22. node,ncgcnv,defbase;
  23. type
  24. ti386typeconvnode = class(tcgtypeconvnode)
  25. protected
  26. { procedure second_int_to_int;override; }
  27. { procedure second_string_to_string;override; }
  28. { procedure second_cstring_to_pchar;override; }
  29. { procedure second_string_to_chararray;override; }
  30. { procedure second_array_to_pointer;override; }
  31. { procedure second_pointer_to_array;override; }
  32. { procedure second_chararray_to_string;override; }
  33. { procedure second_char_to_string;override; }
  34. function first_int_to_real: tnode; override;
  35. procedure second_int_to_real;override;
  36. { procedure second_real_to_real;override; }
  37. { procedure second_cord_to_pointer;override; }
  38. { procedure second_proc_to_procvar;override; }
  39. { procedure second_bool_to_int;override; }
  40. procedure second_int_to_bool;override;
  41. { procedure second_load_smallset;override; }
  42. { procedure second_ansistring_to_pchar;override; }
  43. { procedure second_pchar_to_string;override; }
  44. { procedure second_class_to_intf;override; }
  45. { procedure second_char_to_char;override; }
  46. {$ifdef TESTOBJEXT2}
  47. procedure checkobject;override;
  48. {$endif TESTOBJEXT2}
  49. procedure second_call_helper(c : tconverttype);override;
  50. end;
  51. implementation
  52. uses
  53. verbose,systems,
  54. symconst,symdef,aasmbase,aasmtai,aasmcpu,
  55. cginfo,cgbase,pass_2,
  56. ncon,ncal,ncnv,
  57. cpubase,
  58. cgobj,cga,tgobj,rgobj,rgcpu,ncgutil;
  59. {*****************************************************************************
  60. SecondTypeConv
  61. *****************************************************************************}
  62. function ti386typeconvnode.first_int_to_real : tnode;
  63. begin
  64. first_int_to_real:=nil;
  65. if registersfpu<1 then
  66. registersfpu:=1;
  67. location.loc:=LOC_FPUREGISTER;
  68. end;
  69. procedure ti386typeconvnode.second_int_to_real;
  70. var
  71. href : treference;
  72. hregister : tregister;
  73. l1,l2 : tasmlabel;
  74. freereg : boolean;
  75. begin
  76. location_reset(location,LOC_FPUREGISTER,def_cgsize(resulttype.def));
  77. hregister:=R_NO;
  78. freereg:=false;
  79. { for u32bit a solution is to push $0 and to load a comp }
  80. { does this first, it destroys maybe EDI }
  81. if torddef(left.resulttype.def).typ=u32bit then
  82. exprasmlist.concat(taicpu.op_const(A_PUSH,S_L,0));
  83. case left.location.loc of
  84. LOC_REGISTER,
  85. LOC_CREGISTER :
  86. begin
  87. case left.location.size of
  88. OS_64,OS_S64 :
  89. begin
  90. exprasmlist.concat(taicpu.op_reg(A_PUSH,S_L,left.location.registerhigh));
  91. hregister:=left.location.registerlow;
  92. end;
  93. OS_32,OS_S32 :
  94. hregister:=left.location.register;
  95. else
  96. begin
  97. hregister:=cg.get_scratch_reg_int(exprasmlist);
  98. freereg:=true;
  99. cg.a_load_reg_reg(exprasmlist,left.location.size,OS_32,left.location.register,hregister);
  100. end;
  101. end;
  102. end;
  103. LOC_REFERENCE,
  104. LOC_CREFERENCE :
  105. begin
  106. hregister:=cg.get_scratch_reg_int(exprasmlist);
  107. freereg:=true;
  108. if left.location.size in [OS_64,OS_S64] then
  109. begin
  110. href:=left.location.reference;
  111. inc(href.offset,4);
  112. cg.a_load_ref_reg(exprasmlist,OS_32,href,hregister);
  113. exprasmlist.concat(taicpu.op_reg(A_PUSH,S_L,hregister));
  114. cg.a_load_ref_reg(exprasmlist,OS_32,left.location.reference,hregister);
  115. end
  116. else
  117. cg.a_load_ref_reg(exprasmlist,left.location.size,left.location.reference,hregister);
  118. end;
  119. else
  120. internalerror(2002032218);
  121. end;
  122. location_release(exprasmlist,left.location);
  123. location_freetemp(exprasmlist,left.location);
  124. { for 64 bit integers, the high dword is already pushed }
  125. exprasmlist.concat(taicpu.op_reg(A_PUSH,S_L,hregister));
  126. if freereg then
  127. cg.free_scratch_reg(exprasmlist,hregister);
  128. reference_reset_base(href,R_ESP,0);
  129. case torddef(left.resulttype.def).typ of
  130. u32bit:
  131. begin
  132. emit_ref(A_FILD,S_IQ,href);
  133. emit_const_reg(A_ADD,S_L,8,R_ESP);
  134. end;
  135. s64bit:
  136. begin
  137. emit_ref(A_FILD,S_IQ,href);
  138. emit_const_reg(A_ADD,S_L,8,R_ESP);
  139. end;
  140. u64bit:
  141. begin
  142. { unsigned 64 bit ints are harder to handle: }
  143. { we load bits 0..62 and then check bit 63: }
  144. { if it is 1 then we add $80000000 000000000 }
  145. { as double }
  146. inc(href.offset,4);
  147. rg.getexplicitregisterint(exprasmlist,R_EDI);
  148. emit_ref_reg(A_MOV,S_L,href,R_EDI);
  149. reference_reset_base(href,R_ESP,4);
  150. emit_const_ref(A_AND,S_L,$7fffffff,href);
  151. emit_const_reg(A_TEST,S_L,longint($80000000),R_EDI);
  152. rg.ungetregisterint(exprasmlist,R_EDI);
  153. reference_reset_base(href,R_ESP,0);
  154. emit_ref(A_FILD,S_IQ,href);
  155. objectlibrary.getdatalabel(l1);
  156. objectlibrary.getlabel(l2);
  157. emitjmp(C_Z,l2);
  158. Consts.concat(Tai_label.Create(l1));
  159. { I got this constant from a test progtram (FK) }
  160. Consts.concat(Tai_const.Create_32bit(0));
  161. Consts.concat(Tai_const.Create_32bit(1138753536));
  162. reference_reset_symbol(href,l1,0);
  163. emit_ref(A_FADD,S_FL,href);
  164. cg.a_label(exprasmlist,l2);
  165. emit_const_reg(A_ADD,S_L,8,R_ESP);
  166. end
  167. else
  168. begin
  169. emit_ref(A_FILD,S_IL,href);
  170. rg.getexplicitregisterint(exprasmlist,R_EDI);
  171. emit_reg(A_POP,S_L,R_EDI);
  172. rg.ungetregisterint(exprasmlist,R_EDI);
  173. end;
  174. end;
  175. inc(trgcpu(rg).fpuvaroffset);
  176. location.register:=R_ST;
  177. end;
  178. procedure ti386typeconvnode.second_int_to_bool;
  179. var
  180. hregister : tregister;
  181. pref : treference;
  182. resflags : tresflags;
  183. hlabel,oldtruelabel,oldfalselabel : tasmlabel;
  184. begin
  185. oldtruelabel:=truelabel;
  186. oldfalselabel:=falselabel;
  187. objectlibrary.getlabel(truelabel);
  188. objectlibrary.getlabel(falselabel);
  189. secondpass(left);
  190. if codegenerror then
  191. exit;
  192. { byte(boolean) or word(wordbool) or longint(longbool) must }
  193. { be accepted for var parameters }
  194. if (nf_explizit in flags) and
  195. (left.resulttype.def.size=resulttype.def.size) and
  196. (left.location.loc in [LOC_REFERENCE,LOC_CREFERENCE,LOC_CREGISTER]) then
  197. begin
  198. location_copy(location,left.location);
  199. truelabel:=oldtruelabel;
  200. falselabel:=oldfalselabel;
  201. exit;
  202. end;
  203. { Load left node into flag F_NE/F_E }
  204. resflags:=F_NE;
  205. location_release(exprasmlist,left.location);
  206. case left.location.loc of
  207. LOC_CREFERENCE,
  208. LOC_REFERENCE :
  209. begin
  210. if left.location.size in [OS_64,OS_S64] then
  211. begin
  212. hregister:=rg.getregisterint(exprasmlist);
  213. emit_ref_reg(A_MOV,S_L,left.location.reference,hregister);
  214. pref:=left.location.reference;
  215. inc(pref.offset,4);
  216. emit_ref_reg(A_OR,S_L,pref,hregister);
  217. end
  218. else
  219. begin
  220. location_force_reg(exprasmlist,left.location,left.location.size,true);
  221. cg.a_op_reg_reg(exprasmlist,OP_OR,left.location.size,left.location.register,left.location.register);
  222. end;
  223. end;
  224. LOC_FLAGS :
  225. begin
  226. resflags:=left.location.resflags;
  227. end;
  228. LOC_REGISTER,LOC_CREGISTER :
  229. begin
  230. if left.location.size in [OS_64,OS_S64] then
  231. begin
  232. hregister:=cg.get_scratch_reg_int(exprasmlist);
  233. cg.a_load_reg_reg(exprasmlist,OS_32,OS_32,left.location.registerlow,hregister);
  234. cg.a_op_reg_reg(exprasmlist,OP_OR,OS_32,left.location.registerhigh,hregister);
  235. cg.free_scratch_reg(exprasmlist,hregister);
  236. end
  237. else
  238. cg.a_op_reg_reg(exprasmlist,OP_OR,left.location.size,left.location.register,left.location.register);
  239. end;
  240. LOC_JUMP :
  241. begin
  242. hregister:=rg.getregisterint(exprasmlist);
  243. objectlibrary.getlabel(hlabel);
  244. cg.a_label(exprasmlist,truelabel);
  245. cg.a_load_const_reg(exprasmlist,OS_INT,1,hregister);
  246. cg.a_jmp_always(exprasmlist,hlabel);
  247. cg.a_label(exprasmlist,falselabel);
  248. cg.a_load_const_reg(exprasmlist,OS_INT,0,hregister);
  249. cg.a_label(exprasmlist,hlabel);
  250. cg.a_op_reg_reg(exprasmlist,OP_OR,OS_INT,hregister,hregister);
  251. end;
  252. else
  253. internalerror(10062);
  254. end;
  255. { load flags to register }
  256. location_reset(location,LOC_REGISTER,def_cgsize(resulttype.def));
  257. location.register:=def_getreg(resulttype.def);
  258. cg.g_flags2reg(exprasmlist,location.size,resflags,location.register);
  259. truelabel:=oldtruelabel;
  260. falselabel:=oldfalselabel;
  261. end;
  262. {$ifdef TESTOBJEXT2}
  263. procedure ti386typeconvnode.checkobject;
  264. var
  265. r : preference;
  266. nillabel : plabel;
  267. begin
  268. new(r);
  269. reset_reference(r^);
  270. if p^.location.loc in [LOC_REGISTER,LOC_CREGISTER] then
  271. r^.base:=p^.location.register
  272. else
  273. begin
  274. rg.getexplicitregisterint(exprasmlist,R_EDI);
  275. emit_mov_loc_reg(p^.location,R_EDI);
  276. r^.base:=R_EDI;
  277. end;
  278. { NIL must be accepted !! }
  279. emit_reg_reg(A_OR,S_L,r^.base,r^.base);
  280. rg.ungetregisterint(exprasmlist,R_EDI);
  281. objectlibrary.getlabel(nillabel);
  282. emitjmp(C_E,nillabel);
  283. { this is one point where we need vmt_offset (PM) }
  284. r^.offset:= tobjectdef(tpointerdef(p^.resulttype.def).definition).vmt_offset;
  285. rg.getexplicitregisterint(exprasmlist,R_EDI);
  286. emit_ref_reg(A_MOV,S_L,r,R_EDI);
  287. emit_sym(A_PUSH,S_L,
  288. objectlibrary.newasmsymbol(tobjectdef(tpointerdef(p^.resulttype.def).definition).vmt_mangledname));
  289. emit_reg(A_PUSH,S_L,R_EDI);
  290. rg.ungetregister32(exprasmlist,R_EDI);
  291. emitcall('FPC_CHECK_OBJECT_EXT');
  292. emitlab(nillabel);
  293. end;
  294. {$endif TESTOBJEXT2}
  295. procedure ti386typeconvnode.second_call_helper(c : tconverttype);
  296. {$ifdef fpc}
  297. const
  298. secondconvert : array[tconverttype] of pointer = (
  299. {$ifdef fpc}@{$endif}second_nothing, {equal}
  300. {$ifdef fpc}@{$endif}second_nothing, {not_possible}
  301. {$ifdef fpc}@{$endif}second_nothing, {second_string_to_string, handled in resulttype pass }
  302. {$ifdef fpc}@{$endif}second_char_to_string,
  303. {$ifdef fpc}@{$endif}second_nothing, {char_to_charray}
  304. {$ifdef fpc}@{$endif}second_nothing, { pchar_to_string, handled in resulttype pass }
  305. {$ifdef fpc}@{$endif}second_nothing, {cchar_to_pchar}
  306. {$ifdef fpc}@{$endif}second_cstring_to_pchar,
  307. {$ifdef fpc}@{$endif}second_ansistring_to_pchar,
  308. {$ifdef fpc}@{$endif}second_string_to_chararray,
  309. {$ifdef fpc}@{$endif}second_nothing, { chararray_to_string, handled in resulttype pass }
  310. {$ifdef fpc}@{$endif}second_array_to_pointer,
  311. {$ifdef fpc}@{$endif}second_pointer_to_array,
  312. {$ifdef fpc}@{$endif}second_int_to_int,
  313. {$ifdef fpc}@{$endif}second_int_to_bool,
  314. {$ifdef fpc}@{$endif}second_bool_to_bool,
  315. {$ifdef fpc}@{$endif}second_bool_to_int,
  316. {$ifdef fpc}@{$endif}second_real_to_real,
  317. {$ifdef fpc}@{$endif}second_int_to_real,
  318. {$ifdef fpc}@{$endif}second_proc_to_procvar,
  319. {$ifdef fpc}@{$endif}second_nothing, { arrayconstructor_to_set }
  320. {$ifdef fpc}@{$endif}second_nothing, { second_load_smallset, handled in first pass }
  321. {$ifdef fpc}@{$endif}second_cord_to_pointer,
  322. {$ifdef fpc}@{$endif}second_nothing, { interface 2 string }
  323. {$ifdef fpc}@{$endif}second_nothing, { interface 2 guid }
  324. {$ifdef fpc}@{$endif}second_class_to_intf,
  325. {$ifdef fpc}@{$endif}second_char_to_char,
  326. {$ifdef fpc}@{$endif}second_nothing, { normal_2_smallset }
  327. {$ifdef fpc}@{$endif}second_nothing, { dynarray_2_openarray }
  328. {$ifdef fpc}@{$endif}second_nothing { pwchar_2_string }
  329. );
  330. type
  331. tprocedureofobject = procedure of object;
  332. var
  333. r : packed record
  334. proc : pointer;
  335. obj : pointer;
  336. end;
  337. begin
  338. { this is a little bit dirty but it works }
  339. { and should be quite portable too }
  340. r.proc:=secondconvert[c];
  341. r.obj:=self;
  342. tprocedureofobject(r){$ifdef FPC}();{$endif FPC}
  343. end;
  344. {$else}
  345. begin
  346. case c of
  347. tc_equal,
  348. tc_not_possible,
  349. tc_string_2_string : second_nothing;
  350. tc_char_2_string : second_char_to_string;
  351. tc_char_2_chararray : second_nothing;
  352. tc_pchar_2_string : second_nothing;
  353. tc_cchar_2_pchar : second_nothing;
  354. tc_cstring_2_pchar : second_cstring_to_pchar;
  355. tc_ansistring_2_pchar : second_ansistring_to_pchar;
  356. tc_string_2_chararray : second_string_to_chararray;
  357. tc_chararray_2_string : second_nothing;
  358. tc_array_2_pointer : second_array_to_pointer;
  359. tc_pointer_2_array : second_pointer_to_array;
  360. tc_int_2_int : second_int_to_int;
  361. tc_int_2_bool : second_int_to_bool;
  362. tc_bool_2_bool : second_bool_to_bool;
  363. tc_bool_2_int : second_bool_to_int;
  364. tc_real_2_real : second_real_to_real;
  365. tc_int_2_real : second_int_to_real;
  366. tc_proc_2_procvar : second_proc_to_procvar;
  367. tc_arrayconstructor_2_set : second_nothing;
  368. tc_load_smallset : second_nothing;
  369. tc_cord_2_pointer : second_cord_to_pointer;
  370. tc_intf_2_string : second_nothing;
  371. tc_intf_2_guid : second_nothing;
  372. tc_class_2_intf : second_class_to_intf;
  373. tc_char_2_char : second_char_to_char;
  374. tc_normal_2_smallset : second_nothing;
  375. tc_dynarray_2_openarray : second_nothing;
  376. end;
  377. end;
  378. {$endif}
  379. begin
  380. ctypeconvnode:=ti386typeconvnode;
  381. end.
  382. {
  383. $Log$
  384. Revision 1.51 2002-10-10 16:14:54 florian
  385. * fixed to reflect last tconvtype change
  386. Revision 1.50 2002/10/05 12:43:29 carl
  387. * fixes for Delphi 6 compilation
  388. (warning : Some features do not work under Delphi)
  389. Revision 1.49 2002/09/17 18:54:03 jonas
  390. * a_load_reg_reg() now has two size parameters: source and dest. This
  391. allows some optimizations on architectures that don't encode the
  392. register size in the register name.
  393. Revision 1.48 2002/08/14 19:19:14 carl
  394. * first_int_to_real moved to i386 (other one is generic)
  395. Revision 1.47 2002/08/11 14:32:30 peter
  396. * renamed current_library to objectlibrary
  397. Revision 1.46 2002/08/11 13:24:16 peter
  398. * saving of asmsymbols in ppu supported
  399. * asmsymbollist global is removed and moved into a new class
  400. tasmlibrarydata that will hold the info of a .a file which
  401. corresponds with a single module. Added librarydata to tmodule
  402. to keep the library info stored for the module. In the future the
  403. objectfiles will also be stored to the tasmlibrarydata class
  404. * all getlabel/newasmsymbol and friends are moved to the new class
  405. Revision 1.45 2002/07/27 19:53:51 jonas
  406. + generic implementation of tcg.g_flags2ref()
  407. * tcg.flags2xxx() now also needs a size parameter
  408. Revision 1.44 2002/07/20 11:58:01 florian
  409. * types.pas renamed to defbase.pas because D6 contains a types
  410. unit so this would conflicts if D6 programms are compiled
  411. + Willamette/SSE2 instructions to assembler added
  412. Revision 1.43 2002/07/01 18:46:31 peter
  413. * internal linker
  414. * reorganized aasm layer
  415. Revision 1.42 2002/05/20 13:30:40 carl
  416. * bugfix of hdisponen (base must be set, not index)
  417. * more portability fixes
  418. Revision 1.41 2002/05/18 13:34:24 peter
  419. * readded missing revisions
  420. Revision 1.40 2002/05/16 19:46:51 carl
  421. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  422. + try to fix temp allocation (still in ifdef)
  423. + generic constructor calls
  424. + start of tassembler / tmodulebase class cleanup
  425. Revision 1.38 2002/05/12 16:53:17 peter
  426. * moved entry and exitcode to ncgutil and cgobj
  427. * foreach gets extra argument for passing local data to the
  428. iterator function
  429. * -CR checks also class typecasts at runtime by changing them
  430. into as
  431. * fixed compiler to cycle with the -CR option
  432. * fixed stabs with elf writer, finally the global variables can
  433. be watched
  434. * removed a lot of routines from cga unit and replaced them by
  435. calls to cgobj
  436. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  437. u32bit then the other is typecasted also to u32bit without giving
  438. a rangecheck warning/error.
  439. * fixed pascal calling method with reversing also the high tree in
  440. the parast, detected by tcalcst3 test
  441. Revision 1.37 2002/04/21 19:02:07 peter
  442. * removed newn and disposen nodes, the code is now directly
  443. inlined from pexpr
  444. * -an option that will write the secondpass nodes to the .s file, this
  445. requires EXTDEBUG define to actually write the info
  446. * fixed various internal errors and crashes due recent code changes
  447. Revision 1.36 2002/04/21 15:35:23 carl
  448. * changeregsize -> rg.makeregsize
  449. Revision 1.35 2002/04/19 15:39:35 peter
  450. * removed some more routines from cga
  451. * moved location_force_reg/mem to ncgutil
  452. * moved arrayconstructnode secondpass to ncgld
  453. Revision 1.34 2002/04/15 19:44:21 peter
  454. * fixed stackcheck that would be called recursively when a stack
  455. error was found
  456. * generic changeregsize(reg,size) for i386 register resizing
  457. * removed some more routines from cga unit
  458. * fixed returnvalue handling
  459. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  460. Revision 1.33 2002/04/04 19:06:10 peter
  461. * removed unused units
  462. * use tlocation.size in cg.a_*loc*() routines
  463. Revision 1.32 2002/04/02 17:11:36 peter
  464. * tlocation,treference update
  465. * LOC_CONSTANT added for better constant handling
  466. * secondadd splitted in multiple routines
  467. * location_force_reg added for loading a location to a register
  468. of a specified size
  469. * secondassignment parses now first the right and then the left node
  470. (this is compatible with Kylix). This saves a lot of push/pop especially
  471. with string operations
  472. * adapted some routines to use the new cg methods
  473. Revision 1.31 2002/03/31 20:26:38 jonas
  474. + a_loadfpu_* and a_loadmm_* methods in tcg
  475. * register allocation is now handled by a class and is mostly processor
  476. independent (+rgobj.pas and i386/rgcpu.pas)
  477. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  478. * some small improvements and fixes to the optimizer
  479. * some register allocation fixes
  480. * some fpuvaroffset fixes in the unary minus node
  481. * push/popusedregisters is now called rg.save/restoreusedregisters and
  482. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  483. also better optimizable)
  484. * fixed and optimized register saving/restoring for new/dispose nodes
  485. * LOC_FPU locations now also require their "register" field to be set to
  486. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  487. - list field removed of the tnode class because it's not used currently
  488. and can cause hard-to-find bugs
  489. Revision 1.30 2002/03/04 19:10:13 peter
  490. * removed compiler warnings
  491. }