Commit Graph

941 Commits

Author SHA1 Message Date
Jonas Maebe
f4756b8cc1 * enabled node cse with -O2 for ppc32
* enabled tail recursion with -O2 for ppc64

git-svn-id: trunk@16021 -
2010-09-19 23:27:01 +00:00
Jonas Maebe
57bd6d2685 + merged nestedprocvars branch
+ support for nested procedural variables:
    o activate using {$modeswitch nestedprocvars} (compatible with all
      regular syntax modes, enabled by default for MacPas mode)
    o activating this mode switch changes the way the frame pointer is
      passed to nested routines into the same way that Delphi uses (always
      passed via the stack, and if necessary removed from the stack by
      the caller) -- Todo: possibly also allow using this parameter
      passing convention without enabling nested procvars, maybe even
      by default in Delphi mode, see mantis #9432
    o both global and nested routines can be passed to/assigned to a
      nested procvar (and called via them). Note that converting global
      *procvars* to nested procvars is intentionally not supported, so
      that this functionality can also be implemented via compile-time
      generated trampolines if necessary (e.g. for LLVM or CIL backends
      as long as they don't support the aforementioned parameter passing
      convention)
    o a nested procvar can both be declared using a Mac/ISO Pascal style
      "inline" type declaration as a parameter type, or as a stand-alone
      type (in the latter case, add "is nested" at the end in analogy to
      "of object" for method pointers -- note that using variables of
      such a type is dangerous, because if you call them once the enclosing
      stack frame no longer exists on the stack, the results are
      undefined; this is however allowed for Metaware Pascal compatibility)

git-svn-id: trunk@15694 -
2010-08-02 22:20:36 +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
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
9bc15a5f61 * renamed a_param_* to a_load_*_cgpara
git-svn-id: trunk@15305 -
2010-05-22 09:07:21 +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
4838ebe73b * renamed mark_InlineStart/mark_InlineEnd to mark_NoLineinfoStart/
mark_NoLineinfoEnd
  * add "no line info" markers for try/except and try/finally internal cleanup
    code, so the debugger doesn't jump back and forth between the end and start
    of exception blocks when you arrive at the end
  * honour "no line info" markers in dbgdwarf.pas

git-svn-id: trunk@14327 -
2009-12-04 19:37:22 +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
Jonas Maebe
edacea82be * changed assembler directives for darwin lazy/non-lazy symbol pointers
and init/fini routines into their section equivalents (based on patch
    by Dmitry Boyarintsev, mantis #15037)

git-svn-id: trunk@14128 -
2009-11-09 22:20:01 +00:00
Jonas Maebe
559e284bd0 * merged r13762-14047 from trunk
git-svn-id: branches/objc@14048 -
2009-11-04 15:50:26 +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
Jonas Maebe
0c675a4039 * the objc1 unit has been renamed to objc
* the objc unit links against the Foundation instead of against the Cocoa
    framework, and inludes an interface to either the fragile or non-fragile
    obj-c run time depending on the target platform
  + support for the non-fragile Objective-C runtime/ABI, as used on Mac OS X
    for ARM (iPhone) 64 bit (PowerPC/64, x86_64) -- all these targets now
    are now also supported for the objectivec1 modeswitch
  + support for private_extern symbol bindings, required for the above
  * mark objcclasses that are declared in the implementation section of a
    unit as "hidden" (not sure what the effect is, since the Objective-C
    runtime does not seem to do anything with this flag)
  * enabled all obj-c tests for the newly supported platforms

git-svn-id: branches/objc@13763 -
2009-09-27 15:24:50 +00:00
Jonas Maebe
6c78ac9a78 * fixed powerpc compilation after r13760
git-svn-id: trunk@13761 -
2009-09-27 14:01:41 +00:00
Jonas Maebe
cc5aeb09de * fixed handling the result value of functions where the result type is
forced to something else by the compiler (internal rtl functions etc),
    necessary for the objc branch
  * fixed adding all used function result registers to the list of
    registers that may need to be saved before a function call

git-svn-id: trunk@13695 -
2009-09-12 12:21:34 +00:00
Jonas Maebe
e0c51caa7d * fixed compilation after r13551
git-svn-id: trunk@13553 -
2009-08-18 15:01:57 +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
1f6ec379de * moved field definitions before method/property definitions (see mantis
#13971)

git-svn-id: trunk@13330 -
2009-06-27 11:27:31 +00:00
Jonas Maebe
6165536b5e + added {$modeswitch objectivec1}/-Mobjectivec1 mode switch to enable
the use of Objective-C 1.0 constructs. Because it is a mode switch, it
    can be used cumulatively with every syntax mode. Note that a {$mode xxx}
    statement resets all mode switches as well, so you cannot use the
    -Mobjectivec1 variant if you have such a statement in a unit. This
    modeswitch is currently only enabled for Darwin/PowerPC and Darwin/i386,
    as the backend support is not yet implemented for other platforms.
  + implemented selector() statement that can be used to create an Objective-C
    selector for the message with the specified *constant* name (in the future,
    it will also work for Objective-C method identifiers)
  + added SEL type to the system unit (the selector() statement returns it)
  + added all Objective-C segments to the assembler writers
  + (currently mostly dummy) objc1 unit that is automatically included if the
    {$modeswitch objectivec1} statement is used
  + some tests for the selector() statement

git-svn-id: trunk@12870 -
2009-03-08 18:40:32 +00:00
Jonas Maebe
976aa04378 * fixed ppc/ppc64 compilation after r12719
git-svn-id: trunk@12730 -
2009-02-09 09:47:02 +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
b1c3f76ff9 * changed the supported targets for assembler writers to a set, and
(hopefully correctly) limited all assembler writers to only the
    OSes they support (mantis #11801)

git-svn-id: trunk@12622 -
2009-01-28 15:12:43 +00:00
Károly Balogh
446e2161ce + Made a single Amiga/MorphOS-specific PathConv import to cfileutl.pas, instead of importing it every single place it is needed.
+ Forced PathConv argument to ShortString. Made a note about implementing AnsiString-aware PathConv later.
+ Made code to use the unified PathConv import (named Unix2AmigaPath(), which explains its functionality better).
+ The above changes fixed various compiler crashes in TAsmScriptAmiga, caused by invoking PathConv with AnsiString arguments, while it only supports ShortString

git-svn-id: trunk@12485 -
2009-01-03 14:34:59 +00:00
Károly Balogh
f1b27498c3 + added initial support for the VASM assembler of VBCC fame (http://sun.hasenbraten.de/vbcc/),
because it is faster and more system conform on Amigaish systems (like MorphOS, AmigaOS4 and more) than GNU AS.
  btw, these are the same reasons why FPC/MOS use VLink instead of GNU LD...
+ simple programs compile with it, compiler doesn't work yet. (i'm in touch with VASM maintainer to address some issues)
+ TODO: add a command line switch to turn it on from command line.

git-svn-id: trunk@12479 -
2009-01-02 22:05:05 +00:00
Jonas Maebe
bb9e962490 * fixed procvar parameter passing on ppc/sysv (by value instead of by
reference -- except for method procvars, for tmethod record compatibility)
  * adapted tw11563 for corrected calling convention

git-svn-id: trunk@12475 -
2009-01-02 15:36:27 +00:00
Károly Balogh
75fae87e46 + removed probably accidentally left in A_BL generation, which caused double BL <name> instruction generation
on MorphOS (and all PowerPC32 systems, except Darwin)... These systems now should cycle again.

git-svn-id: trunk@12425 -
2008-12-23 20:48:43 +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
tom_at_work
8a5a6db065 * rol/ror inlines for powerpc/powerpc64 (only for 32/64 bit operands for now)
git-svn-id: trunk@11770 -
2008-09-13 16:29:42 +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
491f0fa1d8 * Replaced all user defined warnings by TODO comments to reduce compiler noise.
git-svn-id: trunk@11443 -
2008-07-23 11:00:03 +00:00
tom_at_work
ee76679326 * cleaned up r10705 for ppc, improved comments
git-svn-id: trunk@10721 -
2008-04-19 19:54:09 +00:00
Jonas Maebe
263984f874 * fixed a_load_ref_reg for OS_S8->OS_16 for ppc32, ppc64 and sparc
(and on ppc64 also for OS_S8->OS_32 and OS_S16->OS_32)
  * adapted tcnvint6 to check for ppc64 OS_S16->OS_32 conversion
    (the old comparison was performed using a 32 bit compare and
     therefore did not notice the wrong result)

git-svn-id: trunk@10705 -
2008-04-18 20:04:55 +00:00
peter
8f239d04b6 * cleanup and simplify the set type handling
git-svn-id: trunk@10432 -
2008-03-02 17:48:27 +00:00
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
Jonas Maebe
638fc56489 * rlwnm_ -> rlwnm.
git-svn-id: trunk@10368 -
2008-02-20 11:50:12 +00:00
Jonas Maebe
417b5dcfda + internal round/trunc support for ppc970 using fctid/fctidz
* a_fctw_ -> a_fctiw_

git-svn-id: trunk@10367 -
2008-02-20 11:49:15 +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
0bf43d223b * fixed uses of custom-length string types in function/property
result types

git-svn-id: trunk@9486 -
2007-12-17 13:36:30 +00:00
Jonas Maebe
2a767fc893 * fixed powerpc32 compilation after r9331
git-svn-id: trunk@9336 -
2007-11-26 11:14:07 +00:00
peter
59365a6db9 - garbage was being output sometimes instead of source lines when compiling with -al. This is because lastfileinfo and lastinfile were never initialized for MASM writer. This is true for TPPCMPWAssembler, too.
- long lines were not wrapped.
- constants of type ait_comp_64bit output incorrectly.
- at end of file, current segment was not closed.
patch from Sergei Gorelkin

git-svn-id: trunk@9331 -
2007-11-25 16:46:19 +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
45b7358d81 + PIC support for darwin/ppc64
* added {$PIC+} for darwin to all library tests

git-svn-id: trunk@8868 -
2007-10-20 20:14:45 +00:00
Jonas Maebe
d766707278 * fixed compilation after r8715 (+ aasmbase to uses clause)
git-svn-id: trunk@8717 -
2007-10-01 20:01:41 +00:00
peter
9f0ca44c94 * new tf_smartlink_library flag
* use create_smartlink[_sections|_library] to check what to 
    do for smartlinking

git-svn-id: trunk@8715 -
2007-10-01 16:55:08 +00:00
Jonas Maebe
d7c4fdbed5 * added maxfpuregs constant to fix compilation after r8655
git-svn-id: trunk@8658 -
2007-09-26 22:00:29 +00:00
peter
6b8aed593f * remove registers{int/mmx/fpu} from firstpass
* small cleanups of unused variables in firstpass
  * node_resources_fpu() created to get an approximation of the
    required fpu registers
  * for the moment use node_complexity in the CG until the
    node_resource_int() is created

git-svn-id: trunk@8655 -
2007-09-26 21:12:01 +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
Jonas Maebe
70c2414daa * split off sec_rodata_norel from sec_rodata, and only put constant data
without relocations in sec_rodata_norel. It should be possible to make
    this new section read-only on all platforms, although currently it
    is only done for darwin, and for non-pic code written using the
    -Aas assembler writer.

    Most platforms also have a special section for "constant but with
    relocations" data, but such a section is currently only used for
    Darwin (others still use plain .data sections for that, like they
    did before)

git-svn-id: trunk@8650 -
2007-09-26 15:49:01 +00:00
Jonas Maebe
42ff6fc5bb * enabled tail recursion optimization for ppc
git-svn-id: trunk@8412 -
2007-09-08 22:47:34 +00:00
Jonas Maebe
22f616d6af * treat procvardef parameters the same as records (fixes webtbs/tw9141)
* fixed some issues with 16 byte parameters on both ppc and ppc64

git-svn-id: trunk@8389 -
2007-09-06 17:35:50 +00:00
Jonas Maebe
70886d0152 * now also disable use8byteconcatcopy by default
git-svn-id: trunk@8197 -
2007-07-29 19:09:12 +00:00
Jonas Maebe
ceeac6e8e4 * don't use 8 byte copies in concatcopy by default, because
a misaligned 8 byte load/store is much more expensive than
    a misaligned 4 byte load/store

git-svn-id: trunk@8182 -
2007-07-28 15:47:04 +00:00
florian
4151029ee5 + .fini section support
git-svn-id: trunk@8174 -
2007-07-28 08:40:10 +00:00
Jonas Maebe
28bab3fb4f - removed some unused variables
* fixed some (harmless) ptrint warnings
  - removed some commented code in agppcmpw
  * added one missing field in a typed constant in cp1251

git-svn-id: trunk@8081 -
2007-07-17 13:57:15 +00:00
tom_at_work
2d1f9b20a3 * merged trefaddr.addr_lo/addr_hi with trefaddr.addr_low/addr.high; some related bugfixing/cleanup
git-svn-id: trunk@7983 -
2007-07-08 20:50:58 +00:00
yury
3b7e458f02 * Properly set location of float return value if it is passed as var parameter (it is always happens for safecall functions). It fixes bugs #8523 and #8977.
+ test.

git-svn-id: trunk@7728 -
2007-06-18 23:23:46 +00:00
daniel
573aa1cd34 * Make powerpc compile again.
git-svn-id: trunk@7642 -
2007-06-13 11:05:15 +00:00
daniel
9adb202a92 * Rework the constexprint to allow operations from low(int64) to high(qword).
+ Some initial work on a formaldef which also carries the typinfo of a parameter.

git-svn-id: trunk@7639 -
2007-06-13 07:41:18 +00:00
Jonas Maebe
544dd57a96 * r0 is also volatile
git-svn-id: trunk@7262 -
2007-05-04 16:52:26 +00:00
Jonas Maebe
0caee5b45b + support to use r0 for ppc/ppc64 when compiling the compiler with
-duser0. Not active by default because generates wrong code due
    to bug in the register allocator

git-svn-id: trunk@7261 -
2007-05-04 14:52:05 +00:00
pierre
922761915b + CondAsmOptStr added for IDE
git-svn-id: trunk@7144 -
2007-04-20 15:23:37 +00:00
Jonas Maebe
34b3a14ffc * fixed typo in opcode tables (hbrx -> lhbrx)
git-svn-id: trunk@7143 -
2007-04-20 15:14:40 +00:00
Jonas Maebe
8077765f13 * fixed loading spilled registers from offsets outside the smallint
range for ppc32 and ppc64 (mantis #8633)

git-svn-id: trunk@7142 -
2007-04-20 13:22:45 +00:00
Jonas Maebe
6ba8db4dd4 * fixed a_op_const_reg(_reg)(OP_OR/OP_XOR,OS_S8/OS_S16) for ppc32
(is ok for ppc64)

git-svn-id: trunk@6756 -
2007-03-09 15:51:09 +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
florian
efb025310d * tried to restore old set behaviour for big endian targets
git-svn-id: trunk@6702 -
2007-03-03 17:52:55 +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
florian
9a0f769b2f * cleaned up set conversion
* fixed conversion of var sets

git-svn-id: trunk@6644 -
2007-02-25 16:29:39 +00:00
Jonas Maebe
0926c4c64d * properly set needstackframe for assembler routines
git-svn-id: trunk@6516 -
2007-02-16 22:13:11 +00:00
Jonas Maebe
c4913ac85d * don't save stack pointer if we don't need to allocate a
stack frame but nevertheless have to store registers to
    the stack (not only optimization, but also needed because
    in that case no room for the stack pointer is reserved
    and thus it'll overwrite one of the saved registers!)

git-svn-id: trunk@6498 -
2007-02-15 20:25:36 +00:00
Jonas Maebe
359c19ee9e - removed ppc601 as ppc32 cpu target
+ added ppc740 (g3), ppc7400 (G4) and ppc970 (G5) as ppc32 cpu
    targets
  * initialise optimizecputype by default to ppc7400 for ppc32 and to
    ppc970 for ppc64
  * merged ppc32/ppc64 overflow checking code and use the ppc64 one
    in case cputype or optimizecputype >= ppc970, because one of
    the instructions used in the ppc32 version no longer exists on the
    ppc970 (although it's emulated in the kernel on at least Mac OS X)
  * moved some other support routines and constants to ppcgen which
    were needed for the overflow checking (were identical for ppc32 and
    ppc64) 

git-svn-id: trunk@6323 -
2007-02-03 19:32:44 +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
c866400823 + support for VMTOFFSET in assembler readers to get VMT offset of virtual
methods (mantis #8153)

git-svn-id: trunk@6168 -
2007-01-24 18:26:23 +00:00
Jonas Maebe
302a2a3ec2 * fixed calling qualified methods in assembler + tests for ppc/ppc64/
i386/x86_64

git-svn-id: trunk@6112 -
2007-01-21 22:16:42 +00:00
Jonas Maebe
4d1f213889 * fixed gprof support for darwin/ppc32 (although the output from gprof
isn't very useful, since it discards all symbols which contain a '$')

git-svn-id: trunk@6080 -
2007-01-19 21:43:12 +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
198a0008d0 * fixed -currency after r5896
git-svn-id: trunk@5914 -
2007-01-12 09:52:07 +00:00
florian
c238bb15d1 * .init section support
git-svn-id: trunk@5835 -
2007-01-07 10:03:52 +00:00
Jonas Maebe
d0b6292137 * disable overflow checking when performing pointer arithmetic
(mantis 8049)

git-svn-id: trunk@5822 -
2007-01-05 21:52:31 +00:00
Jonas Maebe
85289e80ce * fixed overflow in case of op_const64_reg_reg_reg(sub,low(int64),...)
git-svn-id: trunk@5821 -
2007-01-05 21:27:27 +00:00
Jonas Maebe
1d96dcc50d * renamed nf_swaped to nf_swapped
git-svn-id: trunk@5818 -
2007-01-05 12:47:22 +00:00
Jonas Maebe
e2193b1540 * fixed mixing of longint/dword to avoid 64 bit conversion
git-svn-id: trunk@5788 -
2007-01-02 18:32:59 +00:00
Jonas Maebe
32e06e7a7a * fixed memory leaks in ppc peephole optimizer
git-svn-id: trunk@5569 -
2006-12-11 15:53:30 +00:00
Jonas Maebe
05a07a7dd2 * better fix for previous revision
* also applied to x86 and m68k

git-svn-id: trunk@5512 -
2006-11-30 20:55:32 +00:00
Jonas Maebe
3c26e1c40b * fix subsetref/subsetreg support for int_to_real
git-svn-id: trunk@5511 -
2006-11-30 20:29:28 +00:00
Jonas Maebe
108c6f4d73 * unified nppcset for ppc32/ppc64 since virtually identical
* fixed case bug for ppc64 regarding qwords (must be handled via
    genlinearcmplist)

git-svn-id: trunk@5406 -
2006-11-16 18:56:28 +00:00
Jonas Maebe
f60b6faf17 * nppcinl is currently the same for ppc32 and ppc64
git-svn-id: trunk@5405 -
2006-11-16 18:27:10 +00:00
Jonas Maebe
7b0d6364a7 * moved ppc32/ppc64 second_int_to_bool to common file
git-svn-id: trunk@5404 -
2006-11-16 18:04:58 +00:00
Jonas Maebe
6d36b04c6a * create common aasmcpu (currently ppc32 version, will commit
merged ppc32/ppc64 version right after this one)

git-svn-id: trunk@5319 -
2006-11-10 22:11:15 +00:00
Jonas Maebe
d26ee9dccf * fixed overflow errors
git-svn-id: trunk@5318 -
2006-11-10 21:14:37 +00:00
Jonas Maebe
5522cbd7cd * fixed typo which caused overflow checks not to be turned off when
calculating magic division constants

git-svn-id: trunk@5316 -
2006-11-10 20:53:50 +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
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
Jonas Maebe
9acc38e82a * moved some more common powerpc32/64 things to ppcgn
+ a few initial darwin/ppc64 things

git-svn-id: trunk@5197 -
2006-11-03 12:30:17 +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
tom_at_work
35228f0391 * fixes after 5148 changes for ppc platform
git-svn-id: trunk@5150 -
2006-11-01 16:09:38 +00:00
Jonas Maebe
c2c0b7a4e7 * fixed compilation
git-svn-id: trunk@5141 -
2006-11-01 01:10:58 +00:00
florian
85d63d9fa9 * settings refactored
git-svn-id: trunk@5094 -
2006-10-30 18:02:58 +00:00
peter
3078a1927f * remove ttype
* rename old ttype variables *type to *def
  * rename resulttypepass to pass_typecheck
  * rename pass_2 to pass_generate_code

git-svn-id: trunk@5077 -
2006-10-29 22:19:39 +00:00
Jonas Maebe
20ae808b65 * also rlwimi_ is read/write for first operand
git-svn-id: trunk@4942 -
2006-10-16 11:31:35 +00:00
Jonas Maebe
9e825bdc76 * moved common code for ppc32/ppc64 from nppcadd to shared unit
git-svn-id: trunk@4930 -
2006-10-15 15:43:29 +00:00
Jonas Maebe
593f74d155 + full support for varargs-related functionality for "mwpascal; external;"
functions

git-svn-id: trunk@4910 -
2006-10-14 17:56:42 +00:00
florian
2a54d957b2 * fixed two small errors
* supported_optimizerswitches now takes generic flags also into account

git-svn-id: trunk@4865 -
2006-10-11 21:14:47 +00:00
florian
a61abb25cb * reorganized optimizer switch sets
git-svn-id: trunk@4862 -
2006-10-11 18:16:10 +00:00
Jonas Maebe
b67050099a * fixed spilling info for rlwimi
git-svn-id: trunk@4812 -
2006-10-06 16:07:30 +00:00
Jonas Maebe
32a86f6daa * sqr also uses single precision ops for single precision calculations
git-svn-id: trunk@4788 -
2006-10-04 15:56:22 +00:00
Jonas Maebe
e9c5049275 * use single precision fpu ops in case of single precision operands
git-svn-id: trunk@4784 -
2006-10-04 15:26:10 +00:00
Jonas Maebe
d379417ca4 * fixed reg_cgsize
git-svn-id: trunk@4760 -
2006-09-30 21:43:10 +00:00
Jonas Maebe
c261068ab5 * use generic second_addboolean for short circuit and/or (since that code
is the same as what was in nppcadd)

git-svn-id: trunk@4600 -
2006-09-10 15:14:03 +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
florian
9e66674ff9 + first part of qwordbool implementation
git-svn-id: trunk@4462 -
2006-08-19 23:16:17 +00:00
Jonas Maebe
d4a818c8ae * support for subsets which are not a multiple of 8 bits
git-svn-id: trunk@4442 -
2006-08-19 11:11:37 +00:00
Jonas Maebe
63123d3c62 * don't reuse loc_register
git-svn-id: trunk@4426 -
2006-08-15 15:20:32 +00:00
Károly Balogh
b77a51f67d + first somewhat-valid AmigaOS/PowerPC support (no linking yet)
git-svn-id: trunk@4329 -
2006-08-02 18:47:25 +00:00
Jonas Maebe
c25aba7592 * cleaned up subsetreg support (put everything in a record)
* prepared support for elements with arbitrary bit length (as opposed
    to a multiple of 8)

git-svn-id: trunk@4324 -
2006-08-01 20:39:53 +00:00
florian
4095b36047 * cr register name fix
git-svn-id: trunk@4276 -
2006-07-22 09:33:47 +00:00
daniel
e21858f85a + Add Jonas his explanation as comments to gas_regname
git-svn-id: trunk@4272 -
2006-07-21 11:26:00 +00:00
Jonas Maebe
e08aa358fb * removed stb from calculation_target_op0 (stb does not calculate a value
to store in operand 0)

git-svn-id: trunk@4269 -
2006-07-20 22:38:26 +00:00
Jonas Maebe
90cacb4cf5 * changed result type of dwarf_reg from byte to shortint to avoid
warning about comparison which can never be true

git-svn-id: trunk@4183 -
2006-07-14 17:25:16 +00:00
Jonas Maebe
ef16df72da * some optimizations for code generated for
"(x and power_of_two_const) <>/= 0)"

git-svn-id: trunk@4159 -
2006-07-13 17:48:41 +00:00
Jonas Maebe
e32e5e1f9f * fixed interface wrappers for darwin in case they end up in
a shared library

git-svn-id: trunk@3976 -
2006-06-27 13:42:00 +00:00
Károly Balogh
bea92e0656 + small optimizations for code generated for MorphOS syscalls
git-svn-id: trunk@3939 -
2006-06-25 12:33:07 +00:00
Jonas Maebe
bc96cd8008 + more rlwinm optimizations
git-svn-id: trunk@3823 -
2006-06-08 09:48:08 +00:00
tom_at_work
c5cbdda62e * fixed generation of ANDI and ANDIS instructions in the optimizer, properly casting the immediate parameter to an unsigned integer
git-svn-id: trunk@3800 -
2006-06-04 21:16:10 +00:00
yury
550626ef34 - Removed need of assembler startup files for wince. Now compiler directly creates .pdata section needed for arm-wince exception handling.
git-svn-id: trunk@3764 -
2006-06-02 08:36:25 +00:00
Jonas Maebe
488d8ae766 * improved support for merging two consecutive rlwinm's (now also works
if both perform a rotation)

git-svn-id: trunk@3759 -
2006-05-31 20:25:39 +00:00
Jonas Maebe
3a3651a050 + ppc implementations of subsetreg routines
git-svn-id: trunk@3758 -
2006-05-31 19:01:08 +00:00
Jonas Maebe
03302dc7c4 * fixed support for macpas & and | operators: they only work on booleans
now, and always perform short circuit boolean evaluation (also in {$b+})

git-svn-id: trunk@3745 -
2006-05-30 13:02:36 +00:00
Jonas Maebe
a20f211811 * don't try to reuse registers from left/right, impedes optimal register
allocation

git-svn-id: trunk@3669 -
2006-05-25 11:31:32 +00:00
Jonas Maebe
a3cb1b1523 + support for "exotic" locations in load_left_right()
git-svn-id: trunk@3556 -
2006-05-17 19:12:00 +00:00
Jonas Maebe
67dc63048c * fixed and enhanced rlwinm optimizations somewhat
git-svn-id: trunk@3555 -
2006-05-17 19:04:31 +00:00
Jonas Maebe
a387be19a0 + a_call_ref for ppc32 and ppc64
git-svn-id: trunk@3392 -
2006-04-30 20:50:37 +00:00
Jonas Maebe
0d77459b9d * added missing masking of upper 24/16 bits on ppc after performing
add/sub/shl/mul on 8 or 16 bit "registers" + test (tcinvint5)
  * optimized register-register loading of < 32 bit values (removes
    30KB of superfluous extsb/extsh/rlwinm's from compiler+rtl)

git-svn-id: trunk@3207 -
2006-04-14 13:01:10 +00:00
Jonas Maebe
55a2007321 * fixed skipping of parameter registers for ppc/aix in case a parameter
has to be passed on the stack before all registesters are used up
  * fixed calculation of stack offsets for ppc/aix abi for small records, 
    arrays and ordinals passed on the stack after all registers are used
  + test for all of the above

git-svn-id: trunk@3166 -
2006-04-07 22:17:45 +00:00
Jonas Maebe
c41da1172c * removed wrong comment along with commented-out code
git-svn-id: trunk@3165 -
2006-04-07 21:57:30 +00:00
Jonas Maebe
385815beff * fixed offset calculation of first parameter on the stack if there
were any preceding parameters < 4 bytes

git-svn-id: trunk@3141 -
2006-04-04 12:44:19 +00:00
Jonas Maebe
6c62d6a647 + get_max_value in defutil
* use a linear cmp list instead of subtractions on ppc if low >=
    low(smallint) and high <= high(word), because a compare does not
    introduce any dependencies (and in those cases using subtractions
    does not save any instructions or bytes either)

git-svn-id: trunk@3065 -
2006-03-28 11:49:16 +00:00
peter
0ec2921bbe * split newasmsymbol to refasmsymbol and defineasmsymbol
git-svn-id: trunk@3057 -
2006-03-27 11:45:18 +00:00
peter
870be04a3f * use dwarf_reg()
git-svn-id: trunk@3046 -
2006-03-26 20:15:32 +00:00
Jonas Maebe
ab8f96f4cf * disabled i386 createtempparaloc again because it generates wrong
code in case of nested function calls with lots of arguments

git-svn-id: trunk@2948 -
2006-03-17 22:01:25 +00:00
Jonas Maebe
8a6ebdf274 - disabled loop unrolling for level 3 optimizations since it only causes
crashes (and even if it didn't, on its own it mainly causes code
    bloat)

git-svn-id: trunk@2941 -
2006-03-17 17:42:39 +00:00
Jonas Maebe
0232ab62cb * fixed compilation
git-svn-id: trunk@2940 -
2006-03-17 17:26:58 +00:00
peter
b7fe6797bf Merged revisions 2921-2922,2925 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

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

  * pass ObjectWriter to ObjectOuput

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

  * refactor asmdata

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

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

........

git-svn-id: trunk@2932 -
2006-03-16 08:52:22 +00:00
Jonas Maebe
e919e1f2fd * fixed compilation
git-svn-id: trunk@2914 -
2006-03-14 08:38:13 +00:00
peter
2888a21593 * list supported optimization options in -i
* support $OPTIMIZATION and $O+

git-svn-id: trunk@2904 -
2006-03-13 11:17:56 +00:00
peter
b6e35a200e * rewrite of optimizer options
git-svn-id: trunk@2901 -
2006-03-13 09:05:50 +00:00
Jonas Maebe
4ed39b0c16 * don't explicitly us NR_F0 in concatcopy but ask a register from
the register allocator (since NR_F0 can also be used by the ra)

git-svn-id: trunk@2855 -
2006-03-11 14:13:47 +00:00
Jonas Maebe
988f689445 * fixed compilation
git-svn-id: trunk@2851 -
2006-03-11 09:30:09 +00:00
Jonas Maebe
9de2847865 + support for passing parameters via pre-allocated stack space on i386
(override/adjust cgutils.use_fixed_stack to change conditions where
     this is done, currently only activated for darwin-i386)
  * make sure the stack is always aligned to 16 bytes on darwin-i386

git-svn-id: trunk@2840 -
2006-03-10 19:59:44 +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
Jonas Maebe
ba6f1e4990 * factered WriteInstruction out of TGNUAssembler into its own class
* put Apple-specific GNU assembler stuff in its own class
  + darwin/x86 support to the assembler writer

git-svn-id: trunk@2818 -
2006-03-09 14:59:04 +00:00
Jonas Maebe
8a10afc29d * align symbol stubs on 16 bytes instead of 4
* removed some useless/wrong ".data" section directives in the symbol stubs

git-svn-id: trunk@2816 -
2006-03-09 10:36:57 +00:00
peter
38c0ae73da Merged revisions 2775,2788-2789 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/linker/compiler

........
r2775 | peter | 2006-03-05 22:43:30 +0100 (Sun, 05 Mar 2006) | 2 lines

  * merge ppu changes to keep ppus the same

........
r2788 | peter | 2006-03-06 12:59:14 +0100 (Mon, 06 Mar 2006) | 2 lines

  * Add TFPList and TFPObjectList

........
r2789 | peter | 2006-03-06 13:01:37 +0100 (Mon, 06 Mar 2006) | 2 lines

  * fix powerpc

........

git-svn-id: trunk@2790 -
2006-03-06 12:04:44 +00:00
Jonas Maebe
ab5f5ca15e * fixed ppc compilation
git-svn-id: trunk@2778 -
2006-03-05 22:06:44 +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
07ce826be0 + added ability for (mainly 32bit) code generators to directly handle
32bit*32bit->64bit          
  + implemented the above for ppc32 (note: does not happen very often
    in practice, at least not in the compiler and rtl)       
  + test for the above

git-svn-id: trunk@2735 -
2006-03-04 15:09:09 +00:00
Jonas Maebe
8f6b52d482 * don't set high register of 64 bit result for comparisons in case
one of the operands is a constant (missing begin/end after "if")

git-svn-id: trunk@2733 -
2006-03-04 14:14:39 +00:00
Jonas Maebe
dd03d5c997 * put jump tables in rodata
git-svn-id: trunk@2726 -
2006-03-03 19:33:17 +00:00
Jonas Maebe
d8ed0a8722 * copied createtemppara override from x86, to avoid creating double
copies of large value paras

git-svn-id: trunk@2692 -
2006-02-26 14:53:59 +00:00
Jonas Maebe
71407ba8cb * don't concatcopy if source = dest
git-svn-id: trunk@2691 -
2006-02-26 14:53:20 +00:00
Jonas Maebe
7f247e9305 * fix and suppress some rangecheck/overflow errors (regarding calculation
of magic constants for changing division into multiplication)

git-svn-id: trunk@2653 -
2006-02-20 11:01:38 +00:00
Jonas Maebe
285744fe00 * fixed range errors
git-svn-id: trunk@2649 -
2006-02-20 10:39:37 +00:00
Jonas Maebe
21e604c1ea + add "-arch ppc" to the assembler call to fix assembling when
running on x86

git-svn-id: trunk@2590 -
2006-02-15 11:00:09 +00:00
Jonas Maebe
f7d5dd13bf * no sec_bss markers anymore (.comm/.lcomm automatically change
the section type)
  * sec_eh_frame = sec_debug_frame

git-svn-id: trunk@2534 -
2006-02-12 15:01:07 +00:00
florian
4662a12fd5 * compilation for arm target fixed
git-svn-id: trunk@2408 -
2006-02-02 17:26:18 +00:00
Jonas Maebe
c4b6652468 * fixed tlist overflow in some corner cases when fixing up jumps
git-svn-id: trunk@2341 -
2006-01-26 09:54:50 +00:00
florian
b06643a1eb * tai_const refactored
git-svn-id: trunk@2323 -
2006-01-22 12:58:38 +00:00
Jonas Maebe
d4ec987a0f * fixed compilation
git-svn-id: trunk@2319 -
2006-01-22 09:38:53 +00:00
Károly Balogh
b718d9ff37 + added framework code for AmigaOS/PPC syscall support
git-svn-id: trunk@2239 -
2006-01-09 08:58:30 +00:00
Jonas Maebe
1273e0d7ed * generate signed comparisons for immediate equality comparisons if
possible, because those can be optimized better by the peephole
    optimizer

git-svn-id: trunk@2235 -
2006-01-08 19:54:58 +00:00
tom_at_work
9ee594aedd * changes which were forgotten to commit in r2222 for ppc32 cg
git-svn-id: trunk@2234 -
2006-01-08 18:08:26 +00:00
Jonas Maebe
5e9db609e3 * fixed bug fixref whereby a register of a reference was overwritten
git-svn-id: trunk@2212 -
2006-01-07 21:52:17 +00:00
Károly Balogh
cd38c236a0 + made the compiler to know about PowerPC AmigaOS
git-svn-id: trunk@2201 -
2006-01-07 04:46:27 +00:00
Jonas Maebe
365d2892f4 + support for bo/bi notation for branches in the assembler reader
git-svn-id: trunk@2102 -
2006-01-01 13:34:04 +00:00
Jonas Maebe
41d6d85084 * fixed spilling of fpu registers
git-svn-id: trunk@2090 -
2005-12-31 13:14:56 +00:00
Jonas Maebe
c423e23bb4 * only use r12 as frame pointer in the entry code for ppc if necessary
git-svn-id: trunk@2086 -
2005-12-31 10:54:09 +00:00
Jonas Maebe
6c30925e04 * fixed offsets used by stmw/lmw
git-svn-id: trunk@2084 -
2005-12-30 23:50:37 +00:00
Jonas Maebe
c3f27eee06 * optimized generation of and generated entry and exit code:
* no stack frame generated anymore if it's not necessary
    * only the necessary stack space is now reserved, instead of
      room for all non-volatile registers
    * less usage of helper registers

git-svn-id: trunk@2082 -
2005-12-30 17:20:07 +00:00
Jonas Maebe
66ebbbc5c2 * always generate code which can be used to build dynamically loadable
libraries with

git-svn-id: trunk@2013 -
2005-12-20 19:58:27 +00:00
Jonas Maebe
f0c028d6c8 + dwarf support for darwin/mac os x (not really enabled yet, since it's
currently only used if a target requires it)

git-svn-id: trunk@2010 -
2005-12-20 17:54:11 +00:00
Jonas Maebe
8f6babfef7 * fixed passing record parameters of size >= 3 and whose size is not
divisible by 4 on Darwin (have to be passed on the stack instead of in
    registers), fixes tcalext3

git-svn-id: trunk@2002 -
2005-12-20 10:13:10 +00:00
Jonas Maebe
16f9c89854 - reverted previous commit, committed the wrong file
git-svn-id: trunk@2001 -
2005-12-20 10:13:04 +00:00
Jonas Maebe
a16fa618de * fixed passing record parameters of size >= 3 and whose size is not
divisible by 4 on Darwin (have to be passed on the stack instead of in
    registers), fixes tcalext3

git-svn-id: trunk@2000 -
2005-12-20 10:11:50 +00:00
Jonas Maebe
cc44a19af5 * use stmw/lmw when saving/restoring a lot of registers, to reduce generated
code size and thus instruction cache pressure.

git-svn-id: trunk@1785 -
2005-11-19 17:31:35 +00:00
tom_at_work
8ca0fe382e * removed "+0" offset generation in assembler writer
git-svn-id: trunk@1714 -
2005-11-10 15:11:06 +00:00
tom_at_work
3645a69686 * added mftbu (move from timebase upper) opcode
git-svn-id: trunk@1596 -
2005-10-25 20:45:05 +00:00
Jonas Maebe
89094457c5 * pass varargs float parameters only in integer registers instead of only
in fpu registers for aix abi. Proper fix is to pass them in both, but
    at least gcc under Mac OS X only seems to use the contents in the integer
    registers currently.

git-svn-id: trunk@1576 -
2005-10-23 14:23:16 +00:00
Jonas Maebe
b458554f5b + some optimizations for comparisons with zero whereby the result has to
go to a register

git-svn-id: trunk@1379 -
2005-10-15 11:09:44 +00:00
Jonas Maebe
4558cd705e + optimize some slwi/rlwinm combos
git-svn-id: trunk@1378 -
2005-10-14 21:03:48 +00:00
Jonas Maebe
9cf0865d0e * remove a number of superfluous register moves
git-svn-id: trunk@1377 -
2005-10-14 20:34:53 +00:00
Jonas Maebe
e14d8e6611 * don't replace cmplwi's with flag-setting variants of integer operations,
as the latter perform a signed comparison with 0

git-svn-id: trunk@1365 -
2005-10-13 07:49:02 +00:00
Jonas Maebe
cd3f064a33 + enabled postpeepholeopts phase
+ optimize "integer op" followed by comparison of target register with zero
    to a variant of that integer op which sets the flags (ppc)
  + change rlwinm. instructions which do nothing but an "and" operation into
    andi./andis., since the rlwinm. is cracked on the G5 while andi./andis.
    isn't

git-svn-id: trunk@1361 -
2005-10-12 19:47:21 +00:00
Jonas Maebe
339f76182b + missing rlwnm. and not. instructions
git-svn-id: trunk@1360 -
2005-10-12 19:44:34 +00:00
Jonas Maebe
42e49ccd90 + srwi followed by slwi optimized
+ srwi followed by certain rlwinm's optimized

git-svn-id: trunk@1351 -
2005-10-10 20:43:23 +00:00
Jonas Maebe
cd93450fd6 * fixed a few bugs in yesterday's optimization
git-svn-id: trunk@1322 -
2005-10-08 11:37:18 +00:00
Jonas Maebe
ab3bc45fa4 * cpu-specific overrides of optimizer methods now get called
+ first simple rlwinm optimization for ppc

git-svn-id: trunk@1320 -
2005-10-07 21:44:00 +00:00
peter
ec4d287fd8 * aktoutputformat removed, add new paraXX vars for target
assembler and debuginfo and use these vars to override
    the defaults for the target after the parameters are read
  * remove not-maintained and tested gdb code

git-svn-id: trunk@1201 -
2005-09-25 21:17:37 +00:00
Jonas Maebe
8b8d3de3bf * finally fix for fixing up conditional jumps that are too long
git-svn-id: trunk@1161 -
2005-09-23 10:02:53 +00:00
peter
82faa95118 * lineinfo fixed for binary writer
* add tai_directive to replace old tai_direct calls
    in powerpc

git-svn-id: trunk@1139 -
2005-09-19 11:47:30 +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
Károly Balogh
6b01da4f65 * fixed(?) peter's last commit. i hope i did it the right way.
git-svn-id: trunk@1087 -
2005-09-15 16:38:30 +00:00
peter
ca66b9f7c1 * force writing of new section before generating the jumptable
git-svn-id: trunk@1085 -
2005-09-15 14:08:02 +00:00
peter
fdc4925fcd * basic framework for debuginfo class added
git-svn-id: trunk@1084 -
2005-09-15 08:34:51 +00:00
peter
c3727c29b2 * rename al_code to al_procedures, al_bss/al_data to al_globals
* more work for section smartlinking

git-svn-id: trunk@1083 -
2005-09-15 06:51:12 +00:00
Jonas Maebe
9d877e055b * no longer create new asmsymbols in a_jmp(). Very strange that the jmp
peephole optimization worked for ppc...

git-svn-id: trunk@1079 -
2005-09-14 19:22:22 +00:00
Jonas Maebe
5637845b48 * fixed compilation after fpc_resource changes
git-svn-id: trunk@976 -
2005-08-29 13:03:58 +00:00
Jonas Maebe
fdc8c1c0ae * replace divisions by constants with a combination of mul, shift, add from
the ppc compiler writers guide
  + test program for above optimization
  (both by Thomas Schatzl)

git-svn-id: trunk@912 -
2005-08-21 18:35:15 +00:00
Jonas Maebe
97a8ea2e6d + ppc jumptable support for case statements (by Thomas Schatzl)
git-svn-id: trunk@911 -
2005-08-21 18:24:35 +00:00
Jonas Maebe
f1d3ed5225 * fixed tw3402
git-svn-id: trunk@907 -
2005-08-21 16:53:22 +00:00
Jonas Maebe
b779d6d28f * fixed fixref() (by Thomas Schatzl)
git-svn-id: trunk@904 -
2005-08-18 11:09:57 +00:00
peter
05a628447f * put typedconsts in own asmlist to prevent mixing
array and string data
  * added al_rodata
  * renamed tasmlist enum names to include al_ prefix

git-svn-id: trunk@899 -
2005-08-17 08:42:52 +00:00
florian
804207239d *c <int64>:=-<longint> fixed (bug 4253)
git-svn-id: trunk@796 -
2005-08-05 19:00:30 +00:00
daniel
e98865ab40 * Fixes and further development of fast threadvars
git-svn-id: trunk@743 -
2005-07-25 14:07:02 +00:00
daniel
4996b31df1 * Fixes compile error
git-svn-id: trunk@742 -
2005-07-25 13:07:16 +00:00
Jonas Maebe
f948a34c78 - disabled wrong GOT setup code which destroys r31 without saving it (should
have been done a long time ago already)

git-svn-id: trunk@733 -
2005-07-24 08:26:12 +00:00
daniel
d05f58b604 * Group asmlists into array to be able to add
some of them more comfortably.
  * x86_64 compilation was broken, fixed.
  * Sparc compilation was broken, fixed.

git-svn-id: trunk@731 -
2005-07-23 13:44:32 +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
Jonas Maebe
6171499d15 * fixed creating shared libraries under Darwin/Mac OS X
git-svn-id: trunk@727 -
2005-07-22 10:09:52 +00:00
Jonas Maebe
bf51ab03af + support for Mach-O in lineinfo.pp (by Jan Ruzicka)
* always store the return address in the stack frame on ppc if debuginfo
    or lineinfo is turned on (otherwise the parent of a leaf function is
    missing in backtraces)

git-svn-id: trunk@724 -
2005-07-21 13:09:45 +00:00
Jonas Maebe
8bc4e0a32f * inline and compilerproc are now procoptions instead of proccall types
(so both can be combined with each other, as well as with other calling
     conventions)
  * defined COMPPROCINLINEFIXED so SYSTEMINLINE is again activated

git-svn-id: trunk@658 -
2005-07-18 15:27:14 +00:00
Jonas Maebe
614f49355b - removed commented unused assignintreg() procedure
git-svn-id: trunk@648 -
2005-07-18 13:03:34 +00:00
Jonas Maebe
d27fa6d0b3 * fixed another missing swapleftright for subn
git-svn-id: trunk@557 -
2005-07-02 12:22:04 +00:00
peter
c1b2e1aac5 * check function/procedure type when adding a proc definition
git-svn-id: trunk@546 -
2005-06-30 14:56:05 +00:00
Jonas Maebe
7356f83713 * fixed calling of external procedures if the first time they are used in a
compilation unit is in an expression which merely takes their address

git-svn-id: trunk@439 -
2005-06-18 09:06:07 +00:00
Jonas Maebe
0f8e019c44 * fixed web bug tw4078 + added test
git-svn-id: trunk@414 -
2005-06-15 16:46:03 +00:00
Jonas Maebe
af3f851751 * rgBase -> rgbase to avoid unnecessary recompiles on case-preserving/
insensitive filesystems

git-svn-id: trunk@405 -
2005-06-14 17:36:56 +00:00
Jonas Maebe
2b4d3312f7 * fixed web bug #4058 (missing swapleftright for subtraction if overflow
checking is turned on)

git-svn-id: trunk@327 -
2005-06-09 20:17:40 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
Jonas Maebe
aea6563bba * no longer change r12 when fpu regs have to saved, corrupted copying of
stack parameters coming after that

git-svn-id: trunk@130 -
2005-05-27 22:09:49 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
Jonas Maebe
bfa2301575 * const record parameters > 8 bytes are now passed by reference for non
cdecl/cppdecl procedures on Mac OS/Mac OS X to fix compatibility with
    GPC (slightly more efficient than Metrowerks behaviour below, but
    less efficient in most cases than our previous scheme)
  + "mwpascal" procedure directive to support the const record parameter
    behaviour of Metrowerks Pascal, which passes all const records by
    reference
2005-03-27 14:10:52 +00:00
Jonas Maebe
a5c94ddccd * removed some unused variables 2005-03-25 21:55:43 +00:00
Jonas Maebe
46c1b41a7b - removed unused unit 2005-02-26 15:06:26 +00:00
Jonas Maebe
ec959955bd * fixed generic jumps optimizer and enabled it for ppc (the label table
was not being initialised -> getfinaldestination always failed, which
    caused wrong optimizations in some cases)
  * changed the inverse_cond into a function, because tasmcond is a record
    on ppc
  + added a compare_conditions() function for the same reason
2005-02-26 01:26:59 +00:00
Jonas Maebe
706a87c2df * don't lose sign of ord types for register parameters 2005-02-19 14:04:14 +00:00
Jonas Maebe
6c38093871 * fixed spilling for several ppc instructions which only read registers
+ added support for registers in references that get changed (load/store
    with update)
2005-02-18 23:37:51 +00:00
Jonas Maebe
0e4f1738cd - removed a non-existing instruction (lcrxe)
* fixed an instruction (maffs_ -> mffs)
2005-02-18 23:05:47 +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
Jonas Maebe
a823a15888 * records which consist of only a union of one element have to be passed
according to record parameter passing rules, not according to the rules
    of that item's type (change relevant to AIX abi only)
2005-02-11 15:20:23 +00:00
olle
1a87bc0ff3 * fixed erroneous asm line directive 2005-02-08 22:46:00 +00:00
peter
18ebd28692 * push_addr_param must be defined per target 2005-02-03 20:04:49 +00:00
peter
f5e21ec2ff * fixed parseparaloc 2005-01-31 17:46:25 +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
Jonas Maebe
28ea4a8fd4 * fixed bug introduced in revision 1.6 2005-01-24 18:13:46 +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