Commit Graph

460 Commits

Author SHA1 Message Date
Jonas Maebe
4c1d540a21 * changed cpurequiresproperalignment from a compile-time define into
a target flag, since some kernels may be able to handle alignment
    problems, and the alignment requirements may not be absolute (e.g. on
    ppc64, only 8 byte values need alignment, and only to 4 byte boundaries)
   -> linux/ppc64 has tf_requires_proper_alignment set in its target flags,
      darwin/ppc64 hasn't

git-svn-id: trunk@6745 -
2007-03-06 16:10:56 +00:00
Jonas Maebe
c13ff3729b * Merged 2.3 branch changes:
+ darwin/ppc64 support
    + val/str/read(ln)/write(ln) support for enums
    + simple cse at the node tree level
    + if-node simplify support
    + simple ssa support for memory locations
    + support for optional overflow/rangecheck boolean parameters for
      operators
    * a lot of unification of the ppc32/ppc64 code generators


........
r6380 | jonas | 2007-02-08 21:25:36 +0100 (Thu, 08 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/tgobj.pas
   A /branches/fpc_2_3/tests/webtbs/tw8283.pp

  + support for replacing the memory location of a temp (including
    local variables) with that of another temp to avoid unnecessary
    copies (mantis #8283)

........
r6381 | jonas | 2007-02-08 22:53:36 +0100 (Thu, 08 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/nflw.pas
   A /branches/fpc_2_3/tests/webtbs/tw8282.pp

  + simplify support for ifn (based on patch by Florian)

........
r6386 | peter | 2007-02-09 13:48:53 +0100 (Fri, 09 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/htypechk.pas
   M /branches/fpc_2_3/compiler/ncal.pas
   M /branches/fpc_2_3/compiler/symconst.pas

  * overflow,rangecheck optional parameters for operators, patch from 8281

........
r6391 | jonas | 2007-02-09 23:52:13 +0100 (Fri, 09 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   M /branches/fpc_2_3/compiler/powerpc64/cpunode.pas
   D /branches/fpc_2_3/compiler/powerpc64/nppcinl.pas
   M /branches/fpc_2_3/compiler/ppcgen/ngppcinl.pas

  * merged fsqrt(s) support to common powerpc unit, activate for ppc32
    if -Op970 is used (still default for ppc64, since default cpu there
    is already ppc970)

........
r6394 | jonas | 2007-02-10 18:58:47 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * adapted a_jmp_name for darwin/ppc64
  * merged g_intf_wrapper for ppc32 and ppc64, and added darwin/ppc64
    support to it

........
r6396 | jonas | 2007-02-10 20:16:06 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cgobj.pas

  + darwin/ppc64 support for g_indirect_sym_load

........
r6397 | jonas | 2007-02-10 20:22:49 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  + darwin/ppc64 support to ppc64's fixref
  * moved ppc32 a_load_store to cgppc and use it for darwin/ppc64 as
    well (its relocatable symbols are only 32 bits large)

........
r6399 | jonas | 2007-02-10 22:02:37 +0100 (Sat, 10 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems.pas

  + system_x86_64_darwin identifier
  + set default source system for system_x86_64_darwin and
    system_powerpc64_darwin

........
r6404 | jonas | 2007-02-10 23:01:23 +0100 (Sat, 10 Feb 2007) | 5 lines
Changed paths:
   M /branches/fpc_2_3/compiler/aasmdata.pas
   M /branches/fpc_2_3/compiler/aggas.pas
   M /branches/fpc_2_3/compiler/cgobj.pas
   M /branches/fpc_2_3/compiler/cgutils.pas
   M /branches/fpc_2_3/compiler/cresstr.pas
   M /branches/fpc_2_3/compiler/dbgdwarf.pas
   M /branches/fpc_2_3/compiler/dbgstabs.pas
   M /branches/fpc_2_3/compiler/ncgutil.pas
   M /branches/fpc_2_3/compiler/ogelf.pas
   M /branches/fpc_2_3/compiler/pdecvar.pas
   M /branches/fpc_2_3/compiler/pmodules.pas
   M /branches/fpc_2_3/compiler/symdef.pas
   M /branches/fpc_2_3/compiler/systems.pas

  + system_x86_64_darwin identifier
  + systems_darwin set which collects all darwin variants
  + added support for darwin/ppc64 and darwin/x86_64 where needed in
    the generic code

........
r6406 | jonas | 2007-02-10 23:24:32 +0100 (Sat, 10 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cgobj.pas

  * ifdef cpu64 -> ifdef cpu64bit

........
r6409 | jonas | 2007-02-11 00:34:04 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/pdecvar.pas

  * fixed ppc64 compilation

........
r6413 | jonas | 2007-02-11 12:41:27 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/bsd/system.pp
   M /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   M /branches/fpc_2_3/rtl/darwin/signal.inc

  + darwin/ppc64 support for signal routines

........
r6415 | jonas | 2007-02-11 13:54:53 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_linux.pas

  * set abi of linux/ppc64 to abi_powerpc_sysv

........
r6416 | jonas | 2007-02-11 13:55:51 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas
   M /branches/fpc_2_3/compiler/systems/t_bsd.pas

  + darwin/ppc64 source and target information

........
r6418 | jonas | 2007-02-11 14:19:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/powerpc64/math.inc

  * darwin/ppc64 compilation fixes

........
r6419 | jonas | 2007-02-11 14:22:22 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * darwin/ppc64 needs the 32 bit version of a_loadaddr_ref_reg

........
r6420 | jonas | 2007-02-11 14:22:55 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/utils/fpcm/fpcmmain.pp

  + darwin/ppc64 support

........
r6426 | jonas | 2007-02-11 16:13:19 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/rappcgas.pas

  * fixed refaddr parsing for darwin/ppc64

........
r6427 | jonas | 2007-02-11 16:14:21 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   M /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
   A /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

  * moved ppc32/ppc64 assembler writer helpers to a common unit

........
r6430 | jonas | 2007-02-11 17:53:23 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
   D /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   D /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc64
   A /branches/fpc_2_3/rtl/darwin/powerpc64/sig_cpu.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc64/sighnd.inc
   A /branches/fpc_2_3/rtl/darwin/ppcgen
   A /branches/fpc_2_3/rtl/darwin/ppcgen/ppchnd.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc:6422)
   A /branches/fpc_2_3/rtl/darwin/ppcgen/sig_ppc.inc (from /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc:6422)
   M /branches/fpc_2_3/rtl/darwin/signal.inc

  * fixed ppc/ppc64 signal include handling (both real files are in
    ppcgen, dummies in powerpc and powerpc64 which include those files)
    (1st step because pre-commit filter can't handle replaced files)

........
r6431 | jonas | 2007-02-11 17:53:47 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   A /branches/fpc_2_3/rtl/darwin/powerpc/sig_cpu.inc
   A /branches/fpc_2_3/rtl/darwin/powerpc/sighnd.inc

  * second step of signal include patch

........
r6432 | jonas | 2007-02-11 19:00:12 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/t_bsd.pas

  * changed darwin checks to use systems_darwin constant

........
r6433 | jonas | 2007-02-11 19:05:38 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas

  * handle non-multiple-of-4 offsets with 64 bit loads/stores for
    darwin/ppc64

........
r6434 | jonas | 2007-02-11 19:05:56 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   D /branches/fpc_2_3/compiler/powerpc/agppcgas.pas
   D /branches/fpc_2_3/compiler/powerpc64/agppcgas.pas
   A /branches/fpc_2_3/compiler/ppcgen/agppcgas.pas (from /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas:6427)
   D /branches/fpc_2_3/compiler/ppcgen/agppcutl.pas

  * completely merged ppc assembler writers

........
r6435 | jonas | 2007-02-11 19:06:40 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/darwin/console.pp
   M /branches/fpc_2_3/rtl/darwin/termiosproc.inc

  * fixed 64 bit compilation

........
r6436 | jonas | 2007-02-11 19:09:28 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/packages/extra/Makefile.fpc

  * universal interfaces aren't 64 bit ready yet -> only compile for
    darwin/ppc and darwin/i386

........
r6438 | jonas | 2007-02-11 19:22:34 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/ctest.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext3.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext4.o
   A /branches/fpc_2_3/tests/test/cg/obj/darwin/powerpc64/tcext5.o

  + compiled for darwin/ppc64

........
r6439 | jonas | 2007-02-11 20:24:42 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ppcgen/cgppc.pas

  * patch from Thomas to fix linux/ppc64

........
r6440 | jonas | 2007-02-11 20:25:15 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems.pas

  * fixed setting source OS for darwin/ppc64

........
r6444 | florian | 2007-02-11 22:24:20 +0100 (Sun, 11 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/globtype.pas
   M /branches/fpc_2_3/compiler/nopt.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/optcse.pas
   M /branches/fpc_2_3/compiler/psub.pas

+ first node cse implementation

........
r6445 | jonas | 2007-02-11 22:30:07 +0100 (Sun, 11 Feb 2007) | 6 lines
Changed paths:
   M /branches/fpc_2_3/compiler/cresstr.pas

  * hack to work around strange darwin/ppc64 linker bug: it seems to
    have problems if you put a global symbol at the end of a section
    without any data following (at least in case of the resource strings
    section) -> add dummy byte at the end for darwin/ppc64 (otherwise
    it messes up the address of the first symbol stub entry)

........
r6449 | jonas | 2007-02-11 23:23:44 +0100 (Sun, 11 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * cpupowerpc is defined for both ppc32 and ppc64 ->
    changed to cpupowerpc32 to avoid defining source
    wrongly on ppc64

........
r6450 | jonas | 2007-02-11 23:26:34 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ppcgen/ngppcset.pas

  * disable jump tables for darwin/ppc64 for now, don't work
    yet for some reason

........
r6451 | florian | 2007-02-11 23:54:37 +0100 (Sun, 11 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncal.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/optcse.pas

* improved cse
* better complexity calculation for subscript nodes with classes or interfaces

........
r6456 | jonas | 2007-02-12 19:33:22 +0100 (Mon, 12 Feb 2007) | 4 lines
Changed paths:
   M /branches/fpc_2_3/compiler/nutils.pas

  + support for notn,shln,shrn,equaln,unequaln,gtn,gten,ltn,lten in
    node_cplexity()
  * mark muln,divn,modn as more complex

........
r6469 | jonas | 2007-02-13 15:56:01 +0100 (Tue, 13 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/optcse.pas

  * fixed when cross-compiling a 64 bit compiler from a 32 bit platform

........
r6471 | jonas | 2007-02-13 16:17:16 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cputarg.pas

  * include stabs support (can work on darwin/ppc64, but doesn't work
    yet)

........
r6473 | jonas | 2007-02-13 16:45:48 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/cgcpu.pas
   M /branches/fpc_2_3/compiler/powerpc64/cpupara.pas

  * R2 is a volatile and usable register under darwin/ppc64
  * R13 is a reserved non-volatile register under darwin/ppc64 (tls)

........
r6479 | jonas | 2007-02-13 20:40:50 +0100 (Tue, 13 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * maxCrecordalign seems to have to be 8 rather 4, in spite of what
    the ABI docs say (although they are contradictory to some extent)

........
r6487 | jonas | 2007-02-14 15:57:40 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/tests/webtbs/tw8153a.pp

  * fixed for darwin/ppc64

........
r6488 | jonas | 2007-02-14 15:58:56 +0100 (Wed, 14 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/tests/webtbs/tw7851a.pp

  * fixed for darwin/ppc64

........
r6494 | jonas | 2007-02-15 19:36:55 +0100 (Thu, 15 Feb 2007) | 3 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * set default debug info for darwin/ppc64 to dwarf2 since
    it works better than stabs currently

........
r6500 | jonas | 2007-02-15 21:38:16 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/version.pas

  * updated version to 2.3.0

........
r6505 | jonas | 2007-02-15 22:39:28 +0100 (Thu, 15 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/version.pas

  * changed version to 2.3.1

........
r6511 | jonas | 2007-02-16 15:17:24 +0100 (Fri, 16 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/powerpc64/itcpugas.pas

  * system_powerpc_darwin -> system_powerpc64_darwin

........
r6546 | daniel | 2007-02-18 15:48:54 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncginl.pas
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/ncgrtti.pas
   M /branches/fpc_2_3/compiler/ncnv.pas
   M /branches/fpc_2_3/compiler/ninl.pas
   M /branches/fpc_2_3/compiler/nld.pas
   M /branches/fpc_2_3/compiler/nutils.pas
   M /branches/fpc_2_3/compiler/pinline.pas
   M /branches/fpc_2_3/rtl/inc/astrings.inc
   M /branches/fpc_2_3/rtl/inc/compproc.inc
   M /branches/fpc_2_3/rtl/inc/sstrings.inc
   M /branches/fpc_2_3/rtl/inc/text.inc
   M /branches/fpc_2_3/rtl/inc/wstrings.inc

  + Val/str/read/write support for enumeration types.

........
r6547 | daniel | 2007-02-18 17:01:20 +0100 (Sun, 18 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/sstrings.inc

  * Fix val code that I broke.

........
r6571 | daniel | 2007-02-20 09:27:44 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/astrings.inc
   M /branches/fpc_2_3/rtl/inc/sstrings.inc
   M /branches/fpc_2_3/rtl/inc/text.inc
   M /branches/fpc_2_3/rtl/inc/wstrings.inc

  * o2s -> ord2str, s2o -> str2ord

........
r6572 | daniel | 2007-02-20 09:33:30 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgld.pas
   M /branches/fpc_2_3/compiler/ncgrtti.pas
   M /branches/fpc_2_3/compiler/ninl.pas
   M /branches/fpc_2_3/compiler/nld.pas

  * o2s -> ord2str, s2o -> str2ord

........
r6574 | daniel | 2007-02-20 12:07:58 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/compproc.inc

  * o2s -> ord2str, s2o -> str2ord

........
r6578 | daniel | 2007-02-20 22:18:49 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/rtl/inc/text.inc

  * Change longint to valsint.

........
r6579 | daniel | 2007-02-20 22:29:09 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * Handle ordinal currency types.

........
r6580 | jonas | 2007-02-20 22:29:11 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ncgrtti.pas

  * fixed compilation for cpurequiresproperalignment

........
r6581 | jonas | 2007-02-20 22:30:21 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * fixed typo

........
r6582 | daniel | 2007-02-20 22:36:19 +0100 (Tue, 20 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/ninl.pas

  * Set is_real to true.

........
r6590 | jonas | 2007-02-21 20:23:54 +0100 (Wed, 21 Feb 2007) | 2 lines
Changed paths:
   M /branches/fpc_2_3/compiler/systems/i_bsd.pas

  * set tf_dwarf_only_local_labels for darwin/ppc64

git-svn-id: trunk@6720 -
2007-03-04 20:16:57 +00:00
Jonas Maebe
615c450062 + support for bitpacking types with a negative lower bound
git-svn-id: trunk@6683 -
2007-02-28 17:42:41 +00:00
Jonas Maebe
25576b49ac * fixed loading/storing of unaligned bitfields of size 2 to 7 bits
git-svn-id: trunk@6619 -
2007-02-23 17:02:28 +00:00
florian
986a73c12c * arm compiler can handled misaligned references
git-svn-id: trunk@6307 -
2007-02-02 22:42:27 +00:00
florian
d50bc40cbe * simplified code generation for paramaddr for a register parameter
git-svn-id: trunk@6276 -
2007-01-31 16:36:34 +00:00
florian
2167655902 * patch from Thorsten Engler submitted in #8235
git-svn-id: trunk@6272 -
2007-01-30 19:53:42 +00:00
Jonas Maebe
846fbf9fa0 * fixed several (harmles) range errors
git-svn-id: trunk@6192 -
2007-01-25 21:43:11 +00:00
Jonas Maebe
e815b923d5 * a_loadfpu_* gets two size parameters: fromsize and tosize
* fixed downsizing the precision of floating point values
  * floating point constants are now treated using only the minimal
    precision required (e.g. 2.0 is now a single, 1.1 extended etc)
    (Delphi compatible)

git-svn-id: trunk@5927 -
2007-01-12 18:33:51 +00:00
Jonas Maebe
1ad6417f7f * fixed some unneeded 64 bit conversions + rarely triggered bug on x86
regarding packed records/arrays

git-svn-id: trunk@5790 -
2007-01-02 18:47:14 +00:00
Jonas Maebe
c963543c74 * fixed typo in comments
git-svn-id: trunk@5521 -
2006-12-01 19:40:31 +00:00
peter
0557ddc342 * removed typed const, it is now handled by staticvarsym
* globalvarsym renamed to staticvarsym
  * fixed invalid regvar use in init when the finalize also uses the var

git-svn-id: trunk@5290 -
2006-11-08 21:04:22 +00:00
peter
107974330c * use aword(1) shl x, to prevent overflow with 1 shl 31
git-svn-id: trunk@5276 -
2006-11-07 18:14:25 +00:00
Jonas Maebe
469ac311e0 * fixed r5214
git-svn-id: trunk@5222 -
2006-11-04 16:44:29 +00:00
peter
3cae449fda * moved rtti to ncgrtti
git-svn-id: trunk@5219 -
2006-11-04 10:43:27 +00:00
Jonas Maebe
66cf666f65 * optimized storing constants into subsetreg/refs (a packed array of
boolean can now be as efficient as a set of boolean -- and it is
    on ppc32/64)

git-svn-id: trunk@5214 -
2006-11-03 22:00:27 +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
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
tom_at_work
a7311621eb * fixed bitmask generation code for subsetreg* methods on 64 bit platforms
git-svn-id: trunk@4990 -
2006-10-20 21:48:44 +00:00
florian
67ba76f090 * several arm fixes
git-svn-id: trunk@4742 -
2006-09-27 21:05:05 +00:00
Jonas Maebe
acd485d5fb * removed some unused and assigned-but-not-used variables
git-svn-id: trunk@4719 -
2006-09-24 17:48:52 +00:00
Jonas Maebe
0be55cf230 * fixed a missed "(1 shl 32) - 1 = 0" problem for x86
git-svn-id: trunk@4491 -
2006-08-23 17:56:16 +00:00
Jonas Maebe
1f42ee201b + support for bitpacked records, except for:
* rtti
    * typed constants

git-svn-id: trunk@4489 -
2006-08-23 15:44:13 +00:00
Jonas Maebe
2e131baa4c * code generator support for subsetreferences (memory locations which
are not a multiple of 8 bits, nor necessarily aligned at a
    multiple of 8 bits). Supports both constant and variable bit
    indices.

git-svn-id: trunk@4443 -
2006-08-19 11:14:43 +00:00
Jonas Maebe
d5aa230395 * removed things which shouldn't have been committed yet
git-svn-id: trunk@4326 -
2006-08-01 20:44:43 +00:00
Jonas Maebe
dec97dea73 * forgot to commit in previous revision
git-svn-id: trunk@4325 -
2006-08-01 20:42:29 +00:00
Jonas Maebe
c0f805ae6d * fixed a_param_ref in case the paraloc size is different from the source size
git-svn-id: trunk@3653 -
2006-05-24 09:36:41 +00:00
Jonas Maebe
b5ce7e454c * fixed bug when assigning a negative value in a register to certain
fields of record regvars + test

git-svn-id: trunk@3641 -
2006-05-23 09:17:21 +00:00
Jonas Maebe
32a9702965 * fixed loading of negative constants in some record regvar fields
git-svn-id: trunk@3640 -
2006-05-23 09:07:03 +00:00
Jonas Maebe
7131a2beb6 + a_load_loc_subsetreg
git-svn-id: trunk@3638 -
2006-05-23 08:54:52 +00:00
Jonas Maebe
e344ee3cd7 + support for register variables which contain records
git-svn-id: trunk@3580 -
2006-05-19 15:49:07 +00:00
florian
f27fa0d24f * forgotten commit of r3566
git-svn-id: trunk@3569 -
2006-05-18 20:43:16 +00:00
florian
570c1bc3a5 * widestrings aren't ref. counted anymore on windows
git-svn-id: trunk@3466 -
2006-05-09 20:54:26 +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
588cccb3ca * remove some obsolete i386 specific code
* use a_optimize_const to remove useless opcodes

git-svn-id: trunk@2910 -
2006-03-13 16:37:08 +00:00
Jonas Maebe
20160f1a35 * fixed a_param_ref for large parameters
git-svn-id: trunk@2854 -
2006-03-11 13:54:20 +00:00
Jonas Maebe
7cdf9bbaac * moved the indirect symbol stuff from nppcld to cgobj and ncgld, since
darwin/x86 needs the same code
  - removed now empty nppcld unit

git-svn-id: trunk@2821 -
2006-03-09 18:27:11 +00:00
tom_at_work
cb807cb2af * more fixes (to the optimizations) for range check code generation
git-svn-id: trunk@2803 -
2006-03-07 22:52:03 +00:00
peter
785550d7e3 Merged revisions 2669,2673,2677,2683,2696,2699-2702,2704,2708,2712-2715,2718,2722-2723,2728-2730,2740,2769 via svnmerge from
svn+ssh://peter@www.freepascal.org/FPC/svn/fpc/branches/linker/compiler

........
r2669 | peter | 2006-02-23 09:31:21 +0100 (Thu, 23 Feb 2006) | 2 lines

  * add compiler dir

........
r2673 | peter | 2006-02-23 17:08:56 +0100 (Thu, 23 Feb 2006) | 2 lines

  * enabled more code

........
r2677 | peter | 2006-02-24 17:46:29 +0100 (Fri, 24 Feb 2006) | 2 lines

  * pe stub and headers

........
r2683 | peter | 2006-02-25 23:13:24 +0100 (Sat, 25 Feb 2006) | 2 lines

  * section options cleanup

........
r2696 | peter | 2006-02-26 20:27:41 +0100 (Sun, 26 Feb 2006) | 2 lines

  * fixed typecasts

........
r2699 | peter | 2006-02-26 23:04:32 +0100 (Sun, 26 Feb 2006) | 2 lines

  * simple linking works

........
r2700 | peter | 2006-02-27 09:44:50 +0100 (Mon, 27 Feb 2006) | 2 lines

  * internal linker script

........
r2701 | peter | 2006-02-27 12:05:12 +0100 (Mon, 27 Feb 2006) | 2 lines

  * make elf working again

........
r2702 | peter | 2006-02-27 14:04:43 +0100 (Mon, 27 Feb 2006) | 3 lines

  * disable dwarf for smartlinking with .a
  * fix section start in new .a file

........
r2704 | peter | 2006-02-27 18:30:43 +0100 (Mon, 27 Feb 2006) | 2 lines

  * stab section fixes

........
r2708 | peter | 2006-02-28 19:29:17 +0100 (Tue, 28 Feb 2006) | 2 lines

  * basic work to merge stabs sections

........
r2712 | peter | 2006-02-28 23:17:48 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload tmodules before linking

........
r2713 | peter | 2006-02-28 23:18:51 +0100 (Tue, 28 Feb 2006) | 2 lines

  * fixed stabs linking

........
r2714 | peter | 2006-02-28 23:19:19 +0100 (Tue, 28 Feb 2006) | 2 lines

  * show code and data size

........
r2715 | peter | 2006-02-28 23:25:35 +0100 (Tue, 28 Feb 2006) | 2 lines

  * unload .stabs from objdata after it is merged

........
r2718 | peter | 2006-03-01 12:24:38 +0100 (Wed, 01 Mar 2006) | 3 lines

  * memsize/datasize cleanup
  * check for exports/resources when adding module to linker

........
r2722 | peter | 2006-03-03 09:12:20 +0100 (Fri, 03 Mar 2006) | 2 lines

  * new TObjSymbol splitted from TAsmSymbol

........
r2723 | peter | 2006-03-03 14:08:55 +0100 (Fri, 03 Mar 2006) | 2 lines

  * coff fixes after recent objsymbol changes

........
r2728 | peter | 2006-03-03 22:43:04 +0100 (Fri, 03 Mar 2006) | 2 lines

  * fixed coff writer

........
r2729 | peter | 2006-03-04 01:10:32 +0100 (Sat, 04 Mar 2006) | 2 lines

  * fix read-only opening

........
r2730 | peter | 2006-03-04 01:11:16 +0100 (Sat, 04 Mar 2006) | 2 lines

  * Read edata from DLLs, basic work

........
r2740 | peter | 2006-03-04 21:13:43 +0100 (Sat, 04 Mar 2006) | 3 lines

  * deletedef added
  * don't remove defs from index when we are already clearing everything

........
r2769 | peter | 2006-03-05 21:42:33 +0100 (Sun, 05 Mar 2006) | 4 lines

  * moved TObj classes to ogbase
  * ObjSection.SymbolRefs and SymbolDefines list
  * DLL importing

........

git-svn-id: trunk@2771 -
2006-03-05 21:10:37 +00:00
Jonas Maebe
da1373d50e * hopefully final range check fix
git-svn-id: trunk@2659 -
2006-02-21 10:00:20 +00:00
Jonas Maebe
914e2af9b0 * properly rangecheck arrays after last changes
git-svn-id: trunk@2655 -
2006-02-20 12:04:02 +00:00
Jonas Maebe
cf6968ae95 * optimize some more range checks away again, fixes 64bit cpu issues
git-svn-id: trunk@2621 -
2006-02-18 20:59:44 +00:00
Jonas Maebe
33e6604b91 * also perform range checking in case fromdef falls inside todef, in
order to catch invalid operations due to uninitialised values,
    not type-checked assignments (via explicit typecasts or e.g.
    blockread), ...

git-svn-id: trunk@2608 -
2006-02-16 15:59:15 +00:00
florian
94038b0d83 + translate register variable locations, enables register variable debug info, with SSA it requires to be extended maintaining location list
git-svn-id: trunk@2409 -
2006-02-02 21:27:23 +00:00
Jonas Maebe
b769a968e3 * make sure live_start and live_end are correctly updated while
generating the initialisation and entry code

git-svn-id: trunk@2185 -
2006-01-05 17:46:16 +00:00
Jonas Maebe
7aa315c71a * made some Tcpuregisterset parameters const to avoid useless copying
git-svn-id: trunk@2176 -
2006-01-05 10:10:25 +00:00
florian
1851481694 * fixed typo
git-svn-id: trunk@2173 -
2006-01-05 09:35:59 +00:00
florian
fb4557d71e * first implementation of pic for i386
git-svn-id: trunk@2107 -
2006-01-01 20:14:48 +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
95879fe8a7 * basic support for generic classes
git-svn-id: trunk@2020 -
2005-12-21 10:11:15 +00:00
florian
82a94db712 * fixed resetting of ansistrings
git-svn-id: trunk@2017 -
2005-12-20 21:22:06 +00:00
florian
7a4c89e68d * optimized generation of fpc_decr_* calls
git-svn-id: trunk@1966 -
2005-12-15 22:37:21 +00:00
florian
72d7597edc + implementation of lazy binding for linux
git-svn-id: trunk@1750 -
2005-11-14 22:28:12 +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
daniel
d57c048696 * Remove ifdef 1_0
* Add expirimental 32-bit x86_64 target to systems

git-svn-id: trunk@729 -
2005-07-23 08:37:26 +00:00
florian
32b96e75f3 * more fixes for float parameter handling on arm
git-svn-id: trunk@728 -
2005-07-22 20:14:03 +00:00
florian
227b2c392a + cpumm for cpus having a mm register set
git-svn-id: trunk@563 -
2005-07-02 14:13:52 +00:00
peter
1d9407f2f3 * disable saving of fpu/mm for i386 until optimizer is fixed
git-svn-id: trunk@334 -
2005-06-09 21:06:27 +00:00
florian
21ae782854 * fixed more xmm stuff
+ some win64 stuff added

git-svn-id: trunk@330 -
2005-06-09 20:50:17 +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
florian
ebcb69478f * fixed a lot of stuff for fpu/mm register variables
git-svn-id: trunk@199 -
2005-06-04 21:23:15 +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
florian
22d9294ab3 + overflow checking for the arm 2005-02-13 18:55:19 +00:00
peter
f818478945 * finalize for refcounted strings shall also reset temps to 0, the
previous exception that decrrefcnt already set it to 0 is not valid
    anymore
2005-01-29 00:32:53 +00:00
florian
651f9e5bbd + implemented overflow checking for 64 bit types on sparc 2005-01-27 20:32:51 +00:00
peter
e820bc93f2 * interface wrapper generation moved to cgobj
* generate interface wrappers after the module is parsed
2005-01-24 22:08:32 +00:00
peter
35e466d971 * remove copy_value_on_stack and a_param_copy_ref 2005-01-20 17:47:01 +00:00
peter
04c97cc129 * load jmp_buf_size from system unit 2005-01-20 16:38:45 +00:00
peter
b9ca478f50 * multiple location support for i386 a_param_ref
* remove a_param_copy_ref for i386
2005-01-18 22:19:20 +00:00
Jonas Maebe
bd04491f50 * patch from Peter to fix inlining of case statements 2004-11-30 18:13:39 +00:00
florian
87b589f4f5 * better code generation for copying of open arrays 2004-11-08 21:47:39 +00:00
florian
7b8c44bbce * fixed open arrays when using register variables 2004-11-08 20:23:29 +00:00
florian
143b4a8cb1 * <signed type> to qword range check for 64 bit targets fixed 2004-11-02 17:25:36 +00:00
peter
c95a859f0a * generic tlocation
* move tlocation to cgutils
2004-10-31 21:45:02 +00:00
peter
d19663f3a8 * save standard registers moved to tcgobj 2004-10-25 15:36:47 +00:00
peter
705868e816 * remove saveregister calling convention 2004-10-24 20:01:08 +00:00
peter
adb6f59eef * small regvar fixes
* loadref parameter removed from concatcopy,incrrefcount,etc
2004-10-24 11:44:28 +00:00
mazen
581b52422c - remove $IFDEF DELPHI and related code
- remove $IFDEF FPCPROCVAR and related code
2004-10-15 09:14:16 +00:00
peter
60c73cc0e5 * -Or fixes for open array 2004-10-13 21:12:51 +00:00
peter
8b3e00244f * length parameter for copyvaluearray changed to tlocation 2004-10-11 15:46:45 +00:00
peter
434475be33 * concatcopy_unaligned maps by default to concatcopy, sparc will
override it with call to fpc_move
2004-10-10 20:31:48 +00:00
peter
b0c25b50a0 * symtable allocation rewritten
* loading of parameters to local temps/regs cleanup
  * regvar support for parameters
  * regvar support for staticsymtable (main body)
2004-10-10 20:22:53 +00:00
peter
f5471aef6e * more spilling rewrites 2004-10-05 20:41:01 +00:00
florian
15d3388449 * fixed more sparc overflow stuff
* fixed some op64 stuff for sparc
2004-09-29 18:55:40 +00:00
florian
62f93d3473 + partial overflow checking on sparc; multiplication still missing 2004-09-26 21:04:35 +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
Jonas Maebe
f1bda1700a * support register parameters for inlined procedures + some inline
cleanups
2004-07-09 23:41:04 +00:00
peter
2240dfda57 * fix rangecheck error when assigning u32bit=s32bit 2004-07-03 11:47:04 +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
5358278ca1 tai_regalloc.allocation changed to ratype to notify rgobj of register size changes 2004-05-22 23:34:27 +00:00
daniel
b721e5872c * Prepare compiler infrastructure for multiple ansistring types 2004-04-29 19:56:36 +00:00
florian
e4f4b8acd6 * fixed web bug #3048: comparision of dyn. arrays 2004-04-18 07:52:43 +00:00
florian
10e765329d * fixed arm compilation
* cleaned up code generation for exported linux procedures
2004-03-06 20:35:19 +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
florian
e7399ee666 * handling of float parameters passed in mm registers fixed 2004-02-20 22:16:34 +00:00
peter
ee569d7817 * make extcycle is working again 2004-02-12 15:54:03 +00:00
Jonas Maebe
3056a64bf0 * fixed regvars support. Needs -doldregvars to activate. Only tested with
ppc, other processors should however only require maxregvars and
    maxfpuregvars constants in cpubase.pas. Remember to take scratch-
    registers into account when defining that value.
2004-02-08 18:08:59 +00:00
peter
8c5b0f7d82 * first try to get cpupara working for x86_64 2004-02-04 22:01:13 +00:00
peter
ecfbbeffc3 * renamed xNNbittype to xNNinttype
* renamed registers32 to registersint
  * replace some s32bit,u32bit with torddef([su]inttype).def.typ
2004-02-03 22:32:53 +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
74f5f05b6d * g_finalize needs to reset to nil after decr_ref
* support loadref in decr_ref reset to nil
2004-01-22 22:12:21 +00:00
peter
fa9e45b7cb * decrrefcount resets temps to nil 2004-01-21 22:13:20 +00:00
peter
ac1332a388 * fixed stackchecking for register calling 2004-01-21 21:01:34 +00:00
florian
c37035a450 * common addnode code for x86-64 and i386 2004-01-20 12:59:36 +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
daniel
4a4b8f2a72 * Experiment: Compress strings to save memory
Did not save a single byte of mem; clearly the core size is boosted by
    temporary memory usage...
2004-01-11 23:56:19 +00:00
peter
1c7e6fc380 * sparc updates
* use registertype in spill_register
2003-12-26 14:02:30 +00:00
florian
ace2d682b0 * rtl and compiler compile with -Cfsse2 2003-12-26 13:19:16 +00:00
florian
9c476ba5f1 - delete parameter in cg64 methods removed 2003-12-24 00:10:02 +00:00
florian
d1116fb7f1 + second_floataddsse implemented 2003-12-23 14:38:07 +00:00
florian
6170faf334 * fixed some x86-64 issues 2003-12-22 19:00:17 +00:00
florian
b52cee6639 * fixed ppc inlining stuff
* fixed wrong unit writing
  + added some sse stuff
2003-12-21 19:42:42 +00:00
florian
f041463abf * improved register allocation of generic a_param_const and a_param_ref 2003-12-15 21:39:39 +00:00
peter
1367e342db * reg allocations for imaginary register are now inserted just
before reg allocation
  * tregister changed to enum to allow compile time check
  * fixed several tregister-tsuperregister errors
2003-12-15 21:25:48 +00:00
peter
bce5a1e252 * rg[tregistertype] added in tcg 2003-12-12 17:16:17 +00:00
Jonas Maebe
062e03528e + allocate volatile registers around calls to procedures declared with
"saveregisters" on non-x86 processors
2003-12-06 22:11:47 +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
florian
788339336a * elesize of g_copyvaluepara_openarray changed
+ g_releaesvaluepara_openarray added
2003-11-05 23:05:13 +00:00
florian
05fcae577a * some ppc stuff fixed
* memory leak fixed
2003-10-19 01:34:30 +00:00
florian
5b33ab3643 * fixed more ppc stuff 2003-10-17 15:25:18 +00:00
peter
d0de3b3ea8 * 64k registers supported
* fixed some memory leaks
2003-10-17 14:38:32 +00:00
florian
947280d8e2 * some ideas for mm support implemented 2003-10-13 01:23:13 +00:00
florian
1df13c788c * fixed some MMX<->SSE
* started to fix ppc, needs an overhaul
  + stabs info improve for spilling, not sure if it works correctly/completly
  - MMX_SUPPORT removed from Makefile.fpc
2003-10-11 16:06:42 +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
99bb20747e * parent framepointer changed to hidden parameter
* tloadparentfpnode added
2003-09-28 17:55:03 +00:00
peter
e248f1b570 * a_call_ref removed 2003-09-28 13:37:19 +00:00
peter
e7a50f0ee0 * remove obsolete tparalocation.sp_fixup 2003-09-25 21:26:24 +00:00
peter
56ece89fe5 * fpc_check_object(_ext) has saveregisters and doesn't need
saving of registers
2003-09-23 20:37:16 +00:00
marco
cd5ae5fcc3 * Patch from Peter for paraloc 2003-09-10 08:31:47 +00:00
daniel
49e539ac8d * Adding register allocation order 2003-09-09 20:59:27 +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
Jonas Maebe
4f8c390198 * fixed regvars so they work with newra (at least for ppc)
* fixed some volatile register bugs
  + -dnotranslation option for -dnewra, which causes the registers not to
    be translated from virtual to normal registers. Requires support in
    the assembler writer as well, which is only implemented in aggas/
    agppcgas currently
2003-08-17 16:59:20 +00:00
Jonas Maebe
355f84758e * several rg.allocexplicitregistersint/rg.deallocexplicitregistersint
pairs round calls to helpers
2003-07-23 11:01:14 +00:00
peter
32d076480b * framepointer fixes for sparc
* parent framepointer code more generic
2003-07-06 17:58:22 +00:00
peter
b7d99ec934 * paraloc splitted in callerparaloc,calleeparaloc
* sparc calling convention updates
2003-07-02 22:18:04 +00:00
peter
0dceec9a64 * current_procdef removed, use current_procinfo.procdef instead 2003-06-13 21:19:30 +00:00
peter
d179aea20d * ungetregisterfpu gets size parameter 2003-06-12 21:11:10 +00:00
peter
a0b9306652 * newra compiles for sparc 2003-06-12 16:43:07 +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
2df40538b9 * g_copyopenarrayvalue gets length reference
* don't copy open arrays for cdecl
2003-06-06 14:43:02 +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
daniel
41e0bc4cec * Register allocator finished 2003-06-03 13:01:59 +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
948ef20ecc * generic a_call_ref 2003-06-01 01:02:39 +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
e7e2cfe9a4 * a_load_loc_reg now has an extra size parameter for the destination
register (properly fixes what I worked around in revision 1.106 of
    ncgutil.pas)
2003-05-30 23:49:18 +00:00
Jonas Maebe
0c717891ff * fixed bug in a_load_loc_ref (the source instead of dest size was passed
to a_load_reg_ref in case of a register)
2003-05-30 21:40:00 +00:00
Jonas Maebe
f433c21ead * use as little different registers on the ppc until newra is released,
since every used register must be saved
2003-05-30 12:36:13 +00:00
peter
8ff5792776 * remove some unit dependencies
* current_procinfo changes to store more info
2003-05-23 14:27:35 +00:00
peter
92ee1804b6 * removed selfpointer_offset, vmtpointer_offset
* tvarsym.adjusted_address
  * address in localsymtable is now in the real direction
  * removed some obsolete globals
2003-05-15 18:58:53 +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
peter
1a2eedd767 * self moved to hidden parameter
* removed hdisposen,hnewn,selfn
2003-05-09 17:47:02 +00:00
Jonas Maebe
376b1ffa17 * fix for op_reg_reg_reg in case the destination is the same as the first
source register
2003-05-01 12:23:46 +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
7f14891d66 * aktprocdef cleanup, aktprocdef is now always nil when parsing
a new procdef declaration
  * aktprocsym removed
  * lexlevel removed, use symtable.symtablelevel instead
  * implicit init/final code uses the normal genentry/genexit
  * funcret state checking updated for new funcret handling
2003-04-27 07:29:50 +00:00
florian
4450957bdd * fixed para locations of fpc_class_new helper call 2003-04-26 20:57:17 +00:00
florian
b5d749d24d * fixed passing of fpu values by fpu register 2003-04-26 17:21:08 +00:00
peter
c21ca3dfa0 + added currency support based on int64
+ is_64bit for use in cg units instead of is_64bitint
  * removed cgmessage from n386add, replace with internalerrors
2003-04-23 20:16:03 +00:00
daniel
9e2084b8d5 * Further register allocator work. Compiler now smaller with new
allocator than without.
  * Somebody forgot to adjust ppu version number
2003-04-23 14:42:07 +00:00
peter
77cdb2fcae * fix self passing to fpc_help_fail 2003-04-23 13:20:34 +00:00
florian
0284016ee9 * fixed several issues with powerpc
+ applied a patch from Jonas for nested function calls (PowerPC only)
  * ...
2003-04-23 12:35:34 +00:00
peter
9ed2ce8c12 * removed some notes/hints 2003-04-22 14:33:38 +00:00
peter
e248c0ece4 * fixed C style array of const
* fixed C array passing
  * fixed left to right with high parameters
2003-04-22 13:47:08 +00:00
daniel
25059e21b6 + Implemented the actual register allocator
+ Scratch registers unavailable when new register allocator used
  + maybe_save/maybe_restore unavailable when new register allocator used
2003-04-22 10:09:34 +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
Jonas Maebe
d3c2a101a5 + add used scratch registers to usedintbyproc for non-i386 2003-03-22 18:07:18 +00:00
Jonas Maebe
d168ae15df * lots of new regallocator fixes, both in generic and ppc-specific code
(ppc compiler still can't compile the linux system unit though)
2003-03-11 21:46:24 +00:00
daniel
86bcea6ef5 * Code generator converted to new register notation
- Horribily outdated todo.txt removed
2003-02-19 22:00:14 +00:00
peter
228153c661 * maybe_testself now really uses the passed register 2003-01-31 22:47:48 +00:00
peter
a3c3fb9282 * maybe_testvmt added 2003-01-30 21:46:35 +00:00
daniel
ca8b793849 * Fixed internalerror 200301081 problem 2003-01-17 12:45:40 +00:00
daniel
cbe0383afe * Further work to convert codegenerator register convention;
internalerror bug fixed.
2003-01-13 14:54:34 +00:00
florian
2102ce7031 * fixed some PowerPC issues 2003-01-09 22:00:53 +00:00
florian
34a91d9171 * fixed broken PowerPC compiler 2003-01-09 20:41:10 +00:00
daniel
55a161bbbf * Tregister changed into a record 2003-01-08 18:43:56 +00:00
peter
af98b48c22 * stackpointer_alloc added for adjusting ESP. Win32 needs
this for the pageprotection
2002-12-24 15:56:50 +00:00
peter
de1efae14f * removed some runerror and writeln 2002-12-20 18:14:04 +00:00
carl
3214bab118 * maxoperands -> max_operands (for portability in rautils.pas)
* fix some range-check errors with loadconst
  + add ncgadd unit to m68k
  * some bugfix of a_param_reg with LOC_CREFERENCE
2002-12-14 15:02:03 +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
carl
170f43315d * document flags2reg 2002-11-17 16:27:31 +00:00
peter
98ee9c11cc * return error 210 for failed self test 2002-11-16 17:06:28 +00:00
peter
bfd72ad5d5 * merged changes from 1.0.7 up to 04-11
- -V option for generating bug report tracing
    - more tracing for option parsing
    - errors for cdecl and high()
    - win32 import stabs
    - win32 records<=8 are returned in eax:edx (turned off by default)
    - heaptrc update
    - more info for temp management in .s file with EXTDEBUG
2002-11-15 01:58:45 +00:00
peter
83dae76625 + $IMPLICITEXCEPTIONS switch to turn on/off generation of the
implicit exception frames for procedures with initialized variables
    and for constructors. The default is on for compatibility
2002-10-16 19:01:43 +00:00
carl
67486c96c3 * fixes for Delphi 6 compilation
(warning : Some features do not work under Delphi)
2002-10-05 12:43:23 +00:00
peter
d774c8d988 * Copy() is now internal syssym that calls compilerprocs 2002-10-02 18:20:52 +00:00
Jonas Maebe
a15d8cfe39 * a_load_reg_reg() now has two size parameters: source and dest. This
allows some optimizations on architectures that don't encode the
    register size in the register name.
2002-09-17 18:54:01 +00:00
peter
dd143617e6 * fixed dynarr_decr_ref call 2002-09-09 19:29:29 +00:00
peter
dcd9e0107c * old logs removed and tabs fixed 2002-09-07 15:25:00 +00:00
florian
6502638258 * several powerpc related stuff fixed 2002-09-01 21:04:47 +00:00
florian
3546ffa8b0 + added abstract tcg.g_removevaluepara_openarray 2002-09-01 17:05:43 +00:00
peter
7898dcf9ed + a_call_reg, a_call_loc added
* removed exprasmlist references
2002-09-01 12:09:27 +00:00
carl
ed77671a9b + optimize64_op_const_reg implemented (optimizes 64-bit constant opcodes)
* more fixes to m68k for 64-bit operations
2002-08-19 18:17:47 +00:00
florian
4144773f01 * result type handling in tcgcal.pass_2 overhauled
* better tnode.dowrite
  * some ppc stuff fixed
2002-08-17 22:09:43 +00:00
florian
e313bab4ff * first part of procinfo rewrite 2002-08-17 09:23:33 +00:00
carl
745efb2c47 * issameref() to test if two references are the same (then emit no opcodes)
+ ret_in_reg to replace ret_in_acc
    (fix some register allocation bugs at the same time)
  + save_std_register now has an extra parameter which is the
    usedinproc registers
2002-08-16 14:24:57 +00:00
carl
c33d99adb7 - a_load_sym_ofs_reg removed
* loadvmt now calls loadaddr_ref_reg instead
2002-08-15 08:13:54 +00:00
carl
e5895885fe + routine to optimize opcodes with constants 2002-08-14 19:26:02 +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
Jonas Maebe
bfbf0ea7c6 * register parameters are now LOC_CREGISTER instead of LOC_REGISTER 2002-08-10 17:15:20 +00:00
carl
1b79ac2058 - moved new_exception and free_exception to ncgutils 2002-08-09 19:10:05 +00:00
carl
eff31e8524 + more more more documentation
+ first version include/exclude (can't test though, not enough scratch for i386 :()...
2002-08-05 18:27:48 +00:00
carl
32f3f65a26 + added generic exception support (still does not work!)
+ more documentation
2002-08-04 19:06:41 +00:00
florian
ed950491a8 * the code generator knows now if parameters are in registers 2002-07-30 20:50:43 +00:00
florian
102ba3a098 * some more ppc fixes 2002-07-29 21:16:02 +00:00
Jonas Maebe
b11d7a19f3 + tcg64.a_op64_const_reg_reg() and tcg64.a_op64_reg_reg_reg() methods +
generic implementation
2002-07-28 15:56:00 +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
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
florian
336808f6c3 * start of the new generic parameter handling 2002-07-11 14:41:27 +00:00
florian
aa15b56de1 * problems with last commit fixed 2002-07-07 10:16:29 +00:00
florian
77ba8fddb3 * typo fixed 2002-07-07 10:05:34 +00:00
florian
07783d2a0d * powerpc target fixed, very simple units can be compiled
* some basic stuff for better callparanode handling, far from being finished
2002-07-07 09:52:32 +00:00
carl
1c645929ff * updated generic constructor / destructor calling 2002-07-06 20:09:10 +00:00
Jonas Maebe
0acee5e02e * fixed cg64 memory leak 2002-07-02 11:40: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
Jonas Maebe
f73b7c3bc9 * fixed internalerror(10) with -Or for i386 (a_load_ref_ref now saves
a general purpose register if it needs one but none are available)
2002-06-06 18:53:17 +00:00
carl
33b79c188a + generic FPC_HELP_FAIL
+ generic FPC_HELP_DESTRUCTOR instated (original from Pierre)
+ generic FPC_DISPOSE_CLASS
+ TEST_GENERIC define
2002-05-22 19:02:16 +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
carl
a5c4e33b65 * maybe_loadself portable 2002-05-12 19:57:16 +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
peter
268e4bb7e7 * use saveregisters for incr routines, saves also problems with
the optimizer
2002-04-26 15:19:04 +00:00
peter
cc8c4d7093 * moved more routines from cga/n386util 2002-04-25 20:16:38 +00:00
peter
624e5bd699 * fixed @methodpointer 2002-04-22 16:30:05 +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
carl
87aa88e9b7 + 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
2002-04-20 21:32:23 +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
021a0670c2 + more documentation 2002-04-07 13:18:19 +00:00
carl
59a229acf7 + documentation 2002-04-07 09:12:46 +00:00
Jonas Maebe
71a52a4aeb * several powerpc-related additions and fixes 2002-04-06 18:10:42 +00:00