Commit Graph

36486 Commits

Author SHA1 Message Date
pierre
1b3fd997fc + Regenerate all Makefiles's after adding x86_64 netbsd target
git-svn-id: trunk@21031 -
2012-04-24 23:15:18 +00:00
pierre
1b6c45455e + Add x86_64 netbsd target
git-svn-id: trunk@21030 -
2012-04-24 23:12:30 +00:00
pierre
2684c3fec4 Define USE_SIGACTION_SIGTRAMP for x86_64
git-svn-id: trunk@21029 -
2012-04-24 23:06:22 +00:00
pierre
e0aa5839a9 * Add missing sc_arg6 to sc_arg9 fields in x86_64 SigContext record
git-svn-id: trunk@21028 -
2012-04-24 23:05:20 +00:00
pierre
23f21254bd + Add USE_SIGACTION_SIGTRAMP
git-svn-id: trunk@21027 -
2012-04-24 23:03:08 +00:00
florian
13e152f8a9 * even if currency is handle by an int64, it needs no extra handling in handle_default
git-svn-id: trunk@21025 -
2012-04-24 18:47:58 +00:00
florian
aa2a9dbf2e patches by Nico Erfurth to improve the arm peephole optimizer:
* Introduce MatchInstruction and MatchOperand

MatchInstruction allows to match an instruction by condition and
oppostfix. MatchOperand checks if an operand is a register and matches
another operand. In the future this could be overloaded with other
versions not only accepting TRegister.

* Optimize cmp,moveq,movne sequence on ARM

This patch implements an peephole optimizer for the following sequence:

  cmp   reg,const1
  movne reg,const2
  moveq reg,const1

* Small improvements to the ARM peephole optimizer

Most instructions in the ARM ISA have taicpu(p).oper[0]^.typ = top_reg
as the only option, so there is no need to check for it if we're
looking at those instructions.

* Remove redundant mov instructions on ARM

This is an addition to the ARM PeepHole Optimizer.
It folds code like this:

mov reg1, reg2
add reg1, reg1, (const|reg)

git-svn-id: trunk@21024 -
2012-04-24 18:25:19 +00:00
marco
7800cd4ff5 * Cleanup of adding records to bufdatasets with indexes. Mantis #20514, patch by Lacak2.
git-svn-id: trunk@21023 -
2012-04-24 17:47:18 +00:00
pierre
bf1690458a Partial fix for x86_64 peephole optimization
git-svn-id: trunk@21022 -
2012-04-24 15:38:07 +00:00
sergei
13e513fdf7 * Pass NR_FUNCTION_RESULT_REG to FPC_SAFECALLCHECK in target-independent way.
* Added missing call to paramanager.freecgpara.
* Handle safecall stuff after deallocating registers of the main call in order to keep allocations balanced.

git-svn-id: trunk@21021 -
2012-04-24 14:50:56 +00:00
sergei
04ca8a9126 * translate_disp_call: improved building the parameter block by using ttemprefnode.create_offset instead of taking address/pointer additions/dereference. Results in simpler node tree and lesser CPU instructions generated.
git-svn-id: trunk@21018 -
2012-04-24 12:51:36 +00:00
sergei
6d0dd50be3 * tcallnode.maybe_load_in_temp: treat asnode like callnode, because asnodes are converted into helper calls in pass 1. Improves code generated for expressions "(a as b).SomeMethod".
git-svn-id: trunk@21017 -
2012-04-24 12:31:21 +00:00
Jonas Maebe
05f9edbd08 * fixed compilation on Solaris after r20815
git-svn-id: trunk@21014 -
2012-04-24 11:08:08 +00:00
marco
abaf2eaf12 * sqlDB update SQLParser to parse DML statements WITH common table expressions
Patch by Lacak2, Mantis #21851

git-svn-id: trunk@21010 -
2012-04-24 08:45:16 +00:00
marco
61c4366c8e * fcl-db test for opening non-select statements, which return data by Lacak2, Mantis #21850
* Test for already fixed bugs #0016842 "show tables from <dbname>" and #0014519 "check table <tablename>"
    * Test for common table expressions used with select statement
    * plus reformating of test values (which I forgot did in rev.20585) 
   

git-svn-id: trunk@21009 -
2012-04-24 08:35:29 +00:00
Jonas Maebe
d08a17b763 * AIX requires record data that partially fills a register to be
left-aligned. Other targets only require this if the total size of the
    parameter was > 8 bytes (this last part used to be ensured by
    the ppc64-specific version of a_load_ref_cgpara() that was removed in
    r20962)

git-svn-id: trunk@21008 -
2012-04-23 21:14:38 +00:00
michael
c664a1b921 * Added context info (method/classname/id) and fixed access violation in case of (ID<>Nil) or not (jdoNotifications in Options) error
git-svn-id: trunk@21007 -
2012-04-23 21:00:35 +00:00
pierre
cea6ca2df9 Fix FpSigProcMask overload for OpenBSD: Warning this probably breaks compilation of unix's RTL by obsolete 2.4.4 release compiler, 2.6.0 required
git-svn-id: trunk@21005 -
2012-04-23 10:12:43 +00:00
pierre
afaea929a1 * Also enable ELF32 or ELF64 for OpenBSD OS
git-svn-id: trunk@21004 -
2012-04-23 10:10:10 +00:00
michael
b5b0388f17 * Indexed is by default false, in sync with usepalette which is false by default
git-svn-id: trunk@21003 -
2012-04-23 09:44:30 +00:00
michael
a49112dcc2 * Patch from Michalis Kamburelis to fix memory leak (bug 21835)
git-svn-id: trunk@21002 -
2012-04-23 09:42:34 +00:00
paul
e399f8f9bf rtl: reduce warnings about deprecated symbol access
git-svn-id: trunk@21001 -
2012-04-23 05:57:44 +00:00
Jonas Maebe
426d44905e * add symtable to uses clause for tabstractsymtable, part of r20967
(fixes powerpc64 compiler compilation)

git-svn-id: trunk@20981 -
2012-04-22 10:41:02 +00:00
Jonas Maebe
bbdf9fca73 - disabled fpc_qword_to_double() assembler version for AIX/ppc64 like for
AIX/ppc32
  + AIX/ppc64 support in powerpc64/mathu.inc (file is the same as
    powerpc/mathu.inc, should be unified)
  * fixed macos assembler code in powerpc64/strings.inc and enabled
    for AIX/ppc64

git-svn-id: trunk@20980 -
2012-04-22 10:40:57 +00:00
Jonas Maebe
653996dde1 * {$linklib libnsl.so} -> {$linklib nsl} for AIX (copy/paste error)
git-svn-id: trunk@20979 -
2012-04-22 10:40:51 +00:00
Jonas Maebe
2ec79fd357 * fixed timespec and mcontext_t types for AIX 64 bit
* fixed a few more (harmless because in fields we don't use) errors in AIX
    mcontext_t definition

git-svn-id: trunk@20978 -
2012-04-22 10:40:46 +00:00
marco
743e58ed0f * test for bzip2 from Mantis #21261
git-svn-id: trunk@20977 -
2012-04-22 10:12:45 +00:00
marco
d8101679fa * chunk protected instead of private, Mantis #20543
git-svn-id: trunk@20969 -
2012-04-21 22:52:58 +00:00
marco
9f6121e878 * assembler wouldn't include always anymore ->changed i386 to cpui386.
Changed assembler SELF reference from ESI to EAX. (probably now hidden param instead of fixed register ESI)
    Alternative solution for Mantis #21242

git-svn-id: trunk@20968 -
2012-04-21 21:32:27 +00:00
Jonas Maebe
5dac788b71 * use tabstractrecordsymtable.has_single_field() to determine whether a
record has only a single field (and if so, which one) when checking
    whether we have to treat the record as if it was actually its first
    field that's passed as a parameter (fixes problems with records
    with methods, e.g. crash while compiling tests/test/trhlp35)

git-svn-id: trunk@20967 -
2012-04-21 20:18:08 +00:00
Jonas Maebe
d7247c9bd9 * prevent duplicate symbol errors when compiling code with debug info
on AIX due to the extra inserted local symbols (although in case e.g
   multiple procedures contain a typed constant with the same name, only
   one can be accessible)
  * removed '.' suffix of local symbols inserted for debug info of typed
    constants for AIX (gdb couldn't find those symbols; it seems the
    address calculated by gdb for typed constants is still not correct
    though)

git-svn-id: trunk@20966 -
2012-04-21 20:18:03 +00:00
Jonas Maebe
35b80a4229 * enable assembling via pipe for the AIX assembler
git-svn-id: trunk@20965 -
2012-04-21 20:17:58 +00:00
Jonas Maebe
ec77b0f3ca * fixed writing the alignment for datablocks on darwin/aix based on
the last section's alignment (lastalignment is log2(alignment) there,
    and writesection again takes log2() of its parameter)

git-svn-id: trunk@20964 -
2012-04-21 20:17:53 +00:00
Jonas Maebe
3380b58695 * when we get near the limit of the maximum number of TOC entries that can
be generated for a single object file on AIX, automatically switch to
    an indirection scheme that uses much less TOC entries, but is slower to
    access global variables
  * manually merged infrastructure for target-specific code generation
    switches from JVM branch (-CTxxx switches)
  * -CTsmalltoc switch for AIX that forces the indirection scheme for TOC
    entries from the start in case the automatic one does not conserve
    a sufficient amount (or in case you bump up against the global TOC
    entries limit during linking)

git-svn-id: trunk@20963 -
2012-04-21 20:17:46 +00:00
Jonas Maebe
a473cf14d6 - removed ppc64-specific a_load_ref_cgpara(), the generic one can also
handle of its special cases nowadays

git-svn-id: trunk@20962 -
2012-04-21 20:17:40 +00:00
Jonas Maebe
b512744bfb * don't overwrite the reg to load in a parameter in tcg.a_load_reg_cgpara()
if the value has to be shifted first (it could be a regvar)
  * also take the cgpara's shiftval into account when loading a constant

git-svn-id: trunk@20961 -
2012-04-21 20:17:35 +00:00
Jonas Maebe
5f3db3c1ba * if we assign something to a record field whose type is not regable by
itself (e.g. a 3-byte record as field insde a 4 byte record), make
    the parent record non-regable either. The reason is that the parent
    record will be forced to memory in that case when subscripting, and
    the assignment will happen to this temporary memory location.
    Fixes tests/test/tw15357.pp on ppc64 when compiled with -O2 and
    without -Cg (not sure why enabling PIC disables global regvars)

git-svn-id: trunk@20959 -
2012-04-21 18:38:31 +00:00
Jonas Maebe
98609d4c3e * also create a realconstn for default(currency) on platforms where the
currency type is implemented via int64 (fixes tests/test/tdefault1 on
    platforms without an x87)

git-svn-id: trunk@20958 -
2012-04-21 18:38:27 +00:00
florian
4934a42389 * avoid assembler warning about missing eol at eof
git-svn-id: trunk@20957 -
2012-04-21 18:23:18 +00:00
florian
d681ad612b + several redirection include files for mipsel/mipsel-linux
git-svn-id: trunk@20956 -
2012-04-21 18:21:09 +00:00
florian
c7974fe119 * mipsel-linux uses also a dollar sign as separator in assembler names
git-svn-id: trunk@20955 -
2012-04-21 18:19:38 +00:00
florian
5bf1354eca * lazarus project file updates
git-svn-id: trunk@20954 -
2012-04-21 18:18:23 +00:00
Jonas Maebe
b0f32fc5c2 * since we don't check interfaces yet during whole program optimization,
assume that all virtual methods that can be called via interfaces that
    appear in the program are in fact called (fixes WPO when applied to
    MSEIDE)

git-svn-id: trunk@20952 -
2012-04-21 11:00:56 +00:00
Jonas Maebe
5c6c5699a9 * cs_wpo_optimize_vmts also needs all unit info
git-svn-id: trunk@20951 -
2012-04-21 10:59:21 +00:00
Jonas Maebe
a8087498fa * tell GNU nm not to print undefined symbols, because
a) we don't care about them
     b) for 32 bit binaries on 64 bit platforms, they are indented differently
        than defined symbols
    (fixes -OWsymbolliveness for 32 bit binaries on 64 bit Linux platforms)

git-svn-id: trunk@20950 -
2012-04-21 10:58:42 +00:00
sergei
12a4e1a37d * xmlwrite.pp, continuing with streaming API:
* Factored WriteStartElement, WriteEndElement and WriteXmlDecl into separate procedures
  * Handle element names independent from DOM.

git-svn-id: trunk@20949 -
2012-04-21 01:16:48 +00:00
pierre
84cd32a593 * Add more explicit sizes for array types
git-svn-id: trunk@20948 -
2012-04-20 22:22:29 +00:00
Jonas Maebe
8c27e280e9 * pocall_mwpascal is the same as cdecl/cppdecl -> handle it the same for
varargs

git-svn-id: trunk@20947 -
2012-04-20 21:23:01 +00:00
florian
532102d3fa * use correct result registers for in64 results on armbe, resolves #21731
git-svn-id: trunk@20945 -
2012-04-20 18:07:06 +00:00
marco
e76a0c1d46 * Allow setting autoinc fields in dsFilter,dsSetKey,dsInsert. Mantis #17624, patch by Lacak2.
git-svn-id: trunk@20943 -
2012-04-20 15:01:34 +00:00