Commit Graph

49 Commits

Author SHA1 Message Date
Jonas Maebe
3c5d94dc64 * fixed nil pointer access 2003-07-24 10:45:40 +00:00
Jonas Maebe
db7d93495b * first small steps towards an oop optimizer 2003-06-08 18:48:03 +00:00
peter
4c66ac6cab * internal changeregsize for optimizer
* fix with a hack to not remove the first instruction of a block
    which will leave blockstart pointing to invalid memory
2003-06-03 21:09:05 +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
peter
abca40f041 * regvar fixes 2003-05-16 14:33:31 +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
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
peter
3f0491bb38 * changed reg2opsize to function 2003-03-18 18:15:53 +00:00
daniel
18ab545cb7 * Fixed the optimizer 2003-02-26 21:15:43 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
peter
98dd65b0f3 * inlining is now also allowed in interface
* renamed write/load to ppuwrite/ppuload
  * tnode storing in ppu
  * nld,ncon,nbas are already updated for storing in ppu
2002-08-18 20:06:23 +00:00
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
peter
4285e99853 * internal linker
* reorganized aasm layer
2002-07-01 18:46:20 +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
carl
fb605f11b0 * changeregsize -> rg.makeregsize 2002-04-21 15:29:53 +00:00
carl
b4f0af389d + generic FPC_CHECKPOINTER
+ first parameter offset in stack now portable
* rename some constants
+ move some cpu stuff to other units
- remove unused constents
* fix stacksize for some targets
* fix generic size problems which depend now on EXTEND_SIZE constant
* removing frame pointer in routines is only available for : i386,m68k and vis targets
2002-04-20 21:37:07 +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
carl
79b490d551 + target_info.size_of_pointer -> pointer_size
+ some cleanup of unused types/variables
* move several constants from cpubase to their specific units
  (where they are used)
+ att_Reg2str -> gas_reg2str
+ int_reg2str -> std_reg2str
2002-04-15 19:12:09 +00:00
carl
39c86c857d + att_reg2str -> gas_reg2str 2002-04-14 16:58:41 +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
f9e7a027b9 * unnecessary loads of constants are now also remove by
removePrevNotUsedLoad()
2001-12-04 15:58:13 +00:00
Jonas Maebe
fe8b328091 * added missing allocregbetween() call for a memtoreg() optimization 2001-11-30 16:35:02 +00:00
Jonas Maebe
e02d95ed13 + replace mem accesses to locations to which a reg was stored recently with that reg 2001-10-27 10:20:43 +00:00
Jonas Maebe
66567674ba + also replace mem references in modify operands with regs 2001-10-14 11:50:21 +00:00
Jonas Maebe
82f7cf0957 + memory references are now replaced by register reads in "regular"
instructions (e.g. "addl ref1,%eax" will be replaced by "addl %ebx,%eax"
    if %ebx contains ref1). Previously only complete load sequences were
    optimized away, but not such small accesses in other instructions than
    mov/movzx/movsx
2001-10-12 13:58:05 +00:00
Jonas Maebe
1fd6a2c5f8 * commented out some inactive code in csopt386
+ small improvement: lea is now handled the same as mov/zx/sx
2001-09-04 14:01:03 +00:00
Jonas Maebe
003549eba1 * the optimizer now keeps track of flags register usage. This fixes some
optimizer bugs with int64 calculations (because of the carry flag usage)
  * fixed another bug which caused wrong optimizations with complex
    array expressions
2001-08-29 14:07:43 +00:00
florian
9746f4c2d6 * some cg reorganisation
* some PPC updates
2001-08-26 13:35:06 +00:00
Jonas Maebe
a022ac9bb2 * fixed bug due to short boolean evaluation 2001-04-06 16:24:38 +00:00
peter
4e2655cdc5 * resulttype rewrite 2001-04-02 21:20:29 +00:00
michael
d5ef327f9e + Patch from jonas so 1.0.2 can be used to cycle 2001-01-10 08:52:40 +00:00
Jonas Maebe
7725beb1e3 * fixed crashing bug to due previous changes 2001-01-07 15:51:17 +00:00
Jonas Maebe
e753af622e * fixed webbug 1323 2001-01-06 23:35:05 +00:00
peter
32b9cdb7cf + new tlinkedlist class (merge of old tstringqueue,tcontainer and
tlinkedlist objects)
2000-12-25 00:07:25 +00:00
Jonas Maebe
72bc010795 * when searching for constants in registers, the returned register
sometimes didn't have the same size as the requested size
2000-12-05 09:33:42 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
Jonas Maebe
3974b23c97 + support for optimizing simple sequences with div/idiv/mul opcodes 2000-11-28 16:32:11 +00:00
Jonas Maebe
a86df1002b * fixed some bugs in checksequence 2000-11-14 12:17:34 +00:00
Jonas Maebe
1331a2e753 * fixed range check error 2000-11-09 12:34:44 +00:00
Jonas Maebe
5be6c35518 * some small improvements 2000-11-03 17:53:24 +00:00
Jonas Maebe
850e8de88b * register contents were not cleared if there was only 1 instruction
between de previous sequence and the current one
2000-11-01 22:53:30 +00:00
Jonas Maebe
a4fde73649 + register renaming ("fixes" bug1088)
* changed command line options meanings for optimizer:
      O2 now means peepholopts, CSE and register renaming in 1 pass
      O3 is the same, but repeated until no further optimizations are
        possible or until 5 passes have been done (to avoid endless loops)
  * changed aopt386 so it does this looping
  * added some procedures from csopt386 to the interface because they're
    used by rropt386 as well
  * some changes to csopt386 and daopt386 so that newly added instructions
    by the CSE get optimizer info (they were simply skipped previously),
    this fixes some bugs
2000-10-24 10:40:52 +00:00
peter
026edfb899 * moved to i386/ 2000-10-15 09:43:29 +00:00