{ $Id$ Copyright (c) 2000 by Florian Klaempfl Includes the i386 code generator This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. **************************************************************************** } unit cpunode; {$i defines.inc} interface implementation uses ncgbas,ncgflw,ncgcnv,ncgld,ncgmem,ncgcon, n386ld,n386add,n386cal,n386con,n386cnv,n386flw,n386mat,n386mem, n386set,n386inl,n386opt, { this not really a node } n386obj, rgcpu; end. { $Log$ Revision 1.9 2002-04-19 15:39:35 peter * removed some more routines from cga * moved location_force_reg/mem to ncgutil * moved arrayconstructnode secondpass to ncgld Revision 1.8 2002/03/31 20:26:38 jonas + a_loadfpu_* and a_loadmm_* methods in tcg * register allocation is now handled by a class and is mostly processor independent (+rgobj.pas and i386/rgcpu.pas) * temp allocation is now handled by a class (+tgobj.pas, -i386\tgcpu.pas) * some small improvements and fixes to the optimizer * some register allocation fixes * some fpuvaroffset fixes in the unary minus node * push/popusedregisters is now called rg.save/restoreusedregisters and (for i386) uses temps instead of push/pop's when using -Op3 (that code is also better optimizable) * fixed and optimized register saving/restoring for new/dispose nodes * LOC_FPU locations now also require their "register" field to be set to R_ST, not R_ST0 (the latter is used for LOC_CFPUREGISTER locations only) - list field removed of the tnode class because it's not used currently and can cause hard-to-find bugs Revision 1.6 2001/09/29 21:32:47 jonas * almost all second pass typeconvnode helpers are now processor independent * fixed converting boolean to int64/qword * fixed register allocation bugs which could cause internalerror 10 * isnode and asnode are completely processor indepent now as well * fpc_do_as now returns its class argument (necessary to be able to use it properly with compilerproc) Revision 1.5 2001/09/28 20:39:33 jonas * changed all flow control structures (except for exception handling related things) to processor independent code (in new ncgflw unit) + generic cgobj unit which contains lots of code generator helpers with global "cg" class instance variable + cgcpu unit for i386 (implements processor specific routines of the above unit) * updated cgbase and cpubase for the new code generator units * include ncgflw unit in cpunode unit Revision 1.4 2001/05/18 22:31:06 peter * tasmnode.pass_2 is independent of cpu, moved to ncgbas * include ncgbas for independent nodes Revision 1.3 2001/04/21 13:37:17 peter * made tclassheader using class of to implement cpu dependent code Revision 1.2 2000/12/31 11:14:11 jonas + implemented/fixed docompare() mathods for all nodes (not tested) + nopt.pas, nadd.pas, i386/n386opt.pas: optimized nodes for adding strings and constant strings/chars together * n386add.pas: don't copy temp strings (of size 256) to another temp string when adding Revision 1.1 2000/10/15 09:39:37 peter * moved cpu*.pas to i386/ * renamed n386 to common cpunode Revision 1.1 2000/10/14 10:14:47 peter * moehrendorf oct 2000 rewrite }