Commit Graph

243 Commits

Author SHA1 Message Date
Jonas Maebe
7d459cf12a * the compiler now explicitly keeps track of the minimally guaranteed
alignment for each memory reference (mantis #12137, and
    test/packages/fcl-registry/tregistry1.pp on sparc). This also
    enables better code generation for packed records in many cases.
  o several changes were made to the compiler to minimise the chances
    of accidentally forgetting to set the alignment of memory references
    in the future:
    - reference_reset*() now has an extra alignment parameter
    - location_reset() can now only be used for non LOC_(C)REFERENCE,
      use location_reset_ref() for those (split the tloc enum so the
      compiler can catch errors using range checking)

git-svn-id: trunk@12719 -
2009-02-08 13:00:24 +00:00
Jonas Maebe
718694d1d6 * always specify an explicit alignment for tgobj.gettemp (so e.g.
shortstring temps don't get maximum alignment)
  * changed some gettemptyed() calls into gettemp() calls (gettemptyped
    means that this temp can only be used for temps of that type,
    which is necessary for refcounted types but not for floats)

git-svn-id: trunk@12036 -
2008-11-08 22:20:47 +00:00
Jonas Maebe
a23630260b + "weakexternal" support for imported procedures and variables.
the syntax is exactly the same as for "external", except for
    the keyword. It is currently only active for Darwin targets.
    It should also work at least for Linux targets, but only with
    the GNU assembler (which is why it is not activated there)
  + test for this functionality

git-svn-id: trunk@12009 -
2008-11-01 18:38:32 +00:00
Jonas Maebe
c65f8e7652 * safecall is only supposed to do anything for Windows targets. Removed
partial implementation for other targets and run test only for Windows

git-svn-id: trunk@11593 -
2008-08-16 14:46:20 +00:00
florian
050627ea1d * allow goto inside finally blocks
git-svn-id: trunk@11392 -
2008-07-17 19:49:38 +00:00
Jonas Maebe
2348c7ea00 * allow ssa to happen for outer for-loop control variables
git-svn-id: trunk@11320 -
2008-07-03 19:39:23 +00:00
Jonas Maebe
f36e5411af * split cpu64bit compiler define into
a) cpu64bitaddr, which means that we are generating a compiler which
       will generate code for targets with a 64 bit address space/abi
    b) cpu64bitalu, which means that we are generating a compiler which
       will generate code for a cpu with support for 64 bit integer
       operations (possibly running in a 32 bit address space, depending
       on the cpu64bitaddr define)
   All cpus which had cpu64bit set now have both the above defines set,
   and none of the 32 bit cpus have cpu64bitalu set (and none will
   compile with it currently)
  + pint and puint types, similar to aint/aword (not pword because that
    that conflicts with pword=^word)
  * several changes from aint/aword to pint/pword
  * some changes of tcgsize2size[OS_INT] to sizeof(pint)

git-svn-id: trunk@10320 -
2008-02-13 20:44:00 +00:00
Jonas Maebe
1f1a43d7f0 * fixed crash when compiling inlined procedures containing labels
git-svn-id: trunk@9804 -
2008-01-20 10:29:04 +00:00
daniel
4ca3a590e8 * Labels that are defined or referenced in a different lexical level
than their declaration need to be code generated as global asmlabels.

git-svn-id: trunk@9791 -
2008-01-19 13:50:58 +00:00
peter
6058b2c247 * renamed t_times to executionweight and moved it to
code generation pass
  * include executionweight in the spilling decision

git-svn-id: trunk@9330 -
2007-11-25 16:38:05 +00:00
peter
1dd62b8686 * write also asmblocklabel for a connected labelsym
git-svn-id: trunk@8159 -
2007-07-23 21:01:32 +00:00
yury
9844174e5e * It is needed to destroy exception object in safecall procedure as well.
git-svn-id: trunk@7722 -
2007-06-18 17:26:15 +00:00
yury
78fe68859b * Pop the last exception object in safecall procedure.
git-svn-id: trunk@7721 -
2007-06-18 16:12:49 +00:00
yury
a7d1508959 * Fixed safecall procedures by generating implicit try/finally and setting correct return value if exception was occurred or not. Now safecall is fully Delphi compatible.
git-svn-id: trunk@7720 -
2007-06-18 14:26:08 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
Jonas Maebe
fdc813db9a * no need to synchronise the upper bound of a for-loop after the loop
anymore if it is a regvar, because it cannot be a regvar anymore
    after the fix for tw8883

git-svn-id: trunk@7358 -
2007-05-16 12:13:28 +00:00
Jonas Maebe
2c5a284060 * upper bound of for-loop cannot be a regvar, because the regvar may
be modified inside the loop (mantis #8883)

git-svn-id: trunk@7352 -
2007-05-15 20:25:30 +00:00
Jonas Maebe
21f87ef1de * fixed instances of passing properties as var parameter
git-svn-id: trunk@7249 -
2007-05-03 11:02:38 +00:00
peter
658c46b903 * remove tdictionary and tindexarray
* symtables based on TFPHashObjectList and TFPObjectList
  * rename torddef.typ to torddef.ordtype
  * rename tfloatdef.typ to tfloatdef.floattype
  * rename tdef.deftype to tdef.typ
  * remove obsolete browser code, browcol is kept so the ide
    can still be compiled

git-svn-id: trunk@5192 -
2006-11-03 00:30:30 +00:00
Jonas Maebe
97cd8c4f62 * no SSU in try/except/finally (could be enabled in finally in theory,
but requires some changes)

git-svn-id: trunk@5182 -
2006-11-02 17:02:03 +00:00
florian
ef7bd58c54 * germanism removed (aktfilepos -> current_filepos)
git-svn-id: trunk@5099 -
2006-10-30 22:37:31 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
Jonas Maebe
c25aba7592 * cleaned up subsetreg support (put everything in a record)
* prepared support for elements with arbitrary bit length (as opposed
    to a multiple of 8)

git-svn-id: trunk@4324 -
2006-08-01 20:39:53 +00:00
Jonas Maebe
e531c4f125 + very limited SSA support (only outside control flow
constructs for now)

git-svn-id: trunk@3671 -
2006-05-25 11:45:08 +00:00
Jonas Maebe
4c41e2c677 * fixed IE when using a field of a record regvar as loop control variable
(the generated code is far from optimal, need to find a way to make such
     records non regable)

git-svn-id: trunk@3639 -
2006-05-23 08:55:45 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2921 | peter | 2006-03-15 08:35:00 +0100 (Wed, 15 Mar 2006) | 2 lines

  * pass ObjectWriter to ObjectOuput

........
r2922 | peter | 2006-03-15 12:40:30 +0100 (Wed, 15 Mar 2006) | 2 lines

  * refactor asmdata

........
r2925 | peter | 2006-03-15 16:09:39 +0100 (Wed, 15 Mar 2006) | 3 lines

  * add cfi to asmdata
  * move asmlist, asmcfi, asmdata to own unit

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
ac24965242 * procedures which use goto/label revert to the older and less
efficient regvar allocation scheme
  * also allocate regvars before the loops, not just afterwards

git-svn-id: trunk@2192 -
2006-01-05 23:45:00 +00:00
Jonas Maebe
61ef30381c * Only synchronise regvars after a loop (and only those regvars
which are used in the loop). The compiler makes now much
    more efficient use of registers for register variables (and
    different regvars can now also share the same register if
    their live range does not overlap)

git-svn-id: trunk@2186 -
2006-01-05 17:48:11 +00:00
Jonas Maebe
2aa9653a61 - removed code commented out in previous commit
git-svn-id: trunk@2106 -
2006-01-01 17:42:58 +00:00
Jonas Maebe
3f86e6b728 * keep upper bound of loops in a register instead of in memory
git-svn-id: trunk@2105 -
2006-01-01 17:02:34 +00:00
peter
a3ab2053c9 * support multiple asmlabel types, renamed getlabel to
getjumplabel and added type para to getlabel for specific types
  * moved lineinfo generation from assemble and aggas to dbgstabs

git-svn-id: trunk@1120 -
2005-09-18 21:16:10 +00:00
florian
b7d874635c * fixed some small problems in loop unrolling
git-svn-id: trunk@447 -
2005-06-19 21:00:27 +00:00
florian
7cd67ea3f0 * node optimizer branch merged
* gotonode and gotolabel refactored
  * -Nu added to enable for loop unrolling

git-svn-id: trunk@446 -
2005-06-19 17:42:10 +00:00
florian
355aaa69c8 + before calling a helper procedure, all register classes are now saved, this patch is subject to being merged back
git-svn-id: trunk@201 -
2005-06-05 08:12:33 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
peter
cc2789b680 * for-node cleanup, checking for uninitialzed from and to values
is now supported
2005-01-31 16:16:21 +00:00
peter
6458bd0ce1 * tvarsym splitted 2004-11-08 22:09:58 +00:00
peter
adb6f59eef * small regvar fixes
* loadref parameter removed from concatcopy,incrrefcount,etc
2004-10-24 11:44:28 +00:00
peter
8fb3536f6e * simple regvar support, not yet finished 2004-09-26 17:45:29 +00:00
peter
65c3ba277c * ungetregister is now only used for cpuregisters, renamed to
ungetcpuregister
  * renamed (get|unget)explicitregister(s) to ..cpuregister
  * removed location-release/reference_release
2004-09-25 14:23:54 +00:00
peter
33a834821f * paraloc branch merged 2004-09-21 17:25:12 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +00:00
florian
588e2c38bf * dwarf branch merged 2004-06-16 20:07:06 +00:00
peter
207e3b1231 * cleaner temp get/unget for exceptions 2004-03-29 14:43:47 +00:00
olle
4fecc1a56f * big transformation of Tai_[const_]Symbol.Create[data]name* 2004-03-02 00:36:32 +00:00
florian
fabb9c33ac * top_symbol killed
+ refaddr to treference added
  + refsymbol to treference added
  * top_local stuff moved to an extra record to save memory
  + aint introduced
  * tppufile.get/putint64/aint implemented
2004-02-27 10:21:04 +00:00
peter
ee569d7817 * make extcycle is working again 2004-02-12 15:54:03 +00:00
peter
221090453c * x86_64 fixes for opsize 2004-02-05 18:28:37 +00:00
peter
1422985ca0 * Change several $ifdef i386 to x86
* Change several OS_32 to OS_INT/OS_ADDR
2004-01-31 17:45:16 +00:00
peter
47f08937e4 * use localalign info for alignment for locals and temps
* sparc fpu flags branching added
  * moved powerpc copy_valye_openarray to generic
2004-01-12 22:11:38 +00:00
florian
03efd6e74b * fixed wrong temp. usage in generic exception handling 2004-01-01 17:23:16 +00:00
florian
bfe452936f * reverted Peter's alloctemp patch; hopefully properly 2003-12-06 01:15:22 +00:00
peter
64b0a0eadf * delayed paraloc allocation, a_param_*() gets extra parameter
if it needs to allocate temp or real paralocation
  * optimized/simplified int-real loading
2003-12-03 23:13:19 +00:00
peter
d0de3b3ea8 * 64k registers supported
* fixed some memory leaks
2003-10-17 14:38:32 +00:00
peter
fb81b7ebbb * old trgobj moved to x86/rgcpu and renamed to trgx86fpu
* tregisteralloctor renamed to trgobj
  * removed rgobj from a lot of units
  * moved location_* and reference_* to cgobj
  * first things for mmx register allocation
2003-10-10 17:48:13 +00:00
daniel
b2343f4b16 * Register allocator splitted, ans abstract now 2003-10-09 21:31:37 +00:00
peter
70fe77ca7c * procinfo unit contains tprocinfo
* cginfo renamed to cgbase
  * moved cgmessage to verbose
  * fixed ppc and sparc compiles
2003-10-01 20:34:48 +00:00
peter
8af51ea6d3 * locals and paras are allocated in the code generation
* tvarsym.localloc contains the location of para/local when
    generating code for the current procedure
2003-09-23 17:56:05 +00:00
marco
cd5ae5fcc3 * Patch from Peter for paraloc 2003-09-10 08:31:47 +00:00
peter
b9d09a4e5c * preparations for different default calling conventions
* various RA fixes
2003-09-07 22:09:34 +00:00
peter
6a8d5eb25d * NEWRA branch merged 2003-09-03 15:55:00 +00:00
florian
220e05dd5e * fixed arm concatcopy
+ arm support in the common compiler sources added
  * moved some generic cg code around
  + tfputype added
  * ...
2003-09-03 11:18:36 +00:00
olle
d69418fe36 * made FPC_RAISEEXCEPTION compatible with MacOS 2003-08-24 21:38:43 +00:00
peter
6731abb0db * fixed some reported bugs 2003-08-10 17:25:23 +00:00
daniel
42c320cb29 * cs_regalloc renamed to cs_regvars to avoid confusion with register
allocator
  * Some preventive changes to i386 spillinh code
2003-08-09 18:56:54 +00:00
Jonas Maebe
355f84758e * several rg.allocexplicitregistersint/rg.deallocexplicitregistersint
pairs round calls to helpers
2003-07-23 11:01:14 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
Jonas Maebe
c8978e3440 * fixed for callparatemp 2003-06-09 14:38:52 +00:00
peter
77d641fa2a * init/final of procedure data splitted from genentrycode
* use asmnode getposition to insert final at the correct position
    als for the implicit try...finally
2003-06-09 12:23:29 +00:00
Jonas Maebe
edb2179730 + added freeintparaloc
* ppc get/freeintparaloc now check whether the parameter regs are
    properly allocated/deallocated (and get an extra list para)
  * ppc a_call_* now internalerrors if pi_do_call is not yet set
  * fixed lot of missing pi_do_call's
2003-06-07 18:57:04 +00:00
peter
d91c880148 * cg.a_load_* get a from and to size specifier
* makeregsize only accepts newregister
  * i386 uses generic tcgnotnode,tcgunaryminus
2003-06-03 21:11:09 +00:00
peter
230a14ff68 * getregisterfpu size parameter added
* op_const_reg size parameter added
  * sparc updates
2003-06-01 21:38:06 +00:00
peter
414bd5fa22 * more sparc cleanup
* accumulator removed, splitted in function_return_reg (called) and
    function_result_reg (caller)
2003-05-30 23:57:08 +00:00
Jonas Maebe
0357f71e14 * fixed several regvar related bugs for non-i386. make cycle with -Or now
works for ppc
2003-05-30 18:55:21 +00:00
peter
047a066711 * procinlinenode removed
* aktexit2label removed, fast exit removed
  + tcallnode.inlined_pass_2 added
2003-05-26 21:17:17 +00:00
peter
8ff5792776 * remove some unit dependencies
* current_procinfo changes to store more info
2003-05-23 14:27:35 +00:00
Jonas Maebe
cb279b2029 * changed tt_persistant to tt_persistent :)
* tempcreatenode now doesn't accept a boolean anymore for persistent
    temps, but a ttemptype, so you can also create ansistring temps etc
2003-05-17 13:30:08 +00:00
peter
abca40f041 * regvar fixes 2003-05-16 14:33:31 +00:00
peter
05c05f2555 * failn removed
* inherited result code check moven to pexpr
2003-05-13 19:14:41 +00:00
peter
26d78ff5c9 * moved implicit exception frame from ncgutil to psub
* constructor/destructor helpers moved from cobj/ncgutil to psub
2003-05-11 21:37:03 +00:00
florian
de6916276a * merged more x86-64/i386 code 2003-04-30 15:45:35 +00:00
michael
cf68b27bb9 + Patch from peter to fix wrong pushing of ansistring function results in open array 2003-04-29 07:28:52 +00:00
peter
60978ba89c * aktprocdef renamed to current_procdef
* procinfo renamed to current_procinfo
  * procinfo will now be stored in current_module so it can be
    cleaned up properly
  * gen_main_procsym changed to create_main_proc and release_main_proc
    to also generate a tprocinfo structure
  * fixed unit implicit initfinal
2003-04-27 11:21:32 +00:00
peter
47489f2376 * firstpass uses expectloc
* checks if there are differences between the expectloc and
    location.loc from secondpass in EXTDEBUG
2003-04-22 23:50:22 +00:00
daniel
a32926e2fc * Some work on interference graph construction 2003-04-17 07:50:24 +00:00
olle
a069aadad0 * changed newasmsymbol to newasmsymboldata for data symbols 2003-04-06 21:11:23 +00:00
peter
c4ddcc78a8 * generic constructor working for i386
* remove fixed self register
  * esi added as address register for i386
2003-03-28 19:16:56 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
carl
2c19def917 * bugfix of FPU emulation code 2003-02-15 22:17:38 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
daniel
e53536b234 * Compiler now cycles with var_notification 2003-01-03 09:51:58 +00:00
daniel
382902d556 * Some debugging on for loop optimization 2003-01-02 15:29:25 +00:00
daniel
158e9689d7 + Notification implementation complete
+ Add for loop code optimization using notifications
   results in 1.5-1.9% speed improvement in nestloop benchmark
   Optimization incomplete, compiler does not cycle yet with
   notifications enabled.
2002-12-31 09:55:58 +00:00
florian
e8bb7d10c3 * loop node flags from node flags splitted 2002-11-28 11:17:01 +00:00
peter
f3fc72095f * splitted defbase in defutil,symutil,defcmp
* merged isconvertable and is_equal into compare_defs(_ext)
  * made operator search faster by walking the list only once
2002-11-25 17:43:16 +00:00
florian
d5f0cbbf2b * fixes to common code to get the alpha compiler compiled applied 2002-09-30 07:00:44 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
peter
274624f2f6 * assignn check in exitnode changed to use a separate boolean as the
assignn can be changed to a calln
2002-09-01 18:47:00 +00:00
peter
7d02a4f264 * increase refcount in exit(arg) for arg 2002-09-01 14:41:47 +00:00
peter
563a0dc818 * fixed wrong label in jump of except block (was also in n386flw wrong)
* fixed wrong pushing of raise parameters
  * fixed wrong compare in finally
2002-08-24 18:41:52 +00:00
peter
4b81e16fe2 * tempgen cleanup
* tt_noreuse temp type added that will be used in genentrycode
2002-08-23 16:14:48 +00:00
peter
91b49914f6 * More fixes for cross unit inlining, all tnodes are now implemented
* Moved pocall_internconst to po_internconst because it is not a
    calling type at all and it conflicted when inlining of these small
    functions was requested
2002-08-19 19:36:42 +00:00
carl
588abc6631 * jmpbuf size allocation for exceptions is now cpu specific (as it should)
* more generic nodes for maths
  * several fixes for better m68k support
2002-08-15 15:15:55 +00:00
carl
c68b2dfbee * rename swatoperands to swapoperands
+ m68k first compilable version (still needs a lot of testing):
      assembler generator, system information , inline
      assembler reader.
2002-08-13 18:01:50 +00:00
peter
425bb45ddc * renamed current_library to objectlibrary 2002-08-11 14:32:25 +00:00
peter
ac71268ce6 * saving of asmsymbols in ppu supported
* asmsymbollist global is removed and moved into a new class
    tasmlibrarydata that will hold the info of a .a file which
    corresponds with a single module. Added librarydata to tmodule
    to keep the library info stored for the module. In the future the
    objectfiles will also be stored to the tasmlibrarydata class
  * all getlabel/newasmsymbol and friends are moved to the new class
2002-08-11 13:24:10 +00:00
carl
3a70811b1a * fixed generic exception management 2002-08-09 19:10:59 +00:00
carl
32f3f65a26 + added generic exception support (still does not work!)
+ more documentation
2002-08-04 19:06:41 +00:00
Jonas Maebe
6b83738e7d + generic implementation of tcg.g_flags2ref()
* tcg.flags2xxx() now also needs a size parameter
2002-07-27 19:53:51 +00:00
carl
448d40de1a + FPURESULTREG -> FPU_RESULT_REG 2002-07-25 17:56:29 +00:00
daniel
0af1f3883c * Changed booleans into flags 2002-07-21 06:58:49 +00:00
daniel
23a5c653bf * Optimized the code generated for for nodes. The shootout/nestloop benchmark
now runs 5% faster on my computer.
2002-07-20 12:54:53 +00:00
florian
59abf2555b * types.pas renamed to defbase.pas because D6 contains a types
unit so this would conflicts if D6 programms are compiled
  + Willamette/SSE2 instructions to assembler added
2002-07-20 11:57:52 +00:00
daniel
8cbd40c2f0 * The for node does a check if the first comparision can be skipped. I moved
the check from the second pass to the resulttype pass. The advantage is
  that the state tracker can now decide to skip the first comparision too.
2002-07-20 11:15:51 +00:00
daniel
95427989a6 * Loops should not be aligned when optimizing for size 2002-07-20 08:14:24 +00:00
daniel
399036f1c2 * State tracker work
* The whilen and repeatn are now completely unified into whilerepeatn. This
  allows the state tracker to change while nodes automatically into
  repeat nodes.
* Resulttypepass improvements to the notn. 'not not a' is optimized away and
  'not(a>b)' is optimized into 'a<=b'.
* Resulttypepass improvements to the whilerepeatn. 'while not a' is optimized
  by removing the notn and later switchting the true and falselabels. The
  same is done with 'repeat until not a'.
2002-07-19 11:41:34 +00:00
florian
479a745096 * first x86-64 patches 2002-07-04 20:43:00 +00:00
peter
4285e99853 * internal linker
* reorganized aasm layer
2002-07-01 18:46:20 +00:00
peter
68ce5a00e5 * cg64 patch
* basics for currency
  * asnode updates for class and interface (not finished)
2002-07-01 16:23:52 +00:00
carl
d75603c2ed * bugfix of hdisponen (base must be set, not index)
* more portability fixes
2002-05-20 13:30:40 +00:00
peter
06ebac4e27 * readded missing revisions 2002-05-18 13:34:04 +00:00
carl
21b3a10f02 + defines.inc -> fpcdefs.inc to avoid conflicts if compiling by hand
+ try to fix temp allocation (still in ifdef)
+ generic constructor calls
+ start of tassembler / tmodulebase class cleanup
2002-05-16 19:46:34 +00:00
peter
2992e1819c * removed old logs and updated copyright year 2002-05-14 19:34:38 +00:00
peter
4a176c81bc * removed n386ld and n386util units
* maybe_save/maybe_restore added instead of the old maybe_push
2002-05-13 19:54:36 +00:00
peter
4dcd96747e * moved entry and exitcode to ncgutil and cgobj
* foreach gets extra argument for passing local data to the
    iterator function
  * -CR checks also class typecasts at runtime by changing them
    into as
  * fixed compiler to cycle with the -CR option
  * fixed stabs with elf writer, finally the global variables can
    be watched
  * removed a lot of routines from cga unit and replaced them by
    calls to cgobj
  * u32bit-s32bit updates for and,or,xor nodes. When one element is
    u32bit then the other is typecasted also to u32bit without giving
    a rangecheck warning/error.
  * fixed pascal calling method with reversing also the high tree in
    the parast, detected by tcalcst3 test
2002-05-12 16:53:04 +00:00
carl
59f8a16c39 + a_jmp_cond -> a_jmp_always (a_jmp_cond is NOT portable)
+ changeregsize -> rg.makeregsize
2002-04-21 15:24:38 +00:00
peter
3bcfe33002 * fixed stackcheck that would be called recursively when a stack
error was found
  * generic changeregsize(reg,size) for i386 register resizing
  * removed some more routines from cga unit
  * fixed returnvalue handling
  * fixed default stacksize of linux and go32v2, 8kb was a bit small :-)
2002-04-15 19:44:18 +00:00
peter
5e7a1e3729 * removed unused units
* use tlocation.size in cg.a_*loc*() routines
2002-04-04 19:05:54 +00:00
peter
5b242f7741 * tlocation,treference update
* LOC_CONSTANT added for better constant handling
  * secondadd splitted in multiple routines
  * location_force_reg added for loading a location to a register
    of a specified size
  * secondassignment parses now first the right and then the left node
    (this is compatible with Kylix). This saves a lot of push/pop especially
    with string operations
  * adapted some routines to use the new cg methods
2002-04-02 17:11:27 +00:00
Jonas Maebe
7fb55bf4e4 + 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
2002-03-31 20:26:33 +00:00
peter
b4cc4b7b01 * removed compiler warnings 2002-03-04 19:10:11 +00:00
Jonas Maebe
f15dbd7bf0 * range checking is now processor independent (part in cgobj, part in cg64f32) and should work correctly again (it needed some changes after the changes of the low and high of tordef's to int64) * maketojumpbool() is now processor independent (in ncgutil) * getregister32 is now called getregisterint 2001-12-30 17:24:45 +00:00
Jonas Maebe
91f567bb66 * powerpc/cgcpu.pas compiles :)
* several powerpc-related fixes
  * cpuasm unit is now based on common tainst unit
  + nppcmat unit for powerpc (almost complete)
2001-12-29 15:28:57 +00:00
Jonas Maebe
6dbf240bde * less unnecessary regvar loading with if-statements 2001-12-02 16:19:17 +00:00
peter
d2e1952377 * procsym definition rewrite 2001-11-02 22:58:00 +00:00
Jonas Maebe
bdf2593265 * fixed range check errors 2001-10-04 14:33:28 +00:00
Jonas Maebe
4be6d060a4 - removed unused units 2001-09-30 16:19:58 +00:00
Jonas Maebe
b374bec6fb * 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
2001-09-28 20:39:32 +00:00