Commit Graph

40 Commits

Author SHA1 Message Date
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
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
b6ccf54ae9 * fixed error in register renaming in case the first changed instruction
is an "addl %reg2,%reg1" (was changed into "leal (%reg2,%reg1),%reg2",
    now into "leal (%reg1,%reg1),%reg2")

git-svn-id: trunk@7832 -
2007-06-27 18:30:10 +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
Jonas Maebe
5692b93a52 * fixed bug in regalloc info in case a sequence is swapped with
a storeback at the end (i.e., "mov x,y" ... "mov y,x")

git-svn-id: trunk@2197 -
2006-01-06 15:29:25 +00:00
daniel
45bcc5b07a * Add support for jmp $0011:$22334455 to Intel asm reader, request from
a user that is writing an operating system.
  * Fix mkx86ins bug to interpret imm16:imm32 as a single operand

git-svn-id: trunk@606 -
2005-07-10 07:42:14 +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
Jonas Maebe
66755db8b4 * fixed web bug #3905 2005-04-22 15:55:08 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
Jonas Maebe
c9eba4e861 * fixed web bug #3378 2004-10-31 15:17:08 +00:00
Jonas Maebe
cf085fb9d0 * several fixes to allocregbetween() 2004-10-10 15:01:19 +00:00
Jonas Maebe
3a1e8981f4 * do not rename registers across conditional jumps 2004-08-17 16:34:58 +00:00
florian
8a9758c5e2 * logs truncated 2004-06-20 08:55:28 +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
Jonas Maebe
6abc491796 - disable removal of dead loads before a call, because register
parameters are released before a call
  * fix storeback of registers in case of different sizes (e.g., first
    a "movl %eax,%edx" and later a "movb %dl,%al")
2003-12-15 16:08:15 +00:00
Jonas Maebe
f3d82160b1 * fixed some more bugs which only showed up in a ppc cross compiler 2003-12-07 19:19:56 +00:00
Jonas Maebe
aad37ce53c * fixed optimiser so it compiles again
* fixed several bugs which were in there already for a long time, but
    which only popped up now :) -O2/-O3 will now optimise less than in
    the past (and correctly so), but -O2u/-O3u will optimise a bit more
  * some more small improvements for -O3 are still possible
2003-11-22 00:40:19 +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
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
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +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
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
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
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
Jonas Maebe
97c1152c6d * finer granularity for allocation of reused/replaced registers 2001-10-12 13:55: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
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
8e1fa5b1de * fixed bug where "shl $1,%reg" was changed to "leal (%reg),%reg2"
instread of to "leal (,%reg,2),%reg2"
2000-12-05 09:32:47 +00:00
florian
b9796f6a7f * unused units removed from uses clause
* some changes for widestrings
2000-11-29 00:30:30 +00:00
Jonas Maebe
3009d5e82b * fixed bug where "imul mem32,reg,reg" could be generated 2000-11-22 16:30:04 +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