Commit Graph

438 Commits

Author SHA1 Message Date
sergei
a32fdc3ae6 + Added a simple helper tcg.g_call, intended to replace allocallcpuregisters+a_call_name+deallocallcpuregisters sequence which is used all over the place.
* Refactored code generation for tcgonnonde and tcgtryexceptnode, simplifying both compiler and generated code. Merged compilerprocs called in sequence into larger ones (fpc_popobjectstack+fpc_destroyexception -> fpc_doneexception, fpc_popsecondobjectstack+fpc_destroyexception+fpc_reraise -> fpc_raise_nested).

git-svn-id: trunk@19506 -
2011-10-18 15:46:15 +00:00
sergei
6e23565edf + Initialize/finalize variants using dedicated helpers, produces both smaller (no RTTI loading necessary) and faster (direct path taken) code.
git-svn-id: trunk@19442 -
2011-10-09 20:34:58 +00:00
florian
4868b09844 * patch by alexvin to replace $ifopt by $push/$pop, resolves #20332
git-svn-id: trunk@19239 -
2011-09-25 21:19:50 +00:00
florian
6d996bf832 * made a_call_ref of PowerPC generic, we need to allocate a register after all on risc platforms
git-svn-id: trunk@18962 -
2011-09-03 20:37:53 +00:00
Jonas Maebe
7f22a2f223 + support for range checking calculations with hlcgobj
* added runerror number to JVM FpcRunTimeError exceptions
  * enabled calling errorproc when a run time error occurs on the
    JVM target

git-svn-id: branches/jvmbackend@18749 -
2011-08-20 08:32:31 +00:00
florian
77f2d6cc0d * introduce usage of TCGInt in the code generator units
git-svn-id: trunk@17459 -
2011-05-14 17:58:23 +00:00
florian
fb84cb865b * rebase to trunk@17295
git-svn-id: branches/avr@17296 -
2011-04-10 19:20:48 +00:00
florian
8cfbb70326 + generic a_cmp_const_reg_label
git-svn-id: branches/avr@17294 -
2011-04-10 18:52:37 +00:00
sergei
7f62d5cfb0 * tcg.g_array_rtti_helper: if high-value is a constant, handle it without using a register.
* Now g_initialize, g_finalize, g_incrrefcount and g_decrrefcount should never more be used for open arrays, trigger internal error if it happens.

git-svn-id: trunk@17137 -
2011-03-15 09:30:55 +00:00
sergei
37d5a6c354 * tcg.g_array_rtti_helper(): When converting 'high' to 'length', use an intermediate register to do the increment, so that the original value of 'high' parameter is preserved regardless of platform and optimization settings. Should fix regressions introduced by r17068.
git-svn-id: trunk@17071 -
2011-03-04 17:00:47 +00:00
sergei
54bc8efa0b * Fixed reference counting of open array parameters passed by value. RTTI of the array itself is useless in this case, as it does not provide correct element count. Now using dedicated helpers which take RTTI of array element and the element count. Resolves #18859.
git-svn-id: trunk@17068 -
2011-03-03 18:38:46 +00:00
florian
726b24c591 * (d)allocallcpuregisters must not handle fpu registers on avr
git-svn-id: branches/avr@17025 -
2011-02-26 20:59:09 +00:00
florian
26fbfaf5a7 + introduce the usage of asizeint/asizeuint for cpus with sizeof("alu")<>sizeof(pointer)
git-svn-id: trunk@17011 -
2011-02-26 20:10:03 +00:00
paul
dad8313512 compiler: handle dispinterfaces the same way as com interfaces because they are IDispatch descendants: increment/decrement they references in assignments and parameters passing by _AddRef, _Release
git-svn-id: trunk@16755 -
2011-01-13 03:38:45 +00:00
florian
5dae691c96 * implementation of bit scan intrinsics by Richard Vida, resolves #17592
git-svn-id: trunk@16174 -
2010-10-16 15:03:30 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
later: the same as i386/darwin, except
      a) uses the non-fragile Objective-C ABI/runtime
      b) does not require stubs for direct calls/jumps (not required for
         i386/darwin under 10.6 and later either, but still generated
         there for backwards compatibility)
      c) only the same packages are enabled as for ARM/Darwin
      d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
    This target also defines the symbol "darwin" apart from the target
    name "iphonesim" for source code compatibility reasons.

git-svn-id: trunk@16065 -
2010-09-29 21:56:47 +00:00
Jonas Maebe
f13f6627c4 * moved use_fixed_stack from cgutils to a method in paramgr so it can
be used outside the code generator
  * renamed tabstractprocdef.requiredargarea into callerargareasize,
    and also added calleeargareasize field; added init_paraloc_info(side)
    method to init the parameter locations and init those size fields and
    replaced all "if not procdef.has_paraloc_info then ..." blocks with
    procdef.init_paraloc_info(callersize)"
  * moved detection of stack tainting parameters from psub to
    symdef/tabstractprocdef
  + added tcallparanode.contains_stack_tainting_call(), which detects
    whether a parameter contains a call that makes use of stack paramters
  * record for each parameter whether or not any following parameter
    contains a call with stack parameters; if not, in case the current
    parameter itself is a stack parameter immediately place it in its
    final location also for use_fixed_stack platforms rather than
    first putting it in a temporary location (part of mantis #17442)
  * on use_fixed_stack platforms, always first evaluate parameters
    containing a stack tainting call, since those force any preceding
    stack parameters of the current call to be stored in a temp location
    and copied to the final location afterwards

git-svn-id: trunk@16050 -
2010-09-26 21:24:14 +00:00
florian
66571ee4c8 * use extended as default real type in calculations only if fputype=x87
git-svn-id: trunk@15750 -
2010-08-08 16:17:43 +00:00
Jonas Maebe
99aece6230 * cleaned up handling of Darwin non-lazy pointer sections: create sections
as needed, instead of once when initialising the list (currently nothing
    else is added to that asmlist so it was safe, but it was not robust)

git-svn-id: trunk@15742 -
2010-08-08 12:39:16 +00:00
Jonas Maebe
ea4bb9d752 * don't treat variant records with one element as "records with one element"
(the ABIs that prescribe special treatment for aggregates with one
     scalar element don't either, since a "union containing a single scalar"
     is not the same as a scalar)
  * fixed passing record with a single float field on PowerPC/AIX abi's
  * several changes to cgobj and ncgutil to correctly deal with transfering
    such records between integer and floating point registers

git-svn-id: trunk@15416 -
2010-06-13 09:57:58 +00:00
Jonas Maebe
15e9c54b44 * fixed ABI compliance for parameter passing and function returning on all
x86-64 platforms (except for win64, which uses another ABI and which
    already complied to it) + test
  * fixed returning records containing 1 single or double field on darwin/i386,
    these have to be returned via ST0 instead of as a regular record
  * added support for LOC_FPUREGISTER and LOC_MMREGISTER in several places
    where they can now occur due to the previous two changes
  * made a few internalerrors unique

git-svn-id: trunk@15368 -
2010-06-03 20:08:50 +00:00
Jonas Maebe
283018a3bf * changed tprocdef.funcretloc[] from a tlocation into a tcgpara so it can
represent complex locations (required for full x86-64 ABI support,
    which is not yet implemented) -> lots of special result handling
    code has been removed and replaced by the parameter handling
    routines
  + added support for composite parameters (and hence function
    results) to tcg.a_load_ref_cgpara() (so it can be used for
    handling, e.g., 64 bit parameters on 32 bit platforms)
  * the above fixed writing past the end of allocated memory when
    handling records returned in registers on x86-64 whose size is
    not a multiple of 8 bytes (mantis #16357)
  - removed the x86-64 and PPC specific versions of a_load_ref_cgpara(),
    as they are now handled correctly by the generic version
  * moved the responsibility of allocating tcgpara cpu registers
    (using paramanager.allocparaloc()) from the callers of
    cg.a_load*_cgpara() to the cg.a_load*_cgpara() methods
    themselves (so the register allocation can be done efficiently
    when dealing with function results)
  * for the above, renamed paramanager.alloc/freeparaloc() to
    paramanager.alloc/freecgpara(), and use paramanager.allocparaloc()
    to allocate individual pcgparalocations instead
  * fixed the register size of SSE2 function result registers for
    x86-64 (when used for floating point), which results in removing
    a few superfluous "movs? %xmm0,%xmm0" instructions
  * fixed compilation of paramanagers of avr, m68k and mips after r13695
    and also updated them for these new changes

git-svn-id: trunk@15350 -
2010-05-30 21:12:57 +00:00
Jonas Maebe
ceb063c7fe * moved support for passing floating point values in integer registers from
platform-dependent ifdef'ed code in ncgcal to generic code cgobj

git-svn-id: trunk@15316 -
2010-05-22 13:47:46 +00:00
Jonas Maebe
9bc15a5f61 * renamed a_param_* to a_load_*_cgpara
git-svn-id: trunk@15305 -
2010-05-22 09:07:21 +00:00
Jonas Maebe
4945d419d3 * moved some paraloc->tlocation loading helpers from ncgutil to cgobj
* fixed an {$ifdef cpu64bitaddr} that should be {$ifdef cpu64bitalu}

git-svn-id: trunk@15276 -
2010-05-15 12:02:17 +00:00
Jonas Maebe
7d049c2c8d * fixed typo in comment
git-svn-id: trunk@15264 -
2010-05-13 10:42:10 +00:00
pierre
bc407ef6d3 * also disable range check where overflow check is disabled
git-svn-id: trunk@14852 -
2010-02-03 00:32:30 +00:00
Jonas Maebe
b6e4896805 * small typo corrections by Adriaan Van Os (mantis #15652)
git-svn-id: trunk@14844 -
2010-02-02 10:41:38 +00:00
Jonas Maebe
d1538ab023 o added ARM VPFv2/VFPv3 support:
+ RTL support:
      o VFP exceptions are disabled by default on Darwin,
        because they cause kernel panics on iPhoneOS 2.2.1 at least
      o all denormals are truncated to 0 on Darwin, because disabling
        that also causes kernel panics on iPhoneOS 2.2.1 (probably
        because otherwise denormals can also cause exceptions)
    * set softfloat rounding mode correctly for non-wince/darwin/vfp
      targets
    + compiler support: only half the number of single precision
      registers is available due to limitations of the register
      allocator
    + added a number of comments about why the stackframe on ARM is
      set up the way it is by the compiler
    + added regtype and subregtype info to regsets, because they're
      also used for VFP registers (+ support in assembler reader)
    + various generic support routines for dealing with floating point
      values located in integer registers that have to be transferred to
      mm registers (needed for VFP)
    * renamed use_sse() to use_vectorfpu() and also use it for
      ARM/vfp support
    o only superficially tested for Linux (compiler compiled with -Cpvfpv6
      -Cfvfpv2 works on a Cortex-A8, no testsuite run performed -- at least
      the fpu exception handler still needs to be implemented), Darwin has
      been tested more thoroughly
  + added ARMv6 cpu type and made it default for Darwin/ARM
  + ARMv6+ implementations of atomic operations using ldrex/strex
  * don't use r9 on Darwin/ARM, as it's reserved under certain
    circumstances (don't know yet which ones)
  * changed C-test object files for ARM/Darwin to ARMv6 versions
  * check in assembler reader that regsets are not empty, because
    instructions with a regset operand have undefined behaviour in that
    case
  * fixed resultdef of tarmtypeconvnode.first_int_to_real in case of
    int64->single type conversion
  * fixed constant pool locations in case 64 bit constants are generated,
    and/or when vfp instructions with limited reach are present

  WARNING: when using VFP on an ARMv6 or later cpu, you *must* compile all
    code with -Cparmv6 (or higher), or you will get crashes. The reason is
    that storing/restoring multiple VFP registers must happen using
    different instructions on pre/post-ARMv6.

git-svn-id: trunk@14317 -
2009-12-03 22:46:30 +00:00
florian
e5ebb2a26e * started to integrate the code of David Zhang's MIPS code from fpc-mips on sf into fpc trunk
git-svn-id: trunk@14219 -
2009-11-19 22:07:10 +00:00
Jonas Maebe
f7360d47c5 - removed aitconst_indirect_symbol, replaced with tai_directive
(patch by Dmitry Boyarintsev, mantis #15050)

git-svn-id: trunk@14157 -
2009-11-12 19:39:41 +00:00
florian
515774b864 * merged armthum branch
-- Zusammenführen der Unterschiede zwischen Projektarchiv-URLs in ».«:
U    rtl/arm/setjump.inc
A    rtl/arm/thumb2.inc
U    rtl/arm/divide.inc
A    rtl/embedded/arm/stm32f103.pp
U    rtl/inc/system.inc
U    compiler/alpha/cgcpu.pas
U    compiler/sparc/cgcpu.pas
U    compiler/i386/cgcpu.pas
U    compiler/ncgld.pas
U    compiler/powerpc/cgcpu.pas
U    compiler/avr/cgcpu.pas
U    compiler/aggas.pas
U    compiler/powerpc64/cgcpu.pas
U    compiler/x86_64/cgcpu.pas
U    compiler/cgobj.pas
U    compiler/psystem.pas
U    compiler/aasmtai.pas
U    compiler/m68k/cgcpu.pas
U    compiler/ncgutil.pas
U    compiler/rautils.pas
U    compiler/arm/raarmgas.pas
U    compiler/arm/armatts.inc
U    compiler/arm/cgcpu.pas
U    compiler/arm/armins.dat
U    compiler/arm/rgcpu.pas
U    compiler/arm/cpubase.pas
U    compiler/arm/agarmgas.pas
U    compiler/arm/cpuinfo.pas
U    compiler/arm/armop.inc
U    compiler/arm/narmadd.pas
U    compiler/arm/aoptcpu.pas
U    compiler/arm/armatt.inc
U    compiler/arm/aasmcpu.pas
U    compiler/systems/t_embed.pas
U    compiler/psub.pas
U    compiler/options.pas

git-svn-id: trunk@13801 -
2009-10-04 09:03:44 +00:00
florian
53d60f02b2 * lying around newline fixes
git-svn-id: trunk@13513 -
2009-08-10 18:56:32 +00:00
Jonas Maebe
6505b4f9c5 * reverted rest of r13469 because it causes crashes for linux/ppc64
git-svn-id: trunk@13473 -
2009-07-29 20:35:51 +00:00
Jonas Maebe
f265fbe343 * fixed GOT loading for i386 in stubs for external procedures whose external
name is (re)defined in the implementation (mantis #14221)

git-svn-id: trunk@13469 -
2009-07-28 17:28:17 +00:00
Jonas Maebe
34c985cfa6 * added register type parameter to cgsize2subreg(), as the subreg can
depend on that (and correct a number of cases where this was wrong)
  * set the correct subreg type for xmm x86_64 parameter registers
    (resolved mantis #14067)

git-svn-id: trunk@13410 -
2009-07-19 13:57:23 +00:00
Jonas Maebe
c1e327c8c4 * insert register allocation/deallocation information for the exception
handling code (g_exception_reason_load() now automatically allocates
    the cpu register that it loads). This fixes the bug reported in
    http://lists.freepascal.org/lists/fpc-devel/2009-May/016773.html
    on i386 with -O2)

git-svn-id: trunk@13105 -
2009-05-06 19:11:54 +00:00
Jonas Maebe
0af39c77d9 * counterpart of r12844 for storing elements to a bitpacked array:
do not access any data after the array in that case either
  * adapted tparray7 so it checks this on unix platforms

git-svn-id: trunk@12851 -
2009-03-01 15:38:37 +00:00
Jonas Maebe
d24f232485 * when loading data from a bitpacked array, make sure we never load
anything from past the end of the array (it was discarded, but this
    can cause crashes if the array lies at the end of a memory block)
   -- todo: also for writing
  * adapted tparray13 so it checks this on unix platforms

git-svn-id: trunk@12844 -
2009-03-01 13:33:34 +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
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
afa14de20d + some generic changes preparing for darwin/arm support
git-svn-id: trunk@11849 -
2008-10-02 15:10:13 +00:00
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
florian
1afb1aa9cc + ror/rol functions
+ internal compiler support for ror/rol on i386

git-svn-id: trunk@11466 -
2008-07-27 17:12:32 +00:00
yury
4dac183601 * Bring back tcg.getflagregister on Florian's request, but made it non-abstract. It may be used for IA64 support in future (if IA64 will live so long :).
git-svn-id: trunk@11457 -
2008-07-23 17:26:36 +00:00
yury
0e34e98b82 * Removed abstract modifier for some optional (not needed for every CPU target) methods in tcg and tparamanager classes. These methods throw internal error if not overrode.
git-svn-id: trunk@11453 -
2008-07-23 12:49:53 +00:00
yury
8ce526d760 * Removed unused abstract method tcg.getflagregister
git-svn-id: trunk@11451 -
2008-07-23 12:31:38 +00:00
Jonas Maebe
a60a957420 * fixed setting bitpacked record fields straddling their natural boundaries
to 0 or field_type(-1) (bug noted by Russell Davies on fpc-devel + his
    test programs)
  * fixed bit offset calculations for nested bitpacked record regvars

git-svn-id: trunk@11242 -
2008-06-18 16:31:39 +00:00
yury
ec943198fd * Properly fill treference.alignment when variable is loaded by tcgloadnode. It allows code generator to insert unaligned handling if needed.
* Improved generic a_load_ref_reg_unaligned if ref alignment is 2.
* Improved unaligned load/store of register for ARM.
* It fixes passing records by value on ARM.
+ New test.

git-svn-id: trunk@10681 -
2008-04-16 23:01:20 +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
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
Jonas Maebe
e72fab1e43 * perform floating point type conversions directly in assignment nodes
when possible, as this can save a lot of useless memory traffic
    (and fpu<->sse conversions on x86)

git-svn-id: trunk@9716 -
2008-01-11 21:18:49 +00:00
peter
b5e417bd19 * increase the temp requirements for saving MM registers with the full
size of an OS_VECTOR so that we can do the alignment based on the offset
    after the allocation is done. Using the size is not possible because the
    temp alignment can be smaller than the OS_VECTOR requirement

git-svn-id: trunk@9428 -
2007-12-11 19:39:05 +00:00
Jonas Maebe
bc545b077f - removed internalerror in case a subsetref value is loaded on a cpu
which requires proper alignment (they have to support unaligned accesses
    in their a_load_*_* routines)

git-svn-id: trunk@9346 -
2007-11-29 12:59:05 +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
Jonas Maebe
b4b069908f - removed some unnecessary cg. prefixes when calling tcg methods
from inside other tcg methods

git-svn-id: trunk@9315 -
2007-11-22 09:03:35 +00:00
peter
f704ee2d70 * remove duplicate temp allocation for register saving
* cleanup register saving code by using a procinfo flag if registers
    were saved on the stack

git-svn-id: trunk@9293 -
2007-11-18 22:10:10 +00:00
Jonas Maebe
032352d98b + darwin/x86_64 support
git-svn-id: trunk@9180 -
2007-11-10 18:33:09 +00:00
florian
0b83cb5761 * align locations where mm registers are stored to be preserved
git-svn-id: trunk@8970 -
2007-10-28 14:09:38 +00:00
florian
00d6a03b2c + default code now preserves mm registers
* save|restore_standard_registers => save|restore_registers

git-svn-id: trunk@8954 -
2007-10-27 12:02:28 +00:00
Jonas Maebe
b103605bc3 * added comment clarifying why g_indirect_sym_load doesn't have to
care about PIC

git-svn-id: trunk@8653 -
2007-09-26 18:39:14 +00:00
Jonas Maebe
335bc9fd46 + PIC support for darwin/ppc32 (-Cg works now, no regressions in test
suite compiled with -Cg compared to without -Cg)
  + support for using a virtual register as PIC/got base register
  * moved got loading code from ncgutil to cgobj/cgcpu (can't test whether
    it didn't break anything under linux/i386, because "make cycle OPT=-Cg"
    was already broken due to the *prt*.as -> si_*.pp changes)

git-svn-id: trunk@8651 -
2007-09-26 16:41:32 +00:00
tom_at_work
b0bb3f94a7 * improve powerpc64/linux stub for external procedures in units: also consider GOT change in call to this external procedure
* refactored above mentioned stub code generation, allowing the CG to define a cpu specific method for this task by overriding new g_external_wrapper() method

git-svn-id: trunk@8566 -
2007-09-19 20:41:39 +00:00
peter
58e9fc0368 * only freetemp when there were registers saved
git-svn-id: trunk@8531 -
2007-09-17 20:52:51 +00:00
daniel
75af9f2a4d * Fixed another placed where chained paralocs where not being processed.
git-svn-id: trunk@7845 -
2007-06-29 06:33:12 +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
florian
8e3ade9f1f Merged revisions 7567 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/ssa/compiler

........
  r7567 | florian | 2007-06-03 22:53:07 +0200 (So, 03 Jun 2007) | 2 lines
  
  * better code generation for op_reg_reg_reg if src1 and dst are equal
........

git-svn-id: trunk@7569 -
2007-06-03 21:02:17 +00:00
florian
a3d906f1ca - removed several ;;
git-svn-id: trunk@7498 -
2007-05-28 15:59:17 +00:00
Jonas Maebe
a244d54d6f * fixed a_load_ref_reg_unaligned in case reg is used in ref
git-svn-id: trunk@7466 -
2007-05-25 08:49:07 +00:00
Jonas Maebe
1e10424c6b * fixed a_load_reg_ref_unaligned() so it doesn't destroy the source
register anymore

git-svn-id: trunk@7426 -
2007-05-23 11:45:26 +00:00
Jonas Maebe
528eb2ec50 * shl/shr count on sparc is "mod <bitsize>" -> fix subsetref routines to
take that behaviour into account

git-svn-id: trunk@7424 -
2007-05-23 09:32:48 +00:00
Jonas Maebe
a0b57eddb5 * new internal set format for big endian systems. Advantages:
* varsets ({$packset x}) are now supported on big endian targets
    * gdb now displays sets properly on big endian systems
    * cleanup of generic set code (in, include/exclude, helpers), all
      based on "bitpacked array[] of 0..1" now
  * there are no helpers available yet to convert sets from the old to
    the new format, because the set format will change again slightly
    in the near future (so that e.g. a set of 24..31 will be stored in
    1 byte), and creating two classes of set conversion helpers would
    confuse things (i.e., it's not recommended to use trunk currently for
    programs  which load sets stored to disk by big endian programs compiled
    by previous FPC versions)
  * cross-endian compiling has been tested and still works, but one case
    is not supported: compiling a compiler for a different endianess
    using a starting compiler from before the current revision (so first
    cycle natively, and then use the newly created compiler to create a
    cross-compiler)

git-svn-id: trunk@7395 -
2007-05-19 17:15:15 +00:00
Jonas Maebe
acad2913d6 * a loadsize of 1 can never cause alignment problems in subsetref
routines

git-svn-id: trunk@7308 -
2007-05-11 09:17:01 +00:00
Jonas Maebe
4e44015b8e * fixed register and operation sizes of a_load_ref_reg_unaligned()
and a_load_reg_ref_unaligned()

git-svn-id: trunk@7120 -
2007-04-17 13:35:16 +00:00
florian
9140766d5a * support for unaligned loads/stores on sparc
git-svn-id: trunk@7062 -
2007-04-05 12:49:12 +00:00
florian
b0a068b9a0 + unused so far and untested implementation of a_load_*_unaligned
git-svn-id: trunk@7054 -
2007-04-01 19:16:18 +00:00
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