Commit Graph

37576 Commits

Author SHA1 Message Date
pierre
5f656be053 * Fix last commit, rame is in register
git-svn-id: trunk@21673 -
2012-06-21 11:59:30 +00:00
pierre
74eb121d1c Fix big endian issues
git-svn-id: trunk@21672 -
2012-06-21 11:52:57 +00:00
pierre
aa8747f5c9 Add more information to TMipsProcInfo class
git-svn-id: trunk@21671 -
2012-06-21 11:52:08 +00:00
pierre
f9930e3f46 Use ldc1 and sdc1 for big endian mips CPU directly
git-svn-id: trunk@21670 -
2012-06-21 11:51:07 +00:00
pierre
d2dc860b1b Use 4 for mips(eb/el) recordalignmax field
git-svn-id: trunk@21669 -
2012-06-21 11:49:49 +00:00
pierre
7608182c10 * Frame is in register s8
git-svn-id: trunk@21668 -
2012-06-21 11:48:42 +00:00
pierre
0c97a49a0e * Change back mipseb-linux to mips-linux
git-svn-id: trunk@21667 -
2012-06-21 07:59:27 +00:00
pierre
15252b546d * Restore 'mips' name as cpumipseb source_cpu_string
git-svn-id: trunk@21666 -
2012-06-20 23:51:36 +00:00
pierre
6b57f3a3d1 * Use include prt0.as for cprt0, gprt0 and dllprt0 as files
git-svn-id: trunk@21665 -
2012-06-20 20:27:55 +00:00
pierre
e4ebe2e52e * Fix wrong .size for _synamic_start
git-svn-id: trunk@21664 -
2012-06-20 20:27:07 +00:00
pierre
23a3275291 * Define both mipseb and mips for non endian-little MIPS compiler
git-svn-id: trunk@21663 -
2012-06-20 16:11:00 +00:00
sergei
bd7ebdce18 * ELF relocation cleanup/improvement:
+ Store size of relocation and explicit addend in TObjRelocation (reusing 'orgsize' field for the latter). This removes need for reading addends back from section data, addends are stored in full 64 bits and therefore not truncated.
  + Relocation style is now controlled by relocs_use_addend variable instead of $ifdef's.
  - Removed (never working) checks forbidding relocations of readonly sections. At the linking stage readonly sections *can* have relocations, executable stage is different matter to be handled elsewhere.
  - removed ugly hack with mapping 32-bit absolute relocations to RELOC_RVA.
  + support 64-bit relative relocations.
  * actualized list of x86_64 relocations.

git-svn-id: trunk@21662 -
2012-06-20 14:16:48 +00:00
sergei
98fffb7981 * Overloaded MemPos_ExeSection and DataPos_ExeSection accepting a TExeSection instead of name.
git-svn-id: trunk@21661 -
2012-06-20 13:33:18 +00:00
masta
2768e0fc12 Folded Add/Sub/Or Splitter, lots of debug output
git-svn-id: trunk@21660 -
2012-06-20 12:39:28 +00:00
masta
5498456269 Add LsrAndLsr Peephole Optimizer for ARM
Remove the superfluous and in:
mov r0, r0, lsr #24
and r0, r0, #255

Doing this allows for better shift-folding later

git-svn-id: trunk@21659 -
2012-06-20 12:39:19 +00:00
masta
92c47148cc Optimize 8/16 OP_NOT on ARM
This now generates:

mvn r0, r0, lsl #24/#16
mov r0, r0, lsr/asr #24/#16

The lsr/asr might be folded into a following instruction, making the
whole operation 1 cycle instead of 2-3 with the previous solution.

git-svn-id: trunk@21658 -
2012-06-20 12:39:09 +00:00
svenbarth
f90e686be2 Always try to present file/line information for generics even if no source is available or the unit was compiled as release unit. This allows IDE like Lazarus to correctly navigate to an error or warning even if the unit containing the generic was compiled as a release unit.
* pscanner.pas, tscannerfile.replaytoken: remove the checks for "sources_avail" and always update the read file/line information 
* fppu.pas, tppumodule.readsourcefiles: always load at least the filenames which were used when compiling the unit from the ppu file, so that file/line information will be correctly shown, but don't touch the "sources_avail" flag of the tppumodule

git-svn-id: trunk@21657 -
2012-06-20 09:01:28 +00:00
svenbarth
75bf094e3f Fix for Mantis #21064.
* pgenutil.pas: factor out the reading of generic specialization parameters (parse_generic_specialization_types) and the generation of a generic type name (generate_generic_name)
* pdecsub.pas, parse_proc_head:
    * also allow an interface alias declaration if an identifier is followed by a "<" (which starts a specialization)
    + add a procedure "consume_generic_interface" which parses such a specialization (by using "parse_generic_specialization_types") - this is needed, because "consume_generic_type_parameter" can (and should not!) handle "ISomeIntf<Integer, T>" or (somewhen in the future) "ISomeIntf<TSomeOtherGeneric<T>>" - and finds the correct symbol for the interface (by utilizing the "generate_generic_name" function)
    * generate the correct mapping entry (for the generic it's only needed for checking (if any), but for a specialization it's essential that we reference the correct specialization)

+ add tests which were included with the issue and also two additional ones

Note: In non-Delphi modes an interface alias can be done like in Delphi mode; "specialization" is not necessary and furthermore not even allowed!

git-svn-id: trunk@21656 -
2012-06-20 08:35:57 +00:00
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