n386cnv.pas 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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,defutil,defcmp;
  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. {$ifdef fpc}@{$endif}second_nothing, { variant_2_dynarray }
  330. {$ifdef fpc}@{$endif}second_nothing { dynarray_2_variant}
  331. );
  332. type
  333. tprocedureofobject = procedure of object;
  334. var
  335. r : packed record
  336. proc : pointer;
  337. obj : pointer;
  338. end;
  339. begin
  340. { this is a little bit dirty but it works }
  341. { and should be quite portable too }
  342. r.proc:=secondconvert[c];
  343. r.obj:=self;
  344. tprocedureofobject(r){$ifdef FPC}();{$endif FPC}
  345. end;
  346. {$else}
  347. begin
  348. case c of
  349. tc_equal,
  350. tc_not_possible,
  351. tc_string_2_string : second_nothing;
  352. tc_char_2_string : second_char_to_string;
  353. tc_char_2_chararray : second_nothing;
  354. tc_pchar_2_string : second_nothing;
  355. tc_cchar_2_pchar : second_nothing;
  356. tc_cstring_2_pchar : second_cstring_to_pchar;
  357. tc_ansistring_2_pchar : second_ansistring_to_pchar;
  358. tc_string_2_chararray : second_string_to_chararray;
  359. tc_chararray_2_string : second_nothing;
  360. tc_array_2_pointer : second_array_to_pointer;
  361. tc_pointer_2_array : second_pointer_to_array;
  362. tc_int_2_int : second_int_to_int;
  363. tc_int_2_bool : second_int_to_bool;
  364. tc_bool_2_bool : second_bool_to_bool;
  365. tc_bool_2_int : second_bool_to_int;
  366. tc_real_2_real : second_real_to_real;
  367. tc_int_2_real : second_int_to_real;
  368. tc_proc_2_procvar : second_proc_to_procvar;
  369. tc_arrayconstructor_2_set : second_nothing;
  370. tc_load_smallset : second_nothing;
  371. tc_cord_2_pointer : second_cord_to_pointer;
  372. tc_intf_2_string : second_nothing;
  373. tc_intf_2_guid : second_nothing;
  374. tc_class_2_intf : second_class_to_intf;
  375. tc_char_2_char : second_char_to_char;
  376. tc_normal_2_smallset : second_nothing;
  377. tc_dynarray_2_openarray : second_nothing;
  378. tc_pwchar_2_string : second_nothing;
  379. tc_variant_2_dynarray : second_nothing;
  380. tc_dynarray_2_variant : second_nothing;
  381. else internalerror(2002101101);
  382. end;
  383. end;
  384. {$endif}
  385. begin
  386. ctypeconvnode:=ti386typeconvnode;
  387. end.
  388. {
  389. $Log$
  390. Revision 1.53 2002-12-05 14:27:42 florian
  391. * some variant <-> dyn. array stuff
  392. Revision 1.52 2002/11/25 17:43:26 peter
  393. * splitted defbase in defutil,symutil,defcmp
  394. * merged isconvertable and is_equal into compare_defs(_ext)
  395. * made operator search faster by walking the list only once
  396. Revision 1.51 2002/10/10 16:14:54 florian
  397. * fixed to reflect last tconvtype change
  398. Revision 1.50 2002/10/05 12:43:29 carl
  399. * fixes for Delphi 6 compilation
  400. (warning : Some features do not work under Delphi)
  401. Revision 1.49 2002/09/17 18:54:03 jonas
  402. * a_load_reg_reg() now has two size parameters: source and dest. This
  403. allows some optimizations on architectures that don't encode the
  404. register size in the register name.
  405. Revision 1.48 2002/08/14 19:19:14 carl
  406. * first_int_to_real moved to i386 (other one is generic)
  407. Revision 1.47 2002/08/11 14:32:30 peter
  408. * renamed current_library to objectlibrary
  409. Revision 1.46 2002/08/11 13:24:16 peter
  410. * saving of asmsymbols in ppu supported
  411. * asmsymbollist global is removed and moved into a new class
  412. tasmlibrarydata that will hold the info of a .a file which
  413. corresponds with a single module. Added librarydata to tmodule
  414. to keep the library info stored for the module. In the future the
  415. objectfiles will also be stored to the tasmlibrarydata class
  416. * all getlabel/newasmsymbol and friends are moved to the new class
  417. Revision 1.45 2002/07/27 19:53:51 jonas
  418. + generic implementation of tcg.g_flags2ref()
  419. * tcg.flags2xxx() now also needs a size parameter
  420. Revision 1.44 2002/07/20 11:58:01 florian
  421. * types.pas renamed to defbase.pas because D6 contains a types
  422. unit so this would conflicts if D6 programms are compiled
  423. + Willamette/SSE2 instructions to assembler added
  424. Revision 1.43 2002/07/01 18:46:31 peter
  425. * internal linker
  426. * reorganized aasm layer
  427. Revision 1.42 2002/05/20 13:30:40 carl
  428. * bugfix of hdisponen (base must be set, not index)
  429. * more portability fixes
  430. Revision 1.41 2002/05/18 13:34:24 peter
  431. * readded missing revisions
  432. Revision 1.40 2002/05/16 19:46:51 carl
  433. + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
  434. + try to fix temp allocation (still in ifdef)
  435. + generic constructor calls
  436. + start of tassembler / tmodulebase class cleanup
  437. Revision 1.38 2002/05/12 16:53:17 peter
  438. * moved entry and exitcode to ncgutil and cgobj
  439. * foreach gets extra argument for passing local data to the
  440. iterator function
  441. * -CR checks also class typecasts at runtime by changing them
  442. into as
  443. * fixed compiler to cycle with the -CR option
  444. * fixed stabs with elf writer, finally the global variables can
  445. be watched
  446. * removed a lot of routines from cga unit and replaced them by
  447. calls to cgobj
  448. * u32bit-s32bit updates for and,or,xor nodes. When one element is
  449. u32bit then the other is typecasted also to u32bit without giving
  450. a rangecheck warning/error.
  451. * fixed pascal calling method with reversing also the high tree in
  452. the parast, detected by tcalcst3 test
  453. Revision 1.37 2002/04/21 19:02:07 peter
  454. * removed newn and disposen nodes, the code is now directly
  455. inlined from pexpr
  456. * -an option that will write the secondpass nodes to the .s file, this
  457. requires EXTDEBUG define to actually write the info
  458. * fixed various internal errors and crashes due recent code changes
  459. Revision 1.36 2002/04/21 15:35:23 carl
  460. * changeregsize -> rg.makeregsize
  461. Revision 1.35 2002/04/19 15:39:35 peter
  462. * removed some more routines from cga
  463. * moved location_force_reg/mem to ncgutil
  464. * moved arrayconstructnode secondpass to ncgld
  465. Revision 1.34 2002/04/15 19:44:21 peter
  466. * fixed stackcheck that would be called recursively when a stack
  467. error was found
  468. * generic changeregsize(reg,size) for i386 register resizing
  469. * removed some more routines from cga unit
  470. * fixed returnvalue handling
  471. * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
  472. Revision 1.33 2002/04/04 19:06:10 peter
  473. * removed unused units
  474. * use tlocation.size in cg.a_*loc*() routines
  475. Revision 1.32 2002/04/02 17:11:36 peter
  476. * tlocation,treference update
  477. * LOC_CONSTANT added for better constant handling
  478. * secondadd splitted in multiple routines
  479. * location_force_reg added for loading a location to a register
  480. of a specified size
  481. * secondassignment parses now first the right and then the left node
  482. (this is compatible with Kylix). This saves a lot of push/pop especially
  483. with string operations
  484. * adapted some routines to use the new cg methods
  485. Revision 1.31 2002/03/31 20:26:38 jonas
  486. + a_loadfpu_* and a_loadmm_* methods in tcg
  487. * register allocation is now handled by a class and is mostly processor
  488. independent (+rgobj.pas and i386/rgcpu.pas)
  489. * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas)
  490. * some small improvements and fixes to the optimizer
  491. * some register allocation fixes
  492. * some fpuvaroffset fixes in the unary minus node
  493. * push/popusedregisters is now called rg.save/restoreusedregisters and
  494. (for i386) uses temps instead of push/pop's when using -Op3 (that code is
  495. also better optimizable)
  496. * fixed and optimized register saving/restoring for new/dispose nodes
  497. * LOC_FPU locations now also require their "register" field to be set to
  498. R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only)
  499. - list field removed of the tnode class because it's not used currently
  500. and can cause hard-to-find bugs
  501. Revision 1.30 2002/03/04 19:10:13 peter
  502. * removed compiler warnings
  503. }