Commit Graph

37558 Commits

Author SHA1 Message Date
michael
ecd0f53488 * Added fpimggauss.pp unit from Mattias Gaertner
git-svn-id: trunk@21655 -
2012-06-19 18:38:47 +00:00
michael
55196878e9 * Added compact image support by Mattias Gaertner
git-svn-id: trunk@21654 -
2012-06-19 18:25:47 +00:00
michael
616b2d9b20 * Added compact image support by Mattias Gaertner
git-svn-id: trunk@21653 -
2012-06-19 18:25:27 +00:00
marco
3ffa6bf2f3 * fix from mantis #22156 to wholly implement iunknown or not.
TAbstractEventSink no longer descends from Tinterfacedobject.
   Patch by Ludo

git-svn-id: trunk@21652 -
2012-06-19 08:55:40 +00:00
svenbarth
e0b41141d2 "SizeInt" inside the compiler references the "size of an int" on the Host platform. What we want for writing size information in PPUs for Generics is "ASizeInt" which is the "size of an int" of the target platform. This fixes Mantis #20947.
* pscanner.pas: change SizeInt to ASizeInt for tokenreadsizeint and tokenwritesizeint and change necessary other locations for record- and replaytokenbuffers
+ Added a test in the hope that some test-platforms do cross platform (e.g. win32 => win64) compilation.

git-svn-id: trunk@21651 -
2012-06-19 08:47:30 +00:00
sergei
a2f0e54dc6 * Fixed internal linker entering infinite loop if script contains empty lines or comments.
git-svn-id: trunk@21650 -
2012-06-18 17:03:35 +00:00
masta
c5fbe3bb3b Use bx lr in ARM-RTL for armv5
ARMv5 supports the BX instruction.
BX usually is better supported by Branch Prediction Units than mov pc,lr.

git-svn-id: trunk@21649 -
2012-06-18 16:59:39 +00:00
masta
c5d7ae513a ARM assembly versions of strupper and strlower
This is about 1/3 faster than the generic code.

git-svn-id: trunk@21648 -
2012-06-18 16:59:34 +00:00
masta
0f3441a9c2 Split OP_ADD, OP_SUB, OP_AND and OP_ORR into multiple instructions if that can avoid constant construction or even loading from a pool.
OP_ADD, OP_SUB, OP_ORR will be split into two intructions if possible when a load/const
construction is required.

OP_AND is a bit different, because we can't just split it up, but we try
to find a two instruction BIC-equivalent to it.

Till now code like

a:= a and $FFFF;

produced code like

mov r0, $FF00
orr r0, r0, $FF
and r1, r1, r0

With this addition we produce code like:

bic r0, r0, $FF00
bic r0, r0, $FF

Saving us at least a cycle and in some cases also a load from the
constant-pool.

This uses the new split_into_shifter_const function.

git-svn-id: trunk@21647 -
2012-06-18 16:59:29 +00:00
masta
f11fbe527e Improve loading of ARM constant values
*  use split_into_shifter_const to reduce the MOV/ORR combination to a
   single check and allow a broader rang of combinations.
*  Introduce MVN/BIC combination to load values which have more 1 than 0
   bits set (like small negative values)

git-svn-id: trunk@21646 -
2012-06-18 16:59:24 +00:00
masta
d987cee96a Introduce split_into_shifter_const to ARM-Code Generator
This functions tries to split up a 32-bit value into two shifter
constants. This approach finds a broader range for two shifter constant
combinations.

git-svn-id: trunk@21645 -
2012-06-18 16:59:19 +00:00
masta
3205169ab9 Use roldword intrinsic instead of function rotl.
These days we don't need the hand coded rol anymore.

git-svn-id: trunk@21644 -
2012-06-18 16:59:13 +00:00
marco
2941b1e456 * do not set fregistered directoy since that hampers registerevents().
Patch by Ludo, Mantis #22244
 

git-svn-id: trunk@21643 -
2012-06-18 11:15:18 +00:00
joost
8b6c61bb86 * Forgot to commit file in r21641
git-svn-id: trunk@21642 -
2012-06-18 10:41:35 +00:00
joost
f67a327240 * Set Field.FieldNo to 0 for fields that are not bound to a fielddef, so that
they are distinguisable from calculated fields with a FieldNo of -1.
 * Added test to check for an exception when the Fields do not correspond to
   the underlying data.
 * Improved exception message when the Fields do not correspond with the data

git-svn-id: trunk@21641 -
2012-06-18 10:39:34 +00:00
joost
cc3ac1dd95 * Createdataset should not create fielddefs for calculated or lookup fields
git-svn-id: trunk@21640 -
2012-06-18 09:48:52 +00:00
marco
ee47ad22ff * Fix scaling with alpha channel. Patch from Bernd Kreuss, Mantis #22245
* Demo that demonstrates image scaling/interpolation

git-svn-id: trunk@21639 -
2012-06-18 09:01:41 +00:00
marco
d99105143b * Zero header before filling it. Colortype and potentially other fields
were not properly initialized in non indexed files. Mantis #21840

git-svn-id: trunk@21638 -
2012-06-18 07:50:18 +00:00
marco
72ab1e632c * fix bug in .find (copy-and-paste?) mentioned by Ludo in #22273
git-svn-id: trunk@21635 -
2012-06-17 17:44:58 +00:00
pierre
cd0522189c Try to improve system error check script
git-svn-id: trunk@21633 -
2012-06-17 14:47:26 +00:00
pierre
b1b96529ec * OpenBSD system errno.h constants fixed
git-svn-id: trunk@21632 -
2012-06-17 14:46:16 +00:00
pierre
61acf7de97 * Fix O_ constants for mips cpu
git-svn-id: trunk@21630 -
2012-06-17 12:40:14 +00:00
pierre
007ea17f36 * Move incorrect delay slot instruction before jump instruction
git-svn-id: trunk@21629 -
2012-06-17 12:39:39 +00:00
michael
7718db9b5e * Added jsoCheckEmptyDateTime option to check for 0 date/time
git-svn-id: trunk@21628 -
2012-06-17 08:26:34 +00:00
michael
872409d293 * Forgot to apply patch from #21905 in trunk
git-svn-id: trunk@21627 -
2012-06-17 07:53:28 +00:00
sergei
7cda919547 * Pass ExeOutput as argument to TObjSection.fixuprelocs, needed for ELF targets to relocate the complex GOT stuff.
* TExeSection.AddObjSection made virtual.
- TExeSymbol.ExeSection is nowhere used, removed.

git-svn-id: trunk@21626 -
2012-06-16 22:33:26 +00:00
marco
ac2de2c188 * workaround rangecheck error, Mantis #22055. Possibly temporarily while
deciding what to do with that report.

git-svn-id: trunk@21625 -
2012-06-16 15:59:40 +00:00
Jonas Maebe
0fc422f244 * moved definition of maxcpuregister and tcpuregisterset from cgbase to
cgutils, and define them so they are no larger than what is required by
    the current target platform
  * added cgutils to the uses clause of several units that use the
    tcpuregisterset type

git-svn-id: trunk@21624 -
2012-06-15 18:24:35 +00:00
Jonas Maebe
6f336a5d13 * the register allocator always knows the exact number of the first imaginary
supreg of the current register type, so use that rather than the maximum of
    all possible register types

git-svn-id: trunk@21623 -
2012-06-15 18:24:30 +00:00
Jonas Maebe
708a2532fc * consistently define empty saved_mm_registers arrays as containing a single
RS_INVALID superregister (instead of sometimes RS_NO and sometimes
    RS_INVALID)
  * check for RS_INVALID in tcg.g_save_registers() and ignore such entries

git-svn-id: trunk@21622 -
2012-06-15 18:24:25 +00:00
Jonas Maebe
313e976256 * avoid spurious range errors due to longint+qword expressions (results in
both values getting converted to a qword, which causes a range error
    in case the longint is smaller than 0)

git-svn-id: trunk@21621 -
2012-06-15 16:58:27 +00:00
pierre
46d98a1f4e * Fix mips compiler compilation failure
git-svn-id: trunk@21620 -
2012-06-15 14:26:51 +00:00
Jonas Maebe
f79aff553e - removed duplicate RS_INVALID declaration (with moreover a different
value than in cgbase)

git-svn-id: trunk@21619 -
2012-06-15 13:48:05 +00:00
pierre
1c5babbeba Fix SIG_MAXSIG const for cpumips
git-svn-id: trunk@21618 -
2012-06-14 23:38:40 +00:00
pierre
6ddb64e160 Fix sigactionreg record for cpumips
git-svn-id: trunk@21617 -
2012-06-14 23:38:02 +00:00
pierre
ff81623d2c Fix fpsigaction call for cpumips
git-svn-id: trunk@21616 -
2012-06-14 23:37:25 +00:00
pierre
0462dc3ca7 * Use A_NEGU (without overflow check) for OP_NEG op_reg_reg
git-svn-id: trunk@21615 -
2012-06-14 23:05:15 +00:00
pierre
ca497405b8 Avoid double call to set_source_info for mipsel
git-svn-id: trunk@21614 -
2012-06-14 15:51:49 +00:00
pierre
72d310a8a4 Partial merge of 21562 by Foxsen, adapted.
git-svn-id: trunk@21613 -
2012-06-14 15:09:14 +00:00
pierre
c87ee7f100 Merge of 21562 by Foxsen
git-svn-id: trunk@21612 -
2012-06-14 15:08:12 +00:00
pierre
a3184d7ff5 Merge of 21562 by Foxsen, needs_frame_pointer field added to TMIPSProcInfo
git-svn-id: trunk@21611 -
2012-06-14 15:06:40 +00:00
pierre
b5807cb907 Merge of 21562 by Foxsen, adapted to work for different ABIs
git-svn-id: trunk@21610 -
2012-06-14 15:04:53 +00:00
pierre
261538f9c2 Fix bug report 22265
git-svn-id: trunk@21609 -
2012-06-14 14:00:44 +00:00
svenbarth
d87b203a0a Do not call ret_in_param of the current parameter manager when parsing a generic method/function. This fixes Mantis #21921.
* pparautl.pas, insert_funcret_para:
    assume that the result in a generic function/method can not be passed in a param
* pparautl.pas, insert_funcret_local: 
    don't call ret_in_param, but create the symbol as we need a valid funcretsym
* pstatmnt.pas, assembler_block:
    don't modify the framepointer for a generic method/function
* rautils.pas, TOperand.SetupResult:
    don't assume that we can't use the result for a generic function/method

git-svn-id: trunk@21608 -
2012-06-14 12:11:11 +00:00
pierre
41248ea4f7 Hopefully correct fix for ReplayToken TSettings record writes
git-svn-id: trunk@21605 -
2012-06-14 10:14:24 +00:00
pierre
1d4862f3c1 * Remove obsolete size check leading to failure for generics tests
git-svn-id: trunk@21604 -
2012-06-14 07:28:55 +00:00
svenbarth
d2fabd2a22 Fix for Mantis #21350
+ pgenutil.pas: 
    add a procedure which adds a type symbol to a non-Delphi-mode generic class or record which has the same name as the unit global dummy symbol for that generic. I don't know why I had that idea earlier as this will simplify some of the conditions in the parser again (I haven't changed these yet, but I hope to do that at least when I start working on generic functions).
* pgenutil.pas, generate_specialization:
    correctly handle "specialize TSomeGeneric<T>" as method parameter in a generic with the newly added rename symbol
* pdecobj.pas, object_dec & ptype.pas, record_dec: 
    call the procedure to add the rename symbol (the procedure checks whether the mode is correct)
* ppu.pas: 
    increase PPU version so that we don't use non-Delphi mode units with generics, but without the rename symbol
+ added tests:
    the one in webtbs are for classes/objects and those in test are for records

git-svn-id: trunk@21603 -
2012-06-14 07:07:28 +00:00
pierre
e8c7635d49 Merge of rev21561 by Foxsen
fix short/smallint operations
without this test/cg/tcnvint6.pp failed at 31 

git-svn-id: trunk@21602 -
2012-06-13 22:49:05 +00:00
pierre
495a6cfebf Merge of rev21558-59-60 by Foxsen
21558:
use inherited first_int_to_real to avoid mixing doubles and singles
it fixes the failure of test/cg/taddcurr.pp

21559:
set default round mode to round nearest instead of round to zero
it fix test/cg/taddcurr.pp

21560:
enable softfpu, default first_int_to_real depends on int64_to_float64/32 etc.
It is needed by the patch of r21558

git-svn-id: trunk@21601 -
2012-06-13 22:39:00 +00:00
pierre
212d04a69e * Avoid line longer than 255
git-svn-id: trunk@21600 -
2012-06-13 22:34:49 +00:00